[RFC][Global Shortcuts KCM] Categorize into Applications and System Services
AbandonedPublic

Authored by davidre on Nov 4 2019, 6:04 PM.

Details

Reviewers
mlaurent
ngraham
Group Reviewers
Plasma
Summary

Currently the shortcuts are divided into two lists. "Application Launchers" for
shortcuts added via .desktop files (actually components with names that end in
".desktop") and "Other Shortcuts" for everything else. This not only exposes an
implementation detail but also is not helpful to the average user who doesn't
know what is meant with "Application Launcher" is. It can't be about Applications
since Konversation is found under "Other Shortcuts" but it is also not about
launching since other shortcuts can also be found there (for example see
Spectacle). Furthermore if one adds an shortcut to launch an application in
kmenuedit the shortcut is not found in "Application Launchers" but in
"Other Shortcuts" under KDE Daemon (addressed in D25086).
This patch tries to categorize the components into Applications and System Services by
trying harder to get a corresponding KService and then deciding upon
isApplication if a Component falls into the applications category. Because
components are free to set their uniquea and friendly names themselves it is
also checked if there is a service with Name. With this it is possible to get a
KService for konversation for example.

Test Plan

Before:


After:

Note the moved Konversation and KRunner entries.
Please also test it on your systems when you have different things installed that set global shortcuts.

Diff Detail

Repository
R119 Plasma Desktop
Branch
categorize (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18502
Build 18520: arc lint + arc unit
davidre created this revision.Nov 4 2019, 6:04 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 4 2019, 6:04 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidre requested review of this revision.Nov 4 2019, 6:04 PM
davidre edited the test plan for this revision. (Show Details)Nov 4 2019, 6:07 PM
davidre added a reviewer: Plasma.
ngraham added a subscriber: ngraham.Nov 4 2019, 6:38 PM

Instead of "Plasma", how about "System Services"? That would match the categories in the Notifications KCM's similar list.

However I see a problem with changing "Application Launchers" to "Applications": It implies that the items in that category will give you access to change all the shortcuts for those applications, which it does not do. If we want to make this change, I think we'd need to actually put all of each app's shortcuts into its item in that list, assuming that's possible.

However I see a problem with changing "Application Launchers" to "Applications": It implies that the items in that category will give you access to change all the shortcuts for those applications, which it does not do. If we want to make this change, I think we'd need to actually put all of each app's shortcuts into its item in that list, assuming that's possible.

I don't think that's implied when the Settings page is titled "Global Shortcuts". The category is about about global shortcuts that relate to Application.
Also note that it will be an improvement when eventually more shortcuts are moved to desktop files. For example the "Lock Session" shortcut would end up in "Application Launchers" with D24877.

However I see a problem with changing "Application Launchers" to "Applications": It implies that the items in that category will give you access to change all the shortcuts for those applications, which it does not do. If we want to make this change, I think we'd need to actually put all of each app's shortcuts into its item in that list, assuming that's possible.

I don't think that's implied when the Settings page is titled "Global Shortcuts". The category is about about global shortcuts that relate to Application.

All right, I suppose that makes sense.

Also note that it will be an improvement when eventually more shortcuts are moved to desktop files. For example the "Lock Session" shortcut would end up in "Application Launchers" with D24877.

Under which entry? That seems odd.

However I see a problem with changing "Application Launchers" to "Applications": It implies that the items in that category will give you access to change all the shortcuts for those applications, which it does not do. If we want to make this change, I think we'd need to actually put all of each app's shortcuts into its item in that list, assuming that's possible.

I don't think that's implied when the Settings page is titled "Global Shortcuts". The category is about about global shortcuts that relate to Application.

All right, I suppose that makes sense.

Also note that it will be an improvement when eventually more shortcuts are moved to desktop files. For example the "Lock Session" shortcut would end up in "Application Launchers" with D24877.

Under which entry? That seems odd.

The user facing name which would be Session. As I wrote the current code only looks if the component name ends with .desktop so you would have "Session" inside "Application Launchers".

Hmm, I think that would be confusing. "Session" isn't the name of any user-facing applications. That stuff is really a part of Plasma, both technically speaking, and also in terms of the user expectation. Is there any way we could force it to live in the Plasma/System Services section?

Hmm, I think that would be confusing. "Session" isn't the name of any user-facing applications. That stuff is really a part of Plasma, both technically speaking, and also in terms of the user expectation. Is there any way we could force it to live in the Plasma/System Services section?

Hmm it seems I failed to make myself clear. The *current* kcm just reads whether a component's unique name end with ".desktop" and categorizes on that while this patch uses KService::isApplication. In fact David's patch inspired inspired me to this since I noticed this problem when thinking about it.

Oh I see lol. Well I guess my only complaint is with the name chosen for the Plasma category.

mlaurent requested changes to this revision.Nov 5 2019, 7:14 AM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
kcms/keys/kglobalshortcutseditor.cpp
436

const KService::List

This revision now requires changes to proceed.Nov 5 2019, 7:14 AM
davidre updated this revision to Diff 69301.Nov 5 2019, 9:02 AM
davidre marked an inline comment as done.
  • const
  • System services
ngraham accepted this revision.Nov 5 2019, 3:49 PM
davidre retitled this revision from [RFC][Global Shortcuts KCM] Categorize into Plasma and Applications to [RFC][Global Shortcuts KCM] Categorize into Applications and System Services.Nov 11 2019, 10:24 AM
davidre edited the summary of this revision. (Show Details)
davidre abandoned this revision.Apr 29 2020, 1:33 PM

Superseeded by total rewrite of the kcm