Bug 11748 - duplicate menu entries in gnome
Summary: duplicate menu entries in gnome
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Fathi Boudra
QA Contact:
Depends on:
Reported: 2007-07-27 14:34 UTC by Lei Zhang
Modified: 2009-08-03 22:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

.desktop file added to the menu (117 bytes, text/plain)
2007-07-27 14:35 UTC, Lei Zhang
.directory file (74 bytes, text/plain)
2007-07-27 14:35 UTC, Lei Zhang
screenshot (62.67 KB, image/png)
2007-07-27 14:36 UTC, Lei Zhang
proposed patch (773 bytes, patch)
2007-07-27 14:40 UTC, Lei Zhang
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lei Zhang 2007-07-27 14:34:27 UTC
I'm trying to use xdg-desktop-menu to add menu items to a directory under one of the top level menus.

I ran the command:

xdg-desktop-menu install --novendor --mode system /usr/share/desktop-directories/Games.directory bar.directory bar.desktop

On this system, some third party software package created /usr/share/gnome/apps, so xdg-desktop-menu put a bar.desktop file there, with "OnlyShowIn=Old;" Gnome seems to ignore this, and thus we get a second menu entry.
(see screenshot: http://linux.ucla.edu/~leiz/freedesktop/duplicate_menu.png)

My proposed solution is to ignore /usr/share/gnome/apps if we detect a version of Gnome that knows about .desktop files in $XDG_DATA_DIRS/applications/. I'm guessing Gnome 2.8 and up, but I could be wrong.
Comment 1 Lei Zhang 2007-07-27 14:35:36 UTC
Created attachment 10904 [details]
.desktop file added to the menu
Comment 2 Lei Zhang 2007-07-27 14:35:59 UTC
Created attachment 10905 [details]
.directory file
Comment 3 Lei Zhang 2007-07-27 14:36:48 UTC
Created attachment 10906 [details]
Comment 4 Lei Zhang 2007-07-27 14:40:21 UTC
Created attachment 10907 [details] [review]
proposed patch

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.