[kcmshell] Use desktop file name of module as app's desktop file
ClosedPublic

Authored by graesslin on Oct 26 2016, 5:50 AM.

Details

Summary

By default kcmshell5 registers as org.kde.kcmshell5, but such a desktop
file does not exist. Which means that on Wayland neither window manager
nor task manager is able to provide a useful window icon for
configuration window.

This change tries to locate the desktop file of the module passed to
kcmshell5. If it is found it is set as the application's desktop file
name. Thus the compositor and task manager actually know the desktop
file which was used to start the kcmshell5 instance.

This is only done if kcmshell5 is invoked for only one module. In case
of multiple modules the application invoking kcmshell5 should pass a
proper desktop file name through the command line argument. And if the
desktopfile got specified already it is not updated from the module.

Test Plan

KWin Effects KCM shows proper icon on Wayland

Diff Detail

Repository
R126 KDE CLI Utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7662.Oct 26 2016, 5:50 AM
graesslin retitled this revision from to [kcmshell] Use desktop file name of module as app's desktop file.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptOct 26 2016, 5:50 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Desktop Effect settings show proper icon on Wayland instead of generic one.

mart accepted this revision.Oct 27 2016, 8:16 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Oct 27 2016, 8:16 AM
This revision was automatically updated to reflect the committed changes.