Bug 369646

Summary: The 'free' menu in Dolphin's status bar incorrectly lists KDE Partition Manager as not installed
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: João Vidal da Silva <joao.vidal.silva>
Component: generalAssignee: Jeremy Whiting <jpwhiting>
Status: RESOLVED FIXED    
Severity: minor CC: andrius, clintonthegeek, codestruct, elvis.angelaccio, kdelibs-bugs, nate, p.r.worrall, simonandric5, tuxfusion
Priority: NOR    
Version: 5.27.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=384682
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description João Vidal da Silva 2016-10-02 18:10:02 UTC
I just recently (and by accident) found the nice feature of disk and device usage statistics present in Dolphin.
The 'free' word in Dolphin's status bar gives access to this feature and also lists a series of gui partition managers, showing all as not installed. But, in my case, KDE Partition Manager is installed.
This bug doesn't really bug me.

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin
2. Left-click the 'free' word in the bottom right of the status bar to popup the menu
3. Move the mouse over to 'More'
4. KDE Partition Manager is listed as not installed even when it is
Comment 1 Elvis Angelaccio 2016-10-25 11:19:59 UTC
The bug also affects e.g. filelight. This was initially a bug in KService (https://bugs.kde.org/show_bug.cgi?id=344614), but then Dolphin changed the implementation and moved to a KNewStuff menu. So now this could be a bug in KNewStuff.
I'm adding Gregor (who added this feature) in CC, he might know more.
Comment 2 Gregor Mi 2016-11-06 19:27:37 UTC
Thanks for the bug report.

Your accidental discovery of the feature tells me that the feature should be presented in a more obvious way.

To analyse the problem I did this to see if and where the .desktop file is installed:

$ rpm -ql partitionmanager5

/opt/kf5/bin/partitionmanager
/opt/kf5/share/appdata/org.kde.PartitionManager.appdata.xml
/opt/kf5/share/applications/org.kde.PartitionManager.desktop
/opt/kf5/share/config.kcfg
/opt/kf5/share/config.kcfg/partitionmanager.kcfg
/opt/kf5/share/icons/hicolor/scalable/apps/partitionmanager.svg
/opt/kf5/share/kxmlgui5/partitionmanager
/opt/kf5/share/kxmlgui5/partitionmanager/partitionmanagerui.rc


In line https://lxr.kde.org/source/frameworks/knewstuff/src/kmoretools/kmoretoolspresets.cpp:133 you see

dict.insert(_("disk-partitions"), { _("gparted"), _("org.kde.PartitionManager"), _("disk") });

This means a desktop file with name "org.kde.PartitionManager" is expected which is the case in my case. But on my maschine the KDE PartitionManager is also shown as "not installed".

So at first glance I cannot see the problem's cause.

Maybe the cause is that partitionmanager is now the KF5 version which is located in the /opt/kf5/... directory?

The "Name" in the desktop file has changed (see https://lxr.kde.org/source/frameworks/knewstuff/data/kmoretools-desktopfiles/org.kde.PartitionManager.desktop ("Name=KDE Partition Manager") vs. the installed one ("Name=KDE Partition Manager/KF5")) but this should not be the cause.
Comment 3 Elvis Angelaccio 2016-11-07 10:01:11 UTC
I'd say let's move this to KNewStuff, since it's where this menu is created.
Comment 4 Andrius Štikonas 2016-11-08 17:38:26 UTC
(In reply to Gregor Mi from comment #2)

> Maybe the cause is that partitionmanager is now the KF5 version which is
> located in the /opt/kf5/... directory?

On my system partitionmanager is installed into /usr and it is still listed as not installed.

P.S. I also didn't know about this hidden feature in dolphin before seeing this bug.
Comment 5 João Vidal da Silva 2016-11-08 20:43:48 UTC
(In reply to Gregor Mi from comment #2)

> /opt/kf5/share/applications/org.kde.PartitionManager.desktop
> (...)
> Maybe the cause is that partitionmanager is now the KF5 version which is
> located in the /opt/kf5/... directory?
> (...)
> The "Name" in the desktop file has changed (see
> https://lxr.kde.org/source/frameworks/knewstuff/data/kmoretools-desktopfiles/
> org.kde.PartitionManager.desktop ("Name=KDE Partition Manager") vs. the
> installed one ("Name=KDE Partition Manager/KF5")) but this should not be the
> cause.

I'm running Manjaro, an Arch based distro, and just as with Andrius Štikonas both desktop files (org.kde.PartitionManager.desktop from partitionmanager and from knewstuff) are locate at /usr/share/... and both have Name=KDE Partition Manager.
Comment 6 Elvis Angelaccio 2017-01-07 14:53:03 UTC
*** Bug 374683 has been marked as a duplicate of this bug. ***
Comment 7 Gregor Mi 2017-08-03 22:09:07 UTC
The desktop file name changed to lower case from
/usr/share/applications/org.kde.PartitionManager.desktop to
/usr/share/applications/org.kde.partitionmanager.desktop

I'll provide a patch.
Comment 8 Christoph Feck 2017-08-23 11:09:39 UTC
Gregor, any progress with comment #7?
Comment 9 Gregor Mi 2017-08-23 11:25:18 UTC
The patch is ready at https://phabricator.kde.org/D7130. Someone needs to have a final look and give a Ship it.
Comment 10 Nate Graham 2017-09-02 21:54:22 UTC
*** Bug 380326 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2017-10-15 21:20:18 UTC
Git commit 7d3992479ea1e7a2ad523a79c73434c44c61f38c by Nathaniel Graham, on behalf of Gregor Mi.
Committed on 15/10/2017 at 21:20.
Pushed by ngraham into branch 'master'.

KMoreTools: Update and fix desktopfiles

Summary:

Updates to KMoreTools:
- add minor code comments and update developer README
- update desktop files including fix for PartitionManager and KDiskFree
- add a script to easily update the desktop files
- add FSearch and AngrySearch to search tools
- add new grouping "screenrecorder" with Peek and Simples Screen Recorder
- add new grouping "mouse-tools"
- add new grouping "font-tools"
- add new grouping "language-dictionary"

The change is so big because of the update desktop files. The interface did not change.

Reviewers: ltoscano, elvisangelaccio, #kde_applications, davidedmundson, ngraham

Reviewed By: elvisangelaccio, ngraham

Subscribers: ngraham, ltoscano, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D7130

M  +2    -2    autotests/kmoretools/kmoretoolstest.cpp
M  +4    -0    autotests/kmoretools/kmoretoolstest2.cpp
M  +17   -7    data/kmoretools-desktopfiles/_INFO
A  +62   -0    data/kmoretools-desktopfiles/_update_all_files.sh
A  +9    -0    data/kmoretools-desktopfiles/angrysearch.desktop
M  +88   -84   data/kmoretools-desktopfiles/catfish.desktop
A  +77   -0    data/kmoretools-desktopfiles/com.uploadedlobster.peek.desktop
A  +7    -0    data/kmoretools-desktopfiles/ding.desktop
M  +1    -77   data/kmoretools-desktopfiles/disk.desktop
D  +-    --    data/kmoretools-desktopfiles/filelight.png
A  +32   -0    data/kmoretools-desktopfiles/filelight.svg
A  +159  -0    data/kmoretools-desktopfiles/fontinst.desktop
A  +20   -0    data/kmoretools-desktopfiles/fontmatrix.desktop
A  +15   -0    data/kmoretools-desktopfiles/fsearch.desktop
M  +24   -94   data/kmoretools-desktopfiles/giggle.desktop
M  +0    -38   data/kmoretools-desktopfiles/git-cola-folder-handler.desktop
M  +1    -73   data/kmoretools-desktopfiles/git-cola.desktop
M  +56   -82   data/kmoretools-desktopfiles/gitg.desktop
M  +144  -64   data/kmoretools-desktopfiles/gnome-search-tool.desktop
M  +176  -75   data/kmoretools-desktopfiles/gparted.desktop
A  +161  -0    data/kmoretools-desktopfiles/gucharmap.desktop
M  +3    -64   data/kmoretools-desktopfiles/htop.desktop
D  +0    -87   data/kmoretools-desktopfiles/kdf.desktop
A  +13   -0    data/kmoretools-desktopfiles/kding.desktop
D  +0    -127  data/kmoretools-desktopfiles/ksystemlog.desktop
M  +304  -102  data/kmoretools-desktopfiles/org.gnome.clocks.desktop [TRAILING SPACE] **
M  +71   -29   data/kmoretools-desktopfiles/org.kde.filelight.desktop
A  +156  -0    data/kmoretools-desktopfiles/org.kde.kcharselect.desktop [TRAILING SPACE] ** [TRAILING SPACE] **
A  +151  -0    data/kmoretools-desktopfiles/org.kde.kdf.desktop [TRAILING SPACE] ** [TRAILING SPACE] **
M  +68   -36   data/kmoretools-desktopfiles/org.kde.kfind.desktop
A  +219  -0    data/kmoretools-desktopfiles/org.kde.kmousetool.desktop
D  +0    -89   data/kmoretools-desktopfiles/org.kde.kscreengenie.desktop
D  +0    -90   data/kmoretools-desktopfiles/org.kde.ksnapshot.desktop
M  +139  -13   data/kmoretools-desktopfiles/org.kde.ksysguard.desktop
A  +188  -0    data/kmoretools-desktopfiles/org.kde.ksystemlog.desktop
M  +74   -12   data/kmoretools-desktopfiles/org.kde.ktimer.desktop
R  +67   -33   data/kmoretools-desktopfiles/org.kde.partitionmanager.desktop [from: data/kmoretools-desktopfiles/org.kde.PartitionManager.desktop - 052% similarity]
A  +252  -0    data/kmoretools-desktopfiles/org.kde.spectacle.desktop
M  +60   -113  data/kmoretools-desktopfiles/shutter.desktop
M  +3841 -245  data/kmoretools-desktopfiles/shutter.svg
A  +11   -0    data/kmoretools-desktopfiles/simplescreenrecorder.desktop
M  +102  -74   data/kmoretools-desktopfiles/xfce4-taskmanager.desktop
M  +31   -17   src/kmoretools/kmoretoolspresets.cpp
M  +13   -1    src/kmoretools/kmoretoolspresets.h
M  +17   -4    tests/kmoretools/kmoretoolstest_interactive.cpp

The files marked with ** at the end have a problem. either the file contains a trailing space or the file contains a call to a potentially dangerous code. Please read: http://community.kde.org/Sysadmin/CommitHooks#Email_notifications Either fix the trailing space or review the dangerous code.


https://commits.kde.org/knewstuff/7d3992479ea1e7a2ad523a79c73434c44c61f38c
Comment 12 Nate Graham 2017-10-17 01:27:12 UTC
*** Bug 384682 has been marked as a duplicate of this bug. ***