Bug 1633

Summary: Qelectrotech is three times in the menu
Product: Mageia Reporter: Manuel Hiebel <manuel.mageia>
Component: RPM PackagesAssignee: Anssi Hannula <anssi.hannula>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: balcaen.john, dmorganec, jani.valimaa, marja11, pterjan, stormi-mageia
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: desktop-common-data-2-0.1.mga2.src.rpm CVE:
Status comment:
Attachments: screenshot of the GNOME menu

Description Manuel Hiebel 2011-06-06 10:53:05 CEST
Description of problem:
Qelectrotech is three times in the menu

in french:
educatif/sciences/./ ; sciences/./ ; sciences/autres/./

translate: educational/sciences/./ ; sciences/./; sciences/other/./

(in the /./)
Comment 1 John Balcaen 2011-06-08 19:46:01 CEST
After a second look on the desktop file it seems that we do have a validate desktop file first:
upstream provides initially
Categoeries=Office;Qt;VectorGraphics;Education;Science;Electricity;Engineering;

We're patching the desktop file because of ( http://standards.freedesktop.org/menu-spec/latest/apa.html )
to have a final


+Categories=Office;Qt;Graphics;2DGraphics;VectorGraphics;Education;Science;Electricity;Engineering;

So the problem is probably more in our implementation than in the qelectrotech package.

CC: (none) => balcaen.john

Comment 2 Manuel Hiebel 2011-06-08 20:24:30 CEST
ok, it's the same with celestia, gnu octave or qtoctave :)

Source RPM: qelectrotech-0.22-3.mga1.src.rpm => (none)

Comment 3 Pascal Terjan 2011-06-08 20:52:28 CEST
I only have it in science and education.

What is your environment? Having anything under both foo and foo/more is a bug.

CC: (none) => pterjan
Source RPM: (none) => qelectrotech-0.22-3.mga1.src.rpm

Comment 4 John Balcaen 2011-06-08 21:23:21 CEST
i can reproduce it on xfce & kde.
I did not try on gnome since i « wrongly updated it to the last gnome3 :D »
Comment 5 Manuel Hiebel 2011-06-08 22:47:25 CEST
Created attachment 538 [details]
screenshot of the GNOME menu
Comment 6 Pascal Terjan 2011-06-08 22:54:53 CEST
Hmm It does not happen here.
Comment 7 Samuel Verschelde 2011-10-01 03:29:06 CEST
Assigning to maintainer now that our maintainers database has an entry for
this package. Please assign back to bugsquad@mageia.org in case of a mistake
from me.

CC: (none) => stormi
Assignee: bugsquad => balcaen.john

Comment 8 John Balcaen 2011-10-01 03:45:02 CEST
the bug is not in qelectrotech (the desktop file is valid) but probably more in desktop-common-data (our menu implementation).

Assignee: balcaen.john => bugsquad
Source RPM: qelectrotech-0.22-3.mga1.src.rpm => desktop-common-data-1-13.mga2.src.rpm

Comment 9 Marja Van Waes 2011-12-03 13:04:56 CET
Is this bug still valid with desktop-common-data-2-0.1.mga2.src.rpm

Keywords: (none) => NEEDINFO
CC: (none) => dmorganec, marja11

Comment 10 Manuel Hiebel 2011-12-03 22:31:02 CET
Yes still valid in cauldron
Marja Van Waes 2011-12-03 22:37:45 CET

Keywords: NEEDINFO => (none)
Assignee: bugsquad => dmorganec
Source RPM: desktop-common-data-1-13.mga2.src.rpm => desktop-common-data-2-0.1.mga2.src.rpm

Comment 11 Marja Van Waes 2011-12-03 22:39:01 CET
Just assigned to maintainer of desktop-common-data
Comment 12 Anssi Hannula 2011-12-04 22:25:48 CET
I'm just working on some menu issues of desktop-common-data, so I'll fix this now as well.

Status: NEW => ASSIGNED
Assignee: dmorganec => anssi.hannula

Comment 13 Anssi Hannula 2011-12-05 01:45:17 CET
Adding Jani Välimaa to CC (he is the last one to alter Categories of qelectrotech.desktop)

Some duplicates (there are 5 on my system) are caused by desktop-common-data and some by qelectrotech.desktop.

The desktop-common-data bugs caused it to show up in
- Education -> Science
- Science
- Science -> Other

while it should only (AFAICS) be shown in one of those. I chose to get rid of "Science -> Other" (note: this is not the famous "More") and put the entries that used to be here to "Science" instead.
Additionally, I altered "Education -> Science" to not show any entries that are already elsewhere (i.e. in e.g. "Science").

As per fd.o menu specification [1], if a desktop entry file specifies multiple Main Categories, it "may appear more than once in the menu."

Since qelectrotech.desktop defines three main categories (Office, Graphics, and Education), it appears in the menu three times (and one of those is triplicated by desktop-common-data bug).

Of course, we could alter desktop-common-data to only show it in one of those as a special case, but we should (IMO) only add special cases for cases that make sense.

In this case, I'd hardly categorize QElectroTech as an Office or Education tool, but clearly a Graphics one.

Therefore I'm changing Categories from:
Categories=Office;Qt;Graphics;2DGraphics;VectorGraphics;Education;Science;Electricity;Engineering;
to:
Categories=Qt;Graphics;2DGraphics;VectorGraphics;Electronics;

IOW, I'm dropping Office, Education, Science, Electricity, Engineering that are not very relevant to this application. Also, I'm adding "Electronics" since specification includes that Category for this very purpose.

Note also, for the record, that if a .desktop file defines some Category, but doesn't include the related Main Category, that is not a problem as long as _some_ Main Category is included in the Categories line. It is usually even better to not add multiple Main Categories (unless they are all equally relevant) to avoid having the application appear in multiple menus.
(it looks like in this case more Main Categories were added "just because")

[1] http://standards.freedesktop.org/menu-spec/latest/apa.html

CC: (none) => jani.valimaa

Comment 14 Anssi Hannula 2011-12-05 18:10:35 CET
Fixed in 0.22-4.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED