Re: Making GtkMenuMerge nice to demo



Am Die, 2003-08-26 um 02.17 schrieb Owen Taylor:
> On Mon, 2003-08-25 at 18:12, Matthias Clasen wrote:
> 
> > Thanks for the detailed feedback. So to summarise your proposals:
> 
> An accurate summary. Few random comments below.
> 
> > struct GtkRadioActionEntry 
> > {
> >   gchar *name;
> >   gchar *stock_id;
> 
> I omitted stock_id intentionally because I couldn't think of a use, but
> I just thought of the obvious counter-example in the standard GTK+
> stock items. And I guess adding new stock items is currently what
> we're recommending if you want custom icons for your menu items / 
> toolbar items. So, let's keep it in.
> 
> >   gchar *label;
> >   gchar *accelerator;
> >   gchar *tooltip;
> > 
> >   guint  value; 
> 
> Though GtkTargetEntry has guint, I think 'gint' is fractionally better -
> the reason for this is that enumeration constants in C are defined
> to be 'int'.
> 
> > 2) Rename GtkMenuMerge to GtkUIManager
> 
> Yeah. Though I had one second thought about GtkUIManager - if we
> add a glade equivalent to GTK+ as has been discussed for the future,
> what do we calle that? Well, we'll cross that bridge when we come
> to it.

GtkGladeEquivalent ...running for cover...

> 
> > 3) Rework the XML format:
> >   - rename <Root> to <ui> and make it optional in strings
> >   - rename <dockitem> to <toolbar>
> >   - rename <menu> to <menubar>, <submenu> to <menu>
> >   - rename verb to action
> >   - perhaps allow to disambiguate actions by prepending group_name::
> 
> [...]
> 
> > These all sound very reasonable. To 3) I'd like to add: get rid of
> > <popups>, it adds an ugly asymmetry and isn't really necessary.
> 
> When I was writing this (away from an network connection), I couldn't
> find the UI XML format docs, so I had no idea how <popups> worked, so I 
> omitted any opinion on that.
> 
> How would <popups> work then? Just <menu> nodes directly under <ui>?
> 

Yes, thats what I had in mind, though we could keep the name <popup> for
the first level to differentiate it more clearly from <menubar>. E.g:

<ui>
  <menubar>
    <menu name="Menu1">
      ...
    </menu>
  </menubar>
  <toolbar>
    ...
  </toolbar>
  <popup name="ContentPopup">
    <menuitem name="bla" action="bla"/>
    <menu name="sub" action="sub">
      ...
    </menu>
  </popup>
  <popup name="SplitterPopup">
   ...
  </popup>
</ui> 

Matthias





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