Rewrite GTK KCM

Authored by gikari on Dec 10 2019, 7:28 PM.

Description

Rewrite GTK KCM

Summary:
After several changes, GTK Applications settings are now in
sync with KDE equivalent ones, so that GTK KCM now controls only the
theme of the GTK applications. But GTK KCM was written with the thought
that it controls entire GTK apps appearance in mind. Its code structure
is now redundant and needs to be either rewritten or purged in favour of
new one, that will be present in Application Style KCM code base.

The last approach is preferable, because of the goal of removing GTK KCM
to simplify System Settings structure. However, there are some points to
be noted:

  1. The consensus of where exactly to put the GTK applications settings in App Style KCM is not yet reached.
  2. A couple of changes to the kded settings sync daemon are needed, to provide functionality, that is left in GTK KCM (Themes Installation/Deletion, Preview etc) without depending on GTK libs
  3. There are some bugs in KCM, that are present in the moment, that could only be fixed with architecture changes (for example: not working previews, when the xsettingsd daemon is running; broken icons in the previews; gtk themes do not applying for flatpak apps)

Given the points above I decided to rewrite GTK KCM, so that complex
design task (1) would be solved after changes (2) are made. And also
in the process some bugs (3) will be fixed.

Now, GTK KCM is not responsible for managing GTK configs, the one who
does is the kded module, that is asked through DBus, when it is needed
to do so.
The stuff, that is managed by kded module:

  1. Setting selected GTK2 and GTK3 themes for applications
  2. Getting current GTK2 and GTK3 themes for applications
  3. Previewing GTK2 and GTK3 applications for selected themes

Technically 2 and 3 could be done in KCM directly, because they do not
depend on GTK libs, but I thought, that it would be logically related to
the stuff, that is done via kded module. If you think, that that
approach is not right, feel free to criticise.

The stuff, that is done in KCM directly:

  1. Getting the list of installed GTK themes
  2. Installing and removing the GTK theme

Also there are some visual changes:

  1. Theme deletion is now done via button near GTK theme combo, instead of separate dialog
  2. Theme installation from file is now done via button at the bottom, as in the other similar KCMs
  3. Preview button now has a title with an ellipsis to indicate, that it launches GTK app in a pop up window

BUG: 405405

Test Plan:

  1. Relaunch kded5
  2. Open GTK KCM
  3. Check if gtk themes changing works
  4. Check if the previews are working
  5. Check if the local themes deletion works
  6. Check if theme installation from archive works
  7. Check if GHNS theme installation works

Reviewers: apol, VDG, ngraham, cblack

Reviewed By: VDG, ngraham, cblack

Subscribers: cblack, baberts, ngraham, plasma-devel

Tags: Plasma

Maniphest Tasks: T10611

Differential Revision: https://phabricator.kde.org/D26261

Details

Committed
gikariJan 11 2020, 9:26 PM
Reviewer
VDG
Differential Revision
D26261: Rewrite GTK KCM
Parents
R99:19ca9f6c8676: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown