xfdesktop menu is getting awesomer

Tuukka Mäkinen tukem at iki.fi
Mon Mar 19 12:38:32 CET 2007


On Sun, 18 Mar 2007, Brian J. Tarricone wrote:

> 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.

I suppose the standard suggested way to do this is to use <DefaultLayout>? 
Just put the block below to your menufile.

<DefaultLayout>
   <Merge type="menus"/>
   <Merge type="files"/>
</DefaultLayout>

I don't remember now what does the standard instruct to do if 
<DefaultLayout> is missing. I suppose sorted as Jannis has selected that 
implementation.

>
> 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:
>

This sounds like the way I remember it was supposed to work.

Tuukka



More information about the Xfce4-dev mailing list