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.
Created attachment 10904 [details]
.desktop file added to the menu
Created attachment 10905 [details]
Created attachment 10906 [details]
Created attachment 10907 [details] [review]
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/18.