! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Inverted priority of xdg data directories
Status:
RESOLVED: FIXED

Comments

Description Lionel Le Folgoc 2011-01-25 21:21:27 CET
Created attachment 3422 
Proposed patch

Hi,

With garcon 0.1.5, if I set up the following:
* XDG_DATA_DIRS=/usr/share/xubuntu/:/usr/local/share/:/usr/share/
* foo.desktop in /usr/share/applications which is the real desktop file
* foo.desktop in /usr/share/xubuntu/applications which contains "Hidden=true" to hide this desktop file.

"Foo" shouldn't appear in the menu, but is still there, except if I put it in $XDG_DATA_HOME/applications.

However, it's okay for XDG_CONFIG_DIRS.

So, in garcon-menu-merger.c, it seems directories are not inserted in the correct order ; currently, I obtain:
* /usr/share/xubuntu/applications < /usr/local/share/applications < /usr/share/applications < $XDG_DATA_HOME/applications
 but according to the xdg spec, it should be:
* /usr/share/applications < /usr/local/share/applications < /usr/share/xubuntu/applications < $XDG_DATA_HOME/applications

The attached patch fixes this priority issue for me.
Thanks.
Comment 1 Lionel Le Folgoc 2011-03-13 23:56:51 CET
My patch is clearly wrong, it inserts dirs at the wrong position, especially the user data dir…
New patch coming.
Comment 2 Lionel Le Folgoc 2011-03-14 00:30:44 CET
Created attachment 3562 
Proposed patch (fixed)

New attempt. This one should work correctly.
Comment 3 Lionel Le Folgoc 2011-04-06 19:49:13 CEST
It seems it was committed in 5e0525c346064f88159535f64b8e92caa77f97fd. Thanks ;-)
Comment 4 Leho Kraav 2011-04-08 20:31:23 CEST
http://wiki.xfce.org/releng/4.8/prioritybugs#core should probably be updated respectively?
Comment 5 Jannis Pohlmann editbugs 2011-04-08 20:36:29 CEST
Done. Thanks for the hint.

Bug #7187

Reported by:
Lionel Le Folgoc
Reported on: 2011-01-25
Last modified on: 2011-04-08

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Proposed patch (479 bytes, patch)
2011-01-25 21:21 CET , Lionel Le Folgoc
no flags
Proposed patch (fixed) (2.08 KB, patch)
2011-03-14 00:30 CET , Lionel Le Folgoc
no flags

Additional information