Consider desktop files with NoDisplay attribute
Needs ReviewPublic

Authored by meven on Sat, Oct 26, 7:14 AM.

Details

Reviewers
mart
fvogt
apol
Group Reviewers
Plasma
Summary
NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff).

https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

NoDisplay specify to ignore desktop files with no Display in menus. It specifically states that mimetype are a case where an app might be associated with one, but not shown in the menus.
Shortcuts should be treated the same as mimetype association.

To allow cases such as Krunner, where the app won't be in the menu but still needs shortcuts.
Related: D24857

Diff Detail

Repository
R268 KGlobalAccel
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18184
Build 18202: arc lint + arc unit
meven created this revision.Sat, Oct 26, 7:14 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSat, Oct 26, 7:14 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Sat, Oct 26, 7:14 AM
meven added a comment.Sat, Oct 26, 7:16 AM

This was added previously in D2103

I think you have also to check the the kcm as i also saw some nodisplay there.
Also it seems kglobalaccel uses nodisplay when a component is disabled. https://cgit.kde.org/kglobalaccel.git/tree/src/runtime/kserviceactioncomponent.cpp#n144

I think you have also to check the the kcm as i also saw some nodisplay there.
Also it seems kglobalaccel uses nodisplay when a component is disabled. https://cgit.kde.org/kglobalaccel.git/tree/src/runtime/kserviceactioncomponent.cpp#n144

It should probably use a custom field in the desktop file like X-KDE-Shortcuts-disable=true or similiar.