xfdesktop menu is getting awesomer

Jannis Pohlmann jannis at xfce.org
Mon Mar 19 14:15:47 CET 2007


On Mon, 19 Mar 2007 12:42:45 +0100, Jannis Pohlmann wrote:

> Hey,
>
> On Sun, 18 Mar 2007 19:56:45 -0700, Brian J. Tarricone wrote:
>
> > Hey all,
> >
> > Thanks to the tireless efforts of Jannis in building our next-gen
> > menu system, the new xfdesktop menu is actually working more or
> > less like the old one used to (at least in the part that's visible
> > to end users).
>
> Great work! I enjoyed reading your commit log.
>
> > Jannis - a couple things...
> >
> > 1.  frap_menu_get_layout_items() currently returns a sorted list of
> > submenus and items if the .menu file doesn't have a <Layout>.  For
> > flexibility, do you think it could either return NULL in that case,
> > or maybe add extra API e.g. frap_menu_has_layout() so I can check if
> > there's a layout.  If not, my preference is to show submenus first
> > (sorted) and then items (sorted), not having them all together.
> > Adding the extra API will let implementors who care decide how they
> > want to handle the default layout.
>
> Sure, let's do it this way.

Done in revision 25219.

> > 2.  Either I'm misunderstanding something, or I've found a
> > <Layout>-related buglet.  I decided to add a <Layout> element to the
> > Settings menu as well:
> >
> > <Layout>
> >     <Filename>xfce-settings-manager.desktop</Filename>
> >     <Separator/>
> >     <Merge type="all"/>
> > </Layout>
> >
> > If my reading of the menu spec is correct, I should be able to do
> > this; each <Menu> element can have a <Layout>.  However, the layout
> > doesn't seem to work.  The debug output seems to indicate that it
> > does indeed see and process the <Layout> element:
> >
> > FrapMenu-DEBUG: frap_menu_layout_add_filename \
> >     ('xfce-settings-manager.desktop')
> > FrapMenu-DEBUG: frap_menu_layout_add_separator ()
> > FrapMenu-DEBUG: frap_menu_layout_add_merge (2)
> >
> > [tweaked to fix wrapping]
> >
> > ... but the call to _get_layout_items() doesn't seem to notice the
> > layout:
> >
> > FrapMenu-DEBUG: Menu has layout
> > FrapMenu-DEBUG: Xfce: 23 layout items
> > FrapMenu-DEBUG: Settings: 15 layout items
> > FrapMenu-DEBUG: Accessories: 9 layout items
> >
> > The separator doesn't appear, and the 'Xfce Settings Manager' item
> > is sorted with the rest of the items.  (I have 15 items in the
> > menu; it should say '16 layout items' if you include the separator.)
> >
> > Any ideas?  Am I doing something wrong?
>
> I'll look into it after (or, to put it more realistic, during)
> breakfast. Probably a bug at my end.

Fixed (also revision 25219).

I updated xfdesktop to use these changes (see revision 25220). Feel
free to revert that revision if you don't agree with how I did it.

Regards,
  Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20070319/6c37b68e/attachment.pgp>


More information about the Xfce4-dev mailing list