Re: Stock items - first version of a patch



Hi Martin,

        Just read over the patch; instead of 'prepend_menu' can we pass   
around the Gtk stock enum that gives us the icon we want [ so the API
flows more beautifuly ] - that is in your bonobo-ui-util.c change.

On 12 Jul 2001, Martin Baulig wrote:
> so I just sat down and tried to implement this stock stuff, it works by
> adding a `stockid="name"' attribute to the <menuitem>.

        Great, there are several points that need making here. Firstly I  
think we should do the work in the 'sync_state' part, since we don't
really want to be adding nodes to the XML tree in memory if we can help it
- it is already big :-) And GtkStock lookups should be fast.
  
        Secondly, it is important that we can put the stockid onto the    
command so we can do:
  
        <commands>
                <cmd name="FileOpen" stockid="Open"/>
        </commands>
        <menu>
                <menuitem name="Foo" verb="FileOpen"/>
        </menu>
        <toolbar name="BigDock">
                <toolitem name="Foo" verb="FileOpen"/>
        </toolbar>
  
        etc. I don't know if GtkStock has included accelerators in the    
label texts for menu items ? - if so we need some way to get rid of them  
for the toolbars ... Hmm.
  
        Also, we need to remove bonobo_ui_util_encode_str etc. since
libxml2 should be able to cope with what we want to pass across, and all 
translators will need to switch to UTF-8 anyway in Gnome 2.0, this is a  
good way to find out if they actualy have [ I suspect not ].  

        We should stub the ui_util_encode/decod_str as a plain g_strdup ()
I think, for backwards compat.

        Regards,
  
                Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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