I have been working on some new menu handling code for a while, and would be interested in some input from some of the people who might end up using it. If anyone wants to try it out, simply checkout and build libegg. Then run the test-merge program in the libegg/menu subdirectory.

There is a description of how the merging code should work when it is finished in the howitshouldwork.txt file, which you can read online at:

This new menu handling code makes use of a lot of the ideas of the bonobo UI handler code, but only relies on gtk+ (version 2.0). I have tried to design things so that bonobo could build on top of it for its remote component menu handling (the aim being to unify menu handling of gtk, gnome and bonobo apps, so people don't need to rewrite their menu code to add gnome or bonobo support). Some of the main features include:

   * concept of Action objects.  An action combines menu label, icon,
     tooltip, toolbar label, callback, etc.  Any number of proxy menu
     items and toolbar buttons can be created for an action, which
     reflect the state of the action (ie. if you change the label or
     keybinding for an action, all proxies reflect that change
     automatically).  There are special action types for toggle actions
     and actions that are part of a radio group.
   * Menu/toolbar descriptions defined in XML files.  The format is a
     subset of the bonobo UI XML format.  Keybindings are not handled
     in the XML, but instead use the GTK accel map, and menu labels,etc
     are taken from the action objects.  In fact, no user visible
     strings are included in the XML file.
   * Ability to merge multiple XML user interface files together (with
     support for placeholders).  I haven't implemented the toolbar
     handling in the merge code yet though.

Any comments would be appreciated.


Email: james daa com au              | 2003 Call for Papers out
WWW: |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]