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 300589 - entry shows up in two menus
entry shows up in two menus
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.10.x
Other All
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2005-04-14 09:15 UTC by Travis Watkins
Modified: 2005-04-15 09:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Travis Watkins 2005-04-14 09:15:31 UTC
Please describe the problem:
If I have a user version of gcalctool.desktop and change it so it goes in the
Games menu (Categories=Application;Game;) the root version in Accessories and
the user version in Games are both shown. Even putting an <Exclude> in for
Accessories doesn't fix it, I think because it's trying to exclude the user
version but it isn't actually there.

Steps to reproduce:
1. Create copy of gcalctool.desktop in ~/.local/share/applications/
2. Edit .desktop file so it goes in the Games menu (Categories=Applications;Game;)



Actual results:
You end up with two versions of the entry.

Expected results:
You should only get the user version because it overrides the root one.

Does this happen every time?
Yes

Other information:
This was considered incorrect behavior by the fd.o xdg mailing list.
Comment 1 Mark McLoughlin 2005-04-15 09:59:35 UTC
Thanks, fixed on HEAD and gnome-2-10

2005-04-15  Mark McLoughlin  <mark@skynet.ie>

        Fix for bug #300589 - if you've a .desktop file in
        the user's app dir and another in the system app dir,
        and they have a different set of categories, we'll
        match against both .desktop files when processing
        <Category>

        * libmenu/gmenu-tree.c:
        (get_by_category_foreach), (get_by_category): iterate
        over a DesktopEntrySet looking for entries which have
        a given category.
        (process_include_rules): take a DesktopEntrySet which
        contains the pool of desktop file IDs available, rather
        than an EntryDirectoryList.
        (process_layout): generate a pool of desktop file IDs
        for matching against.

        * libmenu/entry-directories.[ch]:
        (entry_directory_list_get_by_category),
        (entry_directory_list_invert_set): remove, they're unused
        now.

        * util/test-menu-spec.c: (print_entry): remove trailing
        space which screws over the tests in menu-spec.