! 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 !
Some items appear in two categories
Status:
RESOLVED: WONTFIX
Product:
Libxfce4menu
Component:
General

Comments

Description Jérôme Guelfucci editbugs 2008-09-01 08:48:48 CEST
Some items appear in the System menu and in the Settings menu, which clutters the menu.

Here are two examples of .desktop files for which the bug occurs:

[Desktop Entry]
Name=Synaptic Package Manager
Exec=gksu /usr/sbin/synaptic
Icon=synaptic.png
Terminal=false
MultipleArgs=false
Type=Application
Encoding=UTF-8
Categories=PackageManager;Applications;GTK;System;Settings
NotShowIn=KDE
X-KDE-SubstituteUID=true
X-Ubuntu-Gettext-Domain=synaptic

[Desktop Entry]
Name=Network
Exec=network-admin
Icon=preferences-system-network
Terminal=false
Type=Application
Categories=GNOME;GTK;System;Settings;X-GNOME-NetworkSettings;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-system-tools
X-GNOME-Bugzilla-Component=network-admin
X-GNOME-Bugzilla-Version=2.22.0
StartupNotify=true
Encoding=UTF-8
X-Ubuntu-Gettext-Domain=gnome-system-tools

I removed all the localised Comment[whatever] fields to shorten the length of the files.
Comment 1 Jannis Pohlmann editbugs 2009-02-01 23:16:19 CET
Created attachment 2142 
Patch to exclude settings items from appearing in in the System menu

> Some items appear in the System menu and in the Settings menu, which clutters
> the menu.
> 
> Here are two examples of .desktop files for which the bug occurs:

(snip)

> Categories=PackageManager;Applications;GTK;System;Settings

From the menu specification: "If multiple Main Categories are included in a single desktop entry file, the entry may appear more than once in the menu." 

"System" and "Settings" are both main categories, so this isn't really a bug. However, I think we don't have to list these items twice. Unfortunately I don't seem to have commit permissions for xfdesktop, so all I can do is attach a patch to fix it and to assign the bug to Brian.
Comment 2 Brian J. Tarricone (not reading bugmail) 2009-02-02 06:07:10 CET
That's not a particularly good fix.  Is there a way to specify in the menu file effectively "don't doubly-allocate any desktop files"?  Cuz this is just a single-case specific hack; I'm not committing that...

Really, though, I'm not convinced I want to change this.  If a .desktop file specifies more than one category, who are we to decide which one to allow it to be in?  If the end user wants it in only one submenu, they should write a custom menu file to remove it from the one they don't want it in.  Of course, we don't have a menu editor, and writing menu files is a pain... but I don't want stupid hacks in there.
Comment 3 Jannis Pohlmann editbugs 2009-02-04 00:02:08 CET
(In reply to comment #2)
> That's not a particularly good fix.  Is there a way to specify in the menu file
> effectively "don't doubly-allocate any desktop files"?  Cuz this is just a
> single-case specific hack; I'm not committing that...

Sure, just add <OnlyUnallocated/> to all <Menu> elements.

Bug #4343

Reported by:
Jérôme Guelfucci
Reported on: 2008-09-01
Last modified on: 2009-07-14

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Additional information