Hi Michael, so I just sat down and tried to implement this stock stuff, it works by adding a `stockid="name"' attribute to the <menuitem>. ==== 2001-07-12 Martin Baulig <baulig suse de> * bonobo/bonobo-ui-sync-menu.c (impl_bonobo_ui_sync_menu_build): Implemented stock menuitems; if the menuitem has a "stockid" attribute, we interpret it as a stock menu item. * bonobo/bonobo-ui-util.c (bonobo_ui_util_xml_get_icon_pixmap_widget): Don't prepend "Menu_" to the stock name, this is no longer necessary with GTK+ 2's stock system. ====
Attachment:
diff
Description: Binary data
The patch is not perfect yet, I'll send you a better one tomorrow, but I'll go to bed now so maybe someone wants to have a look at it over night. A few questions: 1.) My current implementation looks for a "stockid" attribute in the <menuitem> and if found sets the "label", etc. attributes; - is this the correct approach ? 2.) Should this happen in _build() or in _sync_state() ? It's currently in _build() because _sync_state() is more performance critical than _buld() - but this also means that you can't change something to become a stock menuitem. So I guess it should be in _sync_state(). 3.) I guess this should also be implemented for toolbars ? -- Martin Baulig martin gnome org (private) baulig suse de (work)