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 167934 - LegacyDir doesn't work if .desktop doesn't have any Categories entry
LegacyDir doesn't work if .desktop doesn't have any Categories entry
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.9.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
: 169235 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-02-20 07:31 UTC by Jeremy Messenger
Modified: 2005-03-23 21:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
fix-legacy-dirs.patch (1.81 KB, patch)
2005-03-01 17:32 UTC, Mark McLoughlin
none Details | Review

Description Jeremy Messenger 2005-02-20 07:31:06 UTC
Distribution/Version: 5.3-STABLE

Add a new foobar.desktop that looks like this:

================================
[Desktop Entry]
Name=FooBar
Comment=Web Browser
Exec=foobar
Icon=foobar.xpm
Terminal=0
Type=Application
================================

Then put it in ${prefix}/share/gnome/apps/Internet or applnk/Internet or wherever in your system. 
As for mine is in /usr/X11R6/share/gnome/apps/Internet in FreeBSD. In my applications.menu 
has looks like this:

================================
  <!-- Scan legacy dirs first, as later items take priority -->
  <KDELegacyDirs/>
  <LegacyDir>/etc/X11/applnk</LegacyDir>
  <LegacyDir>/usr/X11R6/share/gnome/apps</LegacyDir>
================================

Restart gnome-panel and an icon has never appear in menu unless I add 
'Categories=Application;Network;WebBrowser;' in the foobar.desktop to make it appear in the 
menu.

Before, you ask for run it in MENU_VERBOSE=1, I already have it here in url for you to download 
it.

http://people.freebsd.org/~mezz/debug.txt.bz2
Comment 1 Mark McLoughlin 2005-03-01 17:32:19 UTC
Created attachment 38108 [details] [review]
fix-legacy-dirs.patch

This seems to fix it for me.

(Incidently, your debug log doesn't seem to be from when you had foobar.desktop
in your tree. Thanks, though)
Comment 2 Jeremy Messenger 2005-03-01 18:54:37 UTC
Sorry, the 'foobar.desktop' was just an example.. As for in the log, it has several, so you can check 
for linux-opera.desktop or pan.desktop.

Thanks for patch, I am going to test it this afternoon! If you believe it's fixed, go ahead mark it as 
fixed.
Comment 3 Jeremy Messenger 2005-03-02 02:37:17 UTC
ok, tested patch and it doesn't solve.
Comment 4 Mark McLoughlin 2005-03-02 18:40:58 UTC
Thanks. I'm going to need another debug log using gnome-menus 2.9.2, the patch
and MENU_VERBOSE=1

Comment 5 Mark McLoughlin 2005-03-08 17:58:31 UTC
Okay, I'm going to assume it did in fact fix your problem :-)

If you can reproduce with CVS HEAD (or GNOME 2.10.1 when it comes out) or can
give me a debug log with 2.9.2 (or 2.10.0) with the patch applied, then please
do re-open.

2005-03-08  Mark McLoughlin  <mark@skynet.ie>

        Should fix bug #167934 even though the reporter
        says it doesn't :-)

        Well, this at least fixes a problem with <LegacyDir>
        if the toplevel directory doesn't contain any entries.

        * libmenu/menu-tree.c: (add_menu_for_legacy_dir):
        Add a <Menu> for the <LegacyDir> if it has any subdirs.

Comment 6 Mark McLoughlin 2005-03-08 18:02:28 UTC
*** Bug 169235 has been marked as a duplicate of this bug. ***
Comment 7 Jeremy Messenger 2005-03-23 21:58:49 UTC
It's fixed in the 2.10.1 tarball, thanks!