GNOME Bugzilla – Bug 300589
entry shows up in two menus
Last modified: 2005-04-15 09:59:35 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.
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.