Use X-KDE-NoGlobalShortcut instead of NoDisplay to store that a component is disabled
AbandonedPublic

Authored by meven on Oct 31 2019, 11:45 AM.

Details

Reviewers
broulik
apol
Group Reviewers
Plasma
Summary

Needed to allow apps to not be visible in menus but have shortcuts (i.e Krunner)
Using NoDisplay to store that a component is disabled conflics with the meaning of NoDisplay.
This is problem in Wayland as this platforms induces more desktop files to allow usage of KDE Wayland protocols and settings app icons for instance.

Relates to D24857

Diff Detail

Repository
R268 KGlobalAccel
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18386
Build 18404: arc lint + arc unit
meven created this revision.Oct 31 2019, 11:45 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 31 2019, 11:45 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Oct 31 2019, 11:45 AM
davidedmundson added inline comments.
src/runtime/kserviceactioncomponent.cpp
36

I don't think I follow.

We're editing the .desktop file inside {XDG_DATA_DIRS}/kglobalaccel/someName.desktop
The menu only reads from XDG_DATA_DIRS/applications/someName.desktop

where's the conflict?

meven added inline comments.Oct 31 2019, 2:01 PM
src/runtime/kserviceactioncomponent.cpp
36

Because usually the desktop files are copies of the same as applications :
install( DIRECTORY DESTINATION "${KDE_INSTALL_FULL_DATAROOTDIR}/kglobalaccel" )

So if you need to "NoDisplay" an app for krunner for instance, you also disable its shortcuts because the desktop files are copies of each other at installation.

FYI XDG_DATA_DIRS is deprecated

davidre added inline comments.
src/runtime/kserviceactioncomponent.cpp
36

Related to this discussion the KCM copies the desktop file to .local/share/kglobalaccel if you add one with the plus button. (As does D25086)

meven abandoned this revision.Apr 24 2020, 12:41 PM

D28856 should be preferred