Re: Stock items - first version of a patch
- From: Murray Cumming <Murray_Cumming BetaResearch de>
- To: Martin Baulig <martin home-of-linux org>
- Cc: Michael Meeks <michael ximian com>, gnome-components-list gnome org
- Subject: Re: Stock items - first version of a patch
- Date: Fri, 13 Jul 2001 11:45:33 +0200
Martin Baulig wrote:
>
> 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>.
Will each <menuitem> still also have a <cmd>? If so, then maybe the
stockid attribute should be in there as an alternative to _label, _tip,
etc.
Note that the appropriate <cmd> is normally found by looking for a <cmd>
whose name is the same as the <menuitem> name.
> ====
> 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.
>
> ====
>
> ------------------------------------------------------------------------
>
> diffName: diff
> Type: unspecified type (application/octet-stream)
>
> ------------------------------------------------------------------------
>
> 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)
--
Murray Cumming
www.murrayc.com
murrayc usa net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]