After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 164310 - <Layout> and <DefaultLayout> nodes are dropped
<Layout> and <DefaultLayout> nodes are dropped
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: layout
git master
Other All
: High enhancement
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2005-01-17 02:03 UTC by Mathias Hasselmann (IRC: tbf)
Modified: 2005-03-23 15:30 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Very basic <DefaultLayout> support (2.26 KB, patch)
2005-03-01 20:13 UTC, Christian Neumair
none Details | Review
Very basic <DefaultLayout> support (20.04 KB, patch)
2005-03-01 20:14 UTC, Christian Neumair
none Details | Review
full support for layout spec (gnome-menus part) (40.25 KB, patch)
2005-03-02 09:22 UTC, Frederic Crozat
none Details | Review
full support for layout spec (gnome-panel part) (13.78 KB, patch)
2005-03-02 09:23 UTC, Frederic Crozat
committed Details | Review
full support for layout spec (gnome-menus part) - new version (43.15 KB, patch)
2005-03-09 18:17 UTC, Frederic Crozat
committed Details | Review

Description Mathias Hasselmann (IRC: tbf) 2005-01-17 02:03:21 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.
Comment 1 Christian Neumair 2005-03-01 20:13:17 UTC
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.
Comment 2 Christian Neumair 2005-03-01 20:14:11 UTC
Created attachment 38120 [details] [review]
Very basic <DefaultLayout> support

Sorry, wrong patch.
Comment 3 Christian Neumair 2005-03-01 20:18:11 UTC
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.
Comment 4 Mark McLoughlin 2005-03-02 09:15:32 UTC
fcrozat has been working on this and there's a patch in my inbox
Comment 5 Frederic Crozat 2005-03-02 09:22:54 UTC
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.
Comment 6 Frederic Crozat 2005-03-02 09:23:31 UTC
Created attachment 38142 [details] [review]
full support for layout spec (gnome-panel part)
Comment 7 Frederic Crozat 2005-03-09 18:17:21 UTC
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
Comment 8 Mark McLoughlin 2005-03-14 08:47:39 UTC
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 ...
Comment 9 Mark McLoughlin 2005-03-21 10:41:48 UTC
Frederic ?
Comment 10 Frederic Crozat 2005-03-22 16:23:17 UTC
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 :(
Comment 11 Mark McLoughlin 2005-03-23 15:30:57 UTC
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.