After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 164309 - Directory file overides are ignore.
Directory file overides are ignore.
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.9.x
Other All
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2005-01-17 01:59 UTC by Mathias Hasselmann (IRC: tbf)
Modified: 2005-03-08 19:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Mathias Hasselmann (IRC: tbf) 2005-01-17 01:59:56 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:
Comment 1 Mathias Hasselmann (IRC: tbf) 2005-01-17 02:16:31 UTC
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.
Comment 2 Mark McLoughlin 2005-03-08 19:38:26 UTC
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.