<table><tr><td style="">gikari created this revision.<br />gikari added a reviewer: apol.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />gikari requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26261">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>After several changes, GTK Applications settings are now in<br />
sync with KDE equivalent ones, so that GTK KCM now controls only the<br />
theme of the GTK applications. But GTK KCM was written with the thought<br />
that it controls entire GTK apps appearance in mind. Its code structure<br />
is now redundant and needs to be either rewritten or purged in favour of<br />
new one, that will be present in Application Style KCM code base.</p>

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

<ol class="remarkup-list">
<li class="remarkup-list-item">The consensus of where exactly to put the GTK applications settings in App Style KCM is not yet reached.</li>
<li class="remarkup-list-item">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</li>
<li class="remarkup-list-item">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)</li>
</ol>

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

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

<ol class="remarkup-list">
<li class="remarkup-list-item">Setting selected GTK2 and GTK3 themes for applications</li>
<li class="remarkup-list-item">Getting current GTK2 and GTK3 themes for applications</li>
<li class="remarkup-list-item">Previewing GTK2 and GTK3 applications for selected themes</li>
</ol>

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

<p>The stuff, that is done in KCM directly:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Getting the list of installed GTK themes</li>
<li class="remarkup-list-item">Installing and removing the GTK theme</li>
</ol>

<p>Also there are some visual changes:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Theme deletion is now done via button near GTK theme combo, instead of separate dialog</li>
<li class="remarkup-list-item">Theme installation from file is now done via button at the bottom, as in the other similar KCMs</li>
<li class="remarkup-list-item">Preview button now has a title with an ellipsis to indicate, that it launches GTK app in a pop up window</li>
</ol>

<p>BUG: 405405</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Relaunch kded5</li>
<li class="remarkup-list-item">Open GTK KCM</li>
<li class="remarkup-list-item">Check if gtk themes changing works</li>
<li class="remarkup-list-item">Check if the previews are working</li>
<li class="remarkup-list-item">Check if the local themes deletion works</li>
<li class="remarkup-list-item">Check if theme installation from archive works</li>
<li class="remarkup-list-item">Check if GHNS theme installation works</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R99 KDE Gtk Configuration Tool</div></div></div><br /><div><strong>BRANCH</strong><div><div>set-theme-through-kded</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26261">https://phabricator.kde.org/D26261</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
kded/CMakeLists.txt<br />
kded/configeditor.cpp<br />
kded/configeditor.h<br />
kded/gtkconfig.cpp<br />
kded/gtkconfig.h<br />
kded/themepreviewer.cpp<br />
kded/themepreviewer.h<br />
src/abstractappearance.cpp<br />
src/abstractappearance.h<br />
src/appearancegtk2.cpp<br />
src/appearancegtk2.h<br />
src/appearancegtk3.cpp<br />
src/appearancegtk3.h<br />
src/appearencegtk.cpp<br />
src/appearencegtk.h<br />
src/dialog_installer.cpp<br />
src/dialog_installer.h<br />
src/dialog_uninstaller.cpp<br />
src/dialog_uninstaller.h<br />
src/gtkconfigkcmodule.cpp<br />
src/gtkconfigkcmodule.h<br />
src/installer.cpp<br />
src/installer.h<br />
src/thread.cpp<br />
src/thread.h<br />
src/ui/dialog_installer.ui<br />
src/ui/dialog_uninstaller.ui<br />
src/ui/gui.ui<br />
tests/CMakeLists.txt<br />
tests/configsavetest.cpp<br />
tests/configsavetest.h</div></div></div><br /><div><strong>To: </strong>gikari, apol<br /><strong>Cc: </strong>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<br /></div>