GNOME Bugzilla – Bug 164310
<Layout> and <DefaultLayout> nodes are dropped
Last modified: 2005-03-23 15:30:57 UTC
Currently layout nodes are dropped, which is bad if you want to utilize gnome-menus for describing quick-launch-panels, where order of desktop- and menu-items is essential.
Created attachment 38119 [details] [review] Very basic <DefaultLayout> support This is a very first attempt of adding support for the <DefaultLayout> tag. I'm not sure whether it is clean enought, the parsing code is sane and whether you like the spirit of the patch; maybe somebody could review it? The net effect is for now that empty menus are shown even if they have no children if <DefaultLayout show_empty="true"/> is set for the menu or a parent menu.
Created attachment 38120 [details] [review] Very basic <DefaultLayout> support Sorry, wrong patch.
On a sidenote: I'm not sure whether it is a good idea to mess around with <DefaultLayout> attributes without adding support for <Layout><Menuname></Layout> as well, since the attributes are the same and are applied to the submenu - I'm not sure how we can do this in a generic way.
fcrozat has been working on this and there's a patch in my inbox
Created attachment 38141 [details] [review] full support for layout spec (gnome-menus part) This patch add full support for layout optional part of XDG menu spec.
Created attachment 38142 [details] [review] full support for layout spec (gnome-panel part)
Created attachment 38466 [details] [review] full support for layout spec (gnome-menus part) - new version new version : -fix duplicate directories when inlining -adapt test program to new API
Frederic: I've re-worked the patch a good bit and committed to the "layout-support" branch. All the menu-spec tests on fd.o still pass, but could you make sure it still works with your <Layout> test cases ? Oh, the API is slightly different, so the gnome-panel patch needs updating. The only really new thing is that I realized that an inline alias could actually reference a directory as an entry - e.g. if you had inline = TRUE, inline_alias = TRUE Applications Foo (foo.directory) <DefaultLayout/> Bar (bar.directory) foobar.desktop blaa.desktop then that would get merged as Applications Foo (alias: directory = foo.directory, item = bar.directory) foobar.desktop blaa.desktop So, menu_tree_alias_get_item() can return either an entry or directory Thanks ...
Frederic ?
sorry Mark for the slow response, I'm a bit overworked ATM. I don't have written testcases (yet) but I'll try to test with our own menu and write testcases later. I'll only be able to test about two weeks :(
Okay, I went ahead and tested this a good bit, fixed some stuff and merged to HEAD. I updated the gnome-panel patch and committed that too.