#9 Application-specific menus

closed-accepted
None
5
2001-01-27
2001-01-05
No

This patch (against CVS as of 01/04/2001) adds application-specific menus to ROX-Filer. If an application has a menu defined, its entries appear above the standard menu when the application is right-clicked.

The menu is defined in a file called AppMenuStatic.txt in the application directory. Its format is:

entryid Menu text

Each line defines one menu entry. When an entry from the application menu is selected, the corresponding AppRun is invoked with the option "--entryid", where "entryid" is the one corresponding to the item selected. It is up to AppRun to correctly interpret the option and do something.

The application menus are re-read automatically when they change, so the application can potentially modify the menu file, and the changes will be seen by ROX-Filer.

For examples of ROX applications that use this feature, see my Trashcan and XEmacs applications at
http://www.cerias.purdue.edu/homes/zamboni/rox/. In particular, the XEmacs wrapper is an example of an AppRun that modifies its menu on the fly, to keep a list of recently-opened files.

See the top of the patch file for additional notes.

The patch was too large and sourceforge refused it. Please download it from http://www.cerias.purdue.edu/homes/zamboni/files/rox-appmenus.patch

Discussion

  • Diego Zamboni

    Diego Zamboni - 2001-01-05

    None

     
  • Diego Zamboni

    Diego Zamboni - 2001-01-05

    This patch (against CVS as of 01/04/2001) adds application-specific
    menus to ROX-Filer. If an application has a menu defined, its entries
    appear above the standard menu when the application is right-clicked.<p>

    The menu is defined in a file called AppMenuStatic.txt in the
    application directory. Its format is:<p>
    <pre>
    entryid Menu text
    </pre>

    Each line defines one menu entry. When an entry from the application
    menu is selected, the corresponding AppRun is invoked with the option
    "--entryid", where "entryid" is the one corresponding to the item
    selected. It is up to AppRun to correctly interpret the option and do
    something.<p>

    The application menus are re-read automatically when they change, so
    the application can potentially modify the menu file, and the changes
    will be seen by ROX-Filer.<p>

    For examples of ROX applications that use this feature, see my
    Trashcan and XEmacs applications at
    <a href="http://www.cerias.purdue.edu/homes/zamboni/rox/">http://www.cerias.purdue.edu/homes/zamboni/rox/</a>. In particular, the
    XEmacs wrapper is an example of an AppRun that modifies its menu on
    the fly, to keep a list of recently-opened files.<p>

    The patch was too large and sourceforge refused it, so please download it from <a href="http://www.cerias.purdue.edu/homes/zamboni/files/rox-appmenus.patch">http://www.cerias.purdue.edu/homes/zamboni/files/rox-appmenus.patch</a>.

     
  • Diego Zamboni

    Diego Zamboni - 2001-01-26

    The new version of this patch is against CVS as of 01/26/2001, and has significant changes. More importantly:

    - No longer caches copies of the pinboard, panel and filer menus. Instead it modifies them on the fly.

    - It now works on filer windows too (I don't know yet if this is a good think - see the comments in the patch)

    - The menu file is called AppMenu instead of AppMenuStatic.txt.

    - The menu file itself is now used as the key to the cache, instead of the directory.

     
  • Thomas Leonard

    Thomas Leonard - 2001-01-27
    • assigned_to: nobody --> tal197
    • status: open-accepted --> closed-accepted
     

Log in to post a comment.