D26261: Rewrite GTK KCM
Mikhail Zolotukhin
noreply at phabricator.kde.org
Sat Dec 28 18:51:15 GMT 2019
gikari created this revision.
gikari added a reviewer: apol.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
gikari requested review of this revision.
REVISION 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
REPOSITORY
R99 KDE Gtk Configuration Tool
BRANCH
set-theme-through-kded
REVISION DETAIL
https://phabricator.kde.org/D26261
AFFECTED FILES
CMakeLists.txt
kded/CMakeLists.txt
kded/configeditor.cpp
kded/configeditor.h
kded/gtkconfig.cpp
kded/gtkconfig.h
kded/themepreviewer.cpp
kded/themepreviewer.h
src/abstractappearance.cpp
src/abstractappearance.h
src/appearancegtk2.cpp
src/appearancegtk2.h
src/appearancegtk3.cpp
src/appearancegtk3.h
src/appearencegtk.cpp
src/appearencegtk.h
src/dialog_installer.cpp
src/dialog_installer.h
src/dialog_uninstaller.cpp
src/dialog_uninstaller.h
src/gtkconfigkcmodule.cpp
src/gtkconfigkcmodule.h
src/installer.cpp
src/installer.h
src/thread.cpp
src/thread.h
src/ui/dialog_installer.ui
src/ui/dialog_uninstaller.ui
src/ui/gui.ui
tests/CMakeLists.txt
tests/configsavetest.cpp
tests/configsavetest.h
To: gikari, apol
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191228/b40c385b/attachment-0001.html>
More information about the Plasma-devel
mailing list