Bug 19532 - plasma5 puts Documentation package under tools->system tools
Summary: plasma5 puts Documentation package under tools->system tools
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job
Depends on:
Blocks:
 
Reported: 2016-10-04 22:36 CEST by Barry Jackson
Modified: 2021-05-17 01:15 CEST (History)
6 users (show)

See Also:
Source RPM: plasma-workspace
CVE:
Status comment:


Attachments

Description Barry Jackson 2016-10-04 22:36:16 CEST
Description of problem:
In KDE4 'Documentation' packages were placed in a top level 'Documentation' menu.
In plasma5 the same packages are now placed under Tools->System Tools

For example the Gnuradio documentation package which has this in the .desktop file:

Categories=System;Documentation;X-Mageia-CrossDesktop;

'System' is only there to satisfy desktop-file-validate. In my opinion xdg is totally broken as it is simply impossible to sanely categorize lots of specialist packages, but that is another issue. 

Guessing at package to blame.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Marja Van Waes 2016-10-05 10:20:48 CEST

Assignee: bugsquad => kde
CC: (none) => marja11

Nicolas Lécureuil 2017-03-19 22:55:36 CET

Keywords: (none) => Junior_job
CC: (none) => mageia

Comment 1 Barry Jackson 2017-12-14 22:49:34 CET
This is still present in Mga6 and cauldron in plasma5.
How is anyone supposed to find Documentation packages under Tools-> System Tools

Can anyone suggest a better xdg Category than:

Categories=System;Documentation;X-Mageia-CrossDesktop;

... that also passed desktop-file-validate?

This was perfectly fine in KDE4 and appeared under the 'Documentation' top level category.
Comment 2 papoteur 2018-06-17 11:23:03 CEST
(In reply to Barry Jackson from comment #1)
> This is still present in Mga6 and cauldron in plasma5.
> How is anyone supposed to find Documentation packages under Tools-> System
> Tools
> 
> Can anyone suggest a better xdg Category than:
> 
> Categories=System;Documentation;X-Mageia-CrossDesktop;
> 
> ... that also passed desktop-file-validate?
> 
> This was perfectly fine in KDE4 and appeared under the 'Documentation' top
> level category.

The problem seems to be that the top level category Documentation is not displayed.
Checked also in cauldron LXQt and Enlightment: in these environment, they are displayed in top level Other, which is not wanted, neither.

CC: (none) => yves.brungard_mageia

Comment 3 papoteur 2018-06-19 08:50:05 CEST
Yuri created this report upstream:
https://bugs.kde.org/show_bug.cgi?id=395580
Comment 4 Yuri Chornoivan 2018-06-20 19:00:04 CEST
(In reply to papoteur from comment #3)
> Yuri created this report upstream:
> https://bugs.kde.org/show_bug.cgi?id=395580

I was wrong and Barry was right.

The top-level "Documentation" item exists in fact (it is created by /usr/share/desktop-directories/mandriva-documentation.directory). To check this you can fire up the KDE menu editor.

It is just not shown because xdg "black magic" somehow puts our documentation where it is written in the title of this bug report...

So the fix to the desktop file is right but the problem is in the method of how the menu is built itself.

Categories=System;Documentation; -> Tools->System tools

Categories=Office;Documentation; -> Office

Categories=Utility;Documentation; -> Tools

It seems that there is no way to put it in "Documentation" regardless of its existence. :'(

CC: (none) => yurchor

Comment 5 Florian Hubold 2018-07-18 12:08:27 CEST
Might be a try to use X-MandrivaLinux-MoreApplications-Documentation as category. Also FWIW the main menu structure is defined in /etc/xdg/menus/applications.menu, it's not some "black magic". For KF5, /etc/xdg/menus/plasma-applications.menu is also used but it's the same for documentation.

Just tried and changed /usr/share/applications/gnuradio-doc.desktop to

Categories=System;Documentation;X-MandrivaLinux-MoreApplications-Documentation;X-Mageia-CrossDesktop; 

and directly afterwards it is also displayed in the toplevel Documentation folder.

But overall this seems pretty hacky to me, maybe this should be discussed on dev ml, because other packages should also be aware of this as most documentation packages .desktop files should be adapted to that
Or we change our main menu structure so that System;Documentation does not end up in Tools->System tools (which I believe is wrong for documentation).

CC: (none) => doktor5000

Comment 6 Martin Whitaker 2018-08-04 07:57:01 CEST
[copied from the dev- mailing list]

According to https://wiki.mageia.org/en/Packaging_guidelines#Desktop_files, the X-MandrivaLinux-* categories are deprecated and should no longer be used.

In /etc/xdg/menus/applications.menu, the top level Documentation category includes are

    <Include>
      <And>
        <Category>X-MandrivaLinux-MoreApplications-Documentation</Category>
        <Category>Documentation</Category>
        <Not>
          <Category>LXQt</Category>
        </Not>
      </And>
    </Include>

so only applications that have the deprecated X-MandrivaLinux-MoreApplications-Documentation tag as well as the Documentation tag will be included. In /etc/xdg/menus/xfce-applications.menu however, the top level Documentation category includes are

    <Include>
      <Category>X-MandrivaLinux-MoreApplications-Documentation</Category>
      <Category>Documentation</Category>
    </Include>

so any application that has either of those tags will be included, which is why the MCC documentation appears in the top level Documentation menu in Xfce.

Currently the MCC documentation doesn't appear in any menu in DEs other than Xfce because it doesn't include a registered main category. We can at least fix that by changing

  Categories: Documentation;

to

  Categories: System;Documentation;

If it is desired that all documentation appears in a top level Documentation menu, /etc/xdg/menus/applications.menu should be changed, along with any other DE-specific menu specifications.

CC: (none) => mageia

Comment 7 Aurelien Oudelet 2021-05-17 01:15:18 CEST
Users who have experienced this problem are encouraged to upgrade to the latest update of their distribution, and if this issue turns out to still be reproducible in the latest update, please reopen this bug with additional information.

Closing as OLD.

Status: NEW => RESOLVED
Resolution: (none) => OLD


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