GNOME Bugzilla – Bug 164309
Directory file overides are ignore.
Last modified: 2005-03-08 19:38:26 UTC
Please describe the problem: If you put your custom version of "Applications.directory" into "~/.local/share/desktop-directories" to override the settings made in "/usr/share/desktop-directories/Applications.directory", the user-local version is loaded (as setting "MENU_VERBOSE" shows), but later replaced by system-global version. As far as I understand the menu-spec this is wrong. Steps to reproduce: 1. mkdir ~/.local/share/desktop-directories 2. cp /usr/share/desktop-directories/Applications.directory ~/.local/share/desktop-directories 3. sed -ie 's/^Name=Applications/Name=Foobar/' 4. load "applications.menu" and print out the result of "menu_tree_directory_get_name(root)" Actual results: Applications Expected results: Foobar Does this happen every time? Yes Other information:
Guess the problem is in "entry-directories.c" in the function "cached_dir_add_entry": As far as I understand the specification, desktop-items shall be uniquely identified by their "basename". Therefore "cached_dir_add_entry" should check, if the CachedDir already contains some other DesktopEntry with the same basename as the new entry. If the new entries filename is of higher priority than the old entries, the old entry should be removed. If the priority of the new entry is lower, it should be silently dropped. Btw: You do many lookups within the CachedDir on basis of the basename, so why do you use some single linked list instead of some GHashTable using the basename of key, for storing the desktop entries? Btw2: I am able to fix this issue, so if you agree on the problem feel free to delegate the work on me.
Fix will be in 2.10.1. Thanks much 2005-03-08 Mark McLoughlin <mark@skynet.ie> Fix for bug #164309 - .directory files in ~/.local/share/desktop-directories not overriding the system versions. * libmenu/menu-tree.c: (resolve_default_app_dirs), (resolve_default_directory_dirs), (resolve_kde_legacy_dirs): append the user dir after the system dirs since it has higher priority.