FrapMenu menu/item ordering

Jannis Pohlmann jannis at xfce.org
Wed Feb 21 23:35:48 CET 2007


On Wed, 21 Feb 2007 13:50:25 -0800, Brian J. Tarricone wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wed, 21 Feb 2007 22:37:26 +0100 Jannis Pohlmann wrote:
>
> >The only way to have a special order (and separators) is using the
> ><Layout> element - which is not supported by FrapMenu yet. I haven't
> >planned how to implement this, but I could imagine providing a
> >
> >  FrapMenuLayout frap_menu_get_layout (FrapMenu *menu);
> >
> >function in combination with a FrapMenuLayout class containing menus,
> >separators and items in order according to <Layout> elements. If you
> >want to have special elements placed on top and separated like in the
> >current menu, you could then just do:
> >
> >  <Menu>
> >    <Name>Applications</Name>
> >    <Directory>applications.directory</Directory>
> >    <Menu>
> >      <Name>Settings</Name>
> >      ...
> >    </Menu>
> >    <Layout>
> >      <Filename>xfrun4.desktop</Filename>
> >      <Separator/>
> >      <Filename>default-terminal.desktop</Filename>
> >      <Filename>Thunar.desktop</Filename>
> >      <Filename>default-browser.desktop</Filename>
> >      <Separator/>
> >      <Menuname>Settings</Menuname>
> >      ...
> >    </Layout>
> >  </Menu>
>
> That sounds fine to me.  Ideally it would still be possible in this
> case to get notifications when parts of the menu change, and be able
> to update the GtkMenu without having to regenerate everything from
> scratch.  I guess I'm getting a bit ahead of myself here, though.

I'm actually planning integration of Gamin so people can connect to a
signal of menus and menu items. This way, they could e.g. pass the
related GtkMenu or GtkMenuItem (or even both) in order to update the
GUI state. That shouldn't be too difficult.

  - 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/20070221/d263fbab/attachment.pgp>


More information about the Xfce4-dev mailing list