Skip to content

[kcms/keys] Don't allow to remove built-in components

Nicolas Fella requested to merge work/nico/shortcuts-removable into master

Currently we allow to remove any component, but they might reappear again because the application re-registers them or the desktop file is picked up again.

In most cases removing doesn't make much sense in the first place since they are core system components that a user should not be able to remove wholesale. They can unbind individual shortcuts that are not wanted.

This introduces logic to determine whether a component should be removable or not. For now it only coveres desktopfile-based shortcuts since those are easier to deal with.

The logic is:

  • Things in the System Services category cannot be removed
  • Things in the Applications section can be removed if the relevant desktop file has no shortcuts defined, i.e. the user added it explicity

Dealing with runtime-registered shortcuts is left as a future exercise

CCBUG: 452649

Merge request reports