Bug 168304 - 3rd party application shows up in multiple menus
3rd party application shows up in multiple menus
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: redhat-menus (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-14 14:34 EDT by Robert Minsk
Modified: 2012-06-20 11:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 11:53:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Robert Minsk 2005-09-14 14:34:57 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050910 CentOS/1.0.6-1.4.2.centos4 Firefox/1.0.6

Description of problem:
Using kde (3.3.1)

According to http://standards.freedesktop.org/menu-spec/menu-spec-latest.html I should be putting my ".menu" files in /etc/xdg/menus/applications-merged.  My menu file is at the bottom of the message.  According to the spec the line <DefaultMergeDirs/> in applications.menu is reading in my menu.  This is working as expected.  The problem is that it is also showing up under the "Preferences",  "System Settings", and "System Settings -> Server Settings" menu.

The reason this is happening for the "Preferences" menu is that applications.menu is doing a <MergeFile>preferences.menu</MergeFile> and in preferences.menu it is calling <DefaultMergeDirs/>.  The <DefaultMergeDirs/> in the preferences.menu is causing it to appear in the preferences menu.

For the "System Settings" menu the same thing is happening but with the file system-settings.menu.  For "Systems Settings -> Server Settings", system-settings.menu is calling <MergeFile>server-settings.menu</MergeFile> and server-settings.menu is again calling <DefaultMergeDirs/>.

A fix would be to remove the calls to <DefaultMergeDirs/> from preferences.menu, system-settings.menu, and server-settings.menu.  Should the calls to <LegacyDir>, <DefaultAppDirs/>, and <DefaultDirectoryDirs/> be removed for the same reason?

The following files have been modified to work as a standalone example
/etc/xdg/menus/applications-merged/rush.menu:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
 <Menu>
  <Name>Rush</Name>
  <Directory>Rush.directory</Directory>

  <AppDir>/usr/local/rush/etc/desktop/applications</AppDir>
  <DirectoryDir>/usr/local/rush/etc/desktop/directories</DirectoryDir>

  <Include>
   <And>
    <Category>X-Rush</Category>
   </And>
  </Include>
 </Menu>
</Menu>

My Rush.directory (/usr/local/rush/etc/desktop/directories/Rush.directory):
Name=Rush
Comment=Rush Render Queue
Icon=firefox.png
Type=Directory

And one of my .desktop (/usr/local/rush/etc/desktop/applications/irush.desktop) files is:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=irush
GenericName=Rush GUI
TryExec=/bin/true
Exec=/bin/true
Terminal=false
StartupNotify=false
Icon=firefox.png
Categories=Application;X-Rush
X-KDE-SubstituteUID=false


Version-Release number of selected component (if applicable):
redhat-menus-3.7.1-2

How reproducible:
Always

Steps to Reproduce:
1. Read the above desription


Actual Results:  My application appeared in the "Preferences",  "System Settings", and "System Settings -> Server Settings" menu.

Expected Results:  It should have not been in the menus.

Additional info:
Comment 1 Robert Minsk 2005-09-14 15:28:22 EDT
After reading some more bugs this is related to
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127082#c1
It seems they came too the same conclusion that removing <DefaultMergeDirs/>,
<LegacyDir>, <DefaultAppDirs/>, and <DefaultDirectoryDirs/> from
preferences.menu, system-settings.menu, and server-settings.menu.
Comment 2 Robert Minsk 2005-09-14 15:38:24 EDT
Also related to https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141514
Comment 3 Robert Minsk 2005-09-14 17:50:22 EDT
Sorry for all the comments.  Reading thru
http://standards.freedesktop.org/menu-spec/menu-spec-latest.html again it seems
like this could be a bug in how <MergeFile> is handled.  It is not quite clear
in the spec if <DefaultMergeDirs> should still be looking at applications-merged
or preferences-merged (system-settings-merged server-settings-merged).  The
behavior right now is to look in applications-merged but it would be much more
powerful to look at "menu-file-basename"-merged.

From the other bugs referenced it is correct that preferences, system-settings,
and server-settings should not be calling
<LegacyDir>/usr/share/gnome/apps</LegacyDir> and
<LegacyDir>/etc/X11/applnk</LegacyDir>.  It is ok that preferences is calling
<LegacyDir>/usr/share/control-center-2.0/capplets/</LegacyDir> and
<LegacyDir>/usr/share/gnome/capplets/</LegacyDir> since they are specific to
that menu.
Comment 4 Robert Minsk 2005-09-14 19:17:44 EDT
BTW, the parsing of this menu files is in
http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/kded/html/vfolder__menu_8cpp-source.html
Comment 5 Jiri Pallich 2012-06-20 11:53:30 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

Note You need to log in before you can comment on or make changes to this bug.