Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: kde-gtk-config

kde-gtk-config (4:5.19.5-0ubuntu1) groovy; urgency=medium * New upstream release (5.19.5) -- Rik Mills <rikmills@kde.org> Tue, 01 Sep 2020 12:53:06 +0100 kde-gtk-config (4:5.19.4-0ubuntu1) groovy; urgency=medium * New upstream release (5.19.4) -- Rik Mills <rikmills@kde.org> Tue, 28 Jul 2020 20:41:23 +0100 kde-gtk-config (4:5.19.3-0ubuntu1) groovy; urgency=medium * New upstream release (5.19.3) -- Rik Mills <rikmills@kde.org> Tue, 07 Jul 2020 13:58:19 +0100 kde-gtk-config (4:5.19.2-0ubuntu1) groovy; urgency=medium * Update install files. * New upstream release (5.19.0) * New upstream release (5.19.1) * New upstream release (5.19.2) -- Rik Mills <rikmills@kde.org> Fri, 26 Jun 2020 13:44:51 +0100 kde-gtk-config (4:5.18.5-0ubuntu1) groovy; urgency=medium * New upstream release (5.18.5) -- Rik Mills <rikmills@kde.org> Tue, 05 May 2020 23:39:21 +0100 kde-gtk-config (4:5.18.4.1-0ubuntu1) focal; urgency=medium * New upstream release (5.18.4.1) * Recommends xsettingsd, as specified by upstream runtime recommends. -- Rik Mills <rikmills@kde.org> Thu, 02 Apr 2020 19:45:50 +0100 kde-gtk-config (4:5.18.3-0ubuntu1) focal; urgency=medium * New upstream release (5.18.3) -- Rik Mills <rikmills@kde.org> Tue, 10 Mar 2020 18:07:15 +0000 kde-gtk-config (4:5.18.2-0ubuntu2) focal; urgency=medium * Update installed files. -- José Manuel Santamaría Lema <panfaust@gmail.com> Thu, 27 Feb 2020 01:46:20 +0000 kde-gtk-config (4:5.18.2-0ubuntu1) focal; urgency=medium * New upstream release (5.18.2) -- Rik Mills <rikmills@kde.org> Tue, 25 Feb 2020 18:29:27 +0000 kde-gtk-config (4:5.18.1-0ubuntu1) focal; urgency=medium * New upstream release (5.18.1) -- Rik Mills <rikmills@kde.org> Tue, 18 Feb 2020 14:36:16 +0000 kde-gtk-config (4:5.18.0-0ubuntu2) focal; urgency=medium * Follow Debian unstable drop of testsuite. -- Rik Mills <rikmills@kde.org> Mon, 17 Feb 2020 15:24:48 +0000 kde-gtk-config (4:5.18.0-0ubuntu1) focal; urgency=medium * New upstream release (5.18.0) -- Rik Mills <rikmills@kde.org> Tue, 11 Feb 2020 07:43:37 +0000 kde-gtk-config (4:5.17.90-0ubuntu2) focal; urgency=medium * Merge from debian 4:5.17.5-1. Remaining changes: - New upstream (beta) release (5.17.90) - debian/control: Kubuntu Vcs fields. - Update install files, where the kcm and knsrc files moved to plasma-desktop in 5.17.90. - debian/tests: Keep files, but disable until can be dropped in next unstable release. -- Rik Mills <rikmills@kde.org> Mon, 20 Jan 2020 09:11:31 +0000 kde-gtk-config (4:5.17.90-0ubuntu1) focal; urgency=medium * Update install files. * New upstream (beta) release (5.17.90) -- Rik Mills <rikmills@kde.org> Thu, 16 Jan 2020 18:07:29 +0000

Modifications :
  1. Download patch po/nb/kde-gtk-config.po
  2. Download patch po/da/kde-gtk-config.po
  3. Download patch src/appearencegtk.cpp

    --- 4:5.17.5-2/src/appearencegtk.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/appearencegtk.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "appearencegtk.h" -#include <QDirIterator> -#include "abstractappearance.h" -#include "appearancegtk2.h" -#include "appearancegtk3.h" - -AppearenceGTK::AppearenceGTK() -{ - m_app << new AppearanceGTK2; - m_app << new AppearanceGTK3; -} - -AppearenceGTK::~AppearenceGTK() -{ - qDeleteAll(m_app); -} - -#define PROPERTY_IMPLEMENTATION(type, name, propname)\ -void AppearenceGTK::set##name(const type& a) { foreach(AbstractAppearance* app, m_app) app->set##name(a); }\ -type AppearenceGTK::get##name() const { foreach(AbstractAppearance* app, m_app) { if(app->hasProperty(propname)) return app->get##name(); } /*Q_ASSERT(false);*/ return type (); } - -PROPERTY_IMPLEMENTATION(QString, Cursor, "cursor") -PROPERTY_IMPLEMENTATION(QString, Icon, "icon") -PROPERTY_IMPLEMENTATION(QString, IconFallback, "icon_fallback") -PROPERTY_IMPLEMENTATION(QString, Font, "font") -PROPERTY_IMPLEMENTATION(QString, ToolbarStyle, "toolbar_style") -PROPERTY_IMPLEMENTATION(bool, ShowIconsInButtons, "show_icons_buttons") -PROPERTY_IMPLEMENTATION(bool, ShowIconsInMenus, "show_icons_menus") -PROPERTY_IMPLEMENTATION(bool, PrimaryButtonWarpsSlider, "primary_button_warps_slider") - -QString AppearenceGTK::getTheme() const { return gtk2Appearance()->getTheme(); } -void AppearenceGTK::setTheme(const QString& name) { return gtk2Appearance()->setTheme(name); } -QString AppearenceGTK::getThemeGtk3() const { return gtk3Appearance()->getTheme(); } -void AppearenceGTK::setThemeGtk3(const QString& name) { return gtk3Appearance()->setTheme(name); } -bool AppearenceGTK::getApplicationPreferDarkTheme() const { return ((AppearanceGTK3*)gtk3Appearance())->getApplicationPreferDarkTheme(); } -void AppearenceGTK::setApplicationPreferDarkTheme(const bool& enable) { return ((AppearanceGTK3*)gtk3Appearance())->setApplicationPreferDarkTheme(enable); } - -//////////////////////////////////// -// Methods responsible of file creation - -bool AppearenceGTK::loadFileConfig() -{ - bool correct = false; - foreach(AbstractAppearance* app, m_app) { - bool c = app->loadSettings(); - correct = correct || c; - } -// qDebug() << "loading..." << correct; - return correct; -} - -bool AppearenceGTK::saveFileConfig() -{ - bool correct = true; - foreach(AbstractAppearance* app, m_app) { - bool c = app->saveSettings(); - correct = correct && c; - } -// qDebug() << "saving..." << correct; - return correct; -}
  4. Download patch kded/themepreviewer.cpp

    --- 4:5.17.5-2/kded/themepreviewer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/themepreviewer.cpp 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <QDir> +#include <QFile> +#include <QObject> +#include <QProcess> +#include <QProcessEnvironment> +#include <QStandardPaths> +#include <QString> +#include <QScopedPointer> + +#include <KConfigGroup> +#include <KSharedConfig> + +#include <signal.h> + +#include "themepreviewer.h" +#include "configeditor.h" +#include "config.h" + +const QString ThemePreviewer::previewGtk2ConfigPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + QStringLiteral("/gtkrc-2.0"); +const QString ThemePreviewer::currentGtk2ConfigPath = QDir::homePath() + QStringLiteral("/.gtkrc-2.0"); +const QString ThemePreviewer::gtk2PreviewerExecutablePath = QStandardPaths::findExecutable(QStringLiteral("gtk_preview"), {CMAKE_INSTALL_FULL_LIBEXECDIR}); + +const QString ThemePreviewer::gtk3PreviewerExecutablePath = QStandardPaths::findExecutable(QStringLiteral("gtk3_preview"), {CMAKE_INSTALL_FULL_LIBEXECDIR}); + +ThemePreviewer::ThemePreviewer(QObject *parent) : QObject(parent), +gtk2PreviewerProccess(), +gtk3PreviewerProccess() +{ + QProcessEnvironment gtk2PreviewEnvironment = QProcessEnvironment::systemEnvironment(); + gtk2PreviewEnvironment.insert(QStringLiteral("GTK2_RC_FILES"), previewGtk2ConfigPath); + + gtk2PreviewerProccess.setProcessEnvironment(gtk2PreviewEnvironment); + connect(&gtk2PreviewerProccess, SIGNAL(finished(int)), this, SLOT(startXsettingsd())); +} + +void ThemePreviewer::showGtk2App(const QString& themeName) +{ + if (gtk2PreviewerProccess.state() == QProcess::ProcessState::NotRunning) { + if (QFile::exists(previewGtk2ConfigPath)) { + QFile::remove(previewGtk2ConfigPath); + } + + QFile::copy(currentGtk2ConfigPath, previewGtk2ConfigPath); + + QFile previewConfig(previewGtk2ConfigPath); + QString previewConfigContents = ConfigEditor::readFileContents(previewConfig); + ConfigEditor::replaceValueInGtkrcContents(previewConfigContents, QStringLiteral("gtk-theme-name"), themeName); + previewConfig.remove(); + previewConfig.open(QIODevice::WriteOnly | QIODevice::Text); + previewConfig.write(previewConfigContents.toUtf8()); + + stopXsettingsd(); + gtk2PreviewerProccess.start(gtk2PreviewerExecutablePath); + } else { + gtk2PreviewerProccess.close(); + } +} + +void ThemePreviewer::showGtk3App(const QString& themeName) +{ + if (gtk3PreviewerProccess.state() == QProcess::ProcessState::NotRunning) { + QProcessEnvironment gtk3PreviewEnvironment = QProcessEnvironment::systemEnvironment(); + gtk3PreviewEnvironment.insert(QStringLiteral("GTK_THEME"), themeName); + gtk3PreviewerProccess.setProcessEnvironment(gtk3PreviewEnvironment); + + gtk3PreviewerProccess.start(gtk3PreviewerExecutablePath); + } else { + gtk3PreviewerProccess.close(); + } +} + +void ThemePreviewer::startXsettingsd() +{ + if (gtk2PreviewerProccess.state() == QProcess::ProcessState::NotRunning && + gtk3PreviewerProccess.state() == QProcess::ProcessState::NotRunning) { + QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("xsettingsd"))); + } +} + +void ThemePreviewer::stopXsettingsd() +{ + pid_t pidOfXSettingsd = ConfigEditor::pidOfXSettingsd(); + if (pidOfXSettingsd > 0) { + kill(pidOfXSettingsd, SIGTERM); + } +}
  5. Download patch kded/gtkconfig.json

    --- 4:5.17.5-2/kded/gtkconfig.json 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/gtkconfig.json 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,64 @@ +{ + "KPlugin": { + "Description": "Automatically applies settings to GNOME/GTK applications", + "Description[ca@valencia]": "Aplica automàticament la configuració a les aplicacions GNOME/GTK", + "Description[ca]": "Aplica automàticament la configuració a les aplicacions GNOME/GTK", + "Description[cs]": "Automaticky aplikuje nastavení na aplikace GNOME/GTK", + "Description[da]": "Anvender automatisk indstillinger på GNOME-/GTK-programmer", + "Description[en_GB]": "Automatically applies settings to GNOME/GTK applications", + "Description[es]": "Aplica preferencias automáticamente a las aplicaciones de GNOME/GTK", + "Description[et]": "Seadistuste automaatne rakendamine GNOME/GTK rakendustele", + "Description[eu]": "GNOME/GTK aplikazioei ezarpenak automatikoki ezartzen dizkie", + "Description[fi]": "Ottaa asetukset automaattisesti käyttöön Gnome/Gtk-sovelluksissa", + "Description[fr]": "Applique automatiquement les paramètres aux applications GNOME/GTK", + "Description[id]": "Secara otomatis menerapkan pengaturan ke aplikasi-aplikasi GNOME/GTK", + "Description[it]": "Applica automaticamente le impostazioni alle applicazioni GNOME/GTK", + "Description[ko]": "자동으로 그놈/GTK 프로그램에 설정 적용", + "Description[lt]": "Automatiškai taiko nuostatas GNOME/GTK programoms", + "Description[nl]": "Automatisch toegepaste instellingen op GNOME/GTK toepassingen", + "Description[nn]": "Tek automatisk i bruk innstillingane på GNOME-/GTK-program", + "Description[pt]": "Aplica automaticamente as configurações nas aplicações do GNOME/GTK", + "Description[pt_BR]": "Aplica automaticamente as configurações aos aplicativos GNOME/GTK", + "Description[ru]": "Автоматическое применение изменений для приложений GNOME/GTK", + "Description[sk]": "Automaticky použije nastavenia pre GNOME/GTK aplikácie", + "Description[sv]": "Verkställer automatiskt inställningar för GNOME/GTK-program", + "Description[uk]": "Автоматично застосовує параметри до програм GNOME/GTK", + "Description[x-test]": "xxAutomatically applies settings to GNOME/GTK applicationsxx", + "Description[zh_CN]": "自动将设置应用到 GNOME/GTK 应用", + "Description[zh_TW]": "自動套用設定到 GNOME/GTK 應用程式", + "Icon": "gtkconfig", + "Name": "GNOME/GTK Settings Synchronization Service", + "Name[ca@valencia]": "Servei de sincronització de la configuració del GNOME/GTK", + "Name[ca]": "Servei de sincronització de la configuració del GNOME/GTK", + "Name[cs]": "Služba synchronizace nastavení GNOME/GTK", + "Name[da]": "Synkroniseringstjeneste til GNOME-/GTK-indstillinger", + "Name[en_GB]": "GNOME/GTK Settings Synchronisation Service", + "Name[es]": "Servicio de sincronización de preferencias de GNOME/GTK", + "Name[et]": "GNOME/GTK seadistuste sünkroonimise teenus", + "Name[eu]": "GNOME/GTK ezarpenak sinkronizatzeko zerbitzua", + "Name[fi]": "Gnome/Gtk-asetussynkronointipalvelu", + "Name[fr]": "Service de synchronisation des paramètres GNOME/GTK", + "Name[id]": "Layanan Sinkronisasi Pengaturan GNOME/GTK", + "Name[it]": "Servizio di sincronizzazione delle impostazioni GNOME/GTK", + "Name[ko]": "그놈/GTK 설정 동기화 서비스", + "Name[lt]": "GNOME/GTK nuostatų sinchronizavimo tarnyba", + "Name[nl]": "GNOME/GTK instellingen synchronisatieservice", + "Name[nn]": "GNOME/GTK-oppsettsynkronisering", + "Name[pt]": "Serviço de Sincronização das Configurações do GNOME/GTK", + "Name[pt_BR]": "Configuração do serviço de sincronização GNOME/GTK", + "Name[ru]": "Служба синхронизации параметров GNOME/GTK", + "Name[sk]": "Služba na synchronizáciu nastavení GNOME/GTK", + "Name[sv]": "Synkroniseringstjänst av GNOME/GTK inställningar", + "Name[uk]": "Служба синхронізації параметрів GNOME/GTK", + "Name[x-test]": "xxGNOME/GTK Settings Synchronization Servicexx", + "Name[zh_CN]": "GNOME/GTK 设置同步服务", + "Name[zh_TW]": "GNOME/GTK 設定同步服務", + "ServiceTypes": [ + "KDEDModule" + ], + "Version": "0.1" + }, + "X-KDE-Kded-autoload": true, + "X-KDE-Kded-load-on-demand": false, + "X-KDE-Kded-phase": 1 +}
  6. Download patch kded/gtkconfig.h

    --- 4:5.17.5-2/kded/gtkconfig.h 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/gtkconfig.h 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> + * Copyright (C) 2019 Nicolas Fella <nicolas.fella@gmx.de> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include <KDEDModule> +#include <KConfigWatcher> + +#include "configeditor.h" +#include "configvalueprovider.h" +#include "themepreviewer.h" + +class Q_DECL_EXPORT GtkConfig : public KDEDModule +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kde.GtkConfig") + +public: + GtkConfig(QObject *parent, const QVariantList& args); + ~GtkConfig(); + + void setFont() const; + void setIconTheme() const; + void setCursorTheme() const; + void setIconsOnButtons() const; + void setIconsInMenus() const; + void setToolbarStyle() const; + void setScrollbarBehavior() const; + void setDarkThemePreference() const; + void setWindowDecorationsButtonsOrder() const; + void setEnableAnimations() const; + void setColors() const; + + void applyAllSettings() const; + +public Q_SLOTS: + Q_SCRIPTABLE void setGtk2Theme(const QString &themeName) const; + Q_SCRIPTABLE void setGtk3Theme(const QString &themeName) const; + + Q_SCRIPTABLE QString gtk2Theme() const; + Q_SCRIPTABLE QString gtk3Theme() const; + + Q_SCRIPTABLE void showGtk2ThemePreview(const QString &themeName) const; + Q_SCRIPTABLE void showGtk3ThemePreview(const QString &themeName) const; + + void onKdeglobalsSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const; + void onKWinSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const; + void onKCMInputSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const; + +private: + QScopedPointer<ConfigValueProvider> configValueProvider; + QScopedPointer<ThemePreviewer> themePreviewer; + KConfigWatcher::Ptr kdeglobalsConfigWatcher; + KConfigWatcher::Ptr kwinConfigWatcher; + KConfigWatcher::Ptr kcminputConfigWatcher; +};
  7. Download patch po/pt/kde-gtk-config.po
  8. Download patch src/iconthemesmodel.h

    --- 4:5.17.5-2/src/iconthemesmodel.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/iconthemesmodel.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef ICONTHEMESMODEL_H -#define ICONTHEMESMODEL_H - -#include <QStandardItemModel> - -class QDir; -class IconThemesModel : public QStandardItemModel -{ - public: - enum ThemesRoles { PathRole=Qt::UserRole+1, InheritsRole, DirNameRole }; - - explicit IconThemesModel(bool onlyHome=false, QObject* parent = 0); - - virtual void reload(); - static QString findIconRecursivelyByName(const QString& name, const QDir& directory); - - private: - static QString findFilesRecursively(const QStringList& wildcard, const QDir& directory); - QList<QDir> installedThemesPaths(); - bool m_onlyHome; -}; - -#endif // ICONTHEMESMODEL_H
  9. Download patch Messages.sh

    --- 4:5.17.5-2/Messages.sh 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/Messages.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh -$EXTRACTRC `find . -name \*.ui` >> rc.cpp -$XGETTEXT rc.cpp src/*.cpp -o $podir/kde-gtk-config.pot -
  10. Download patch po/ja/kde-gtk-config.po
  11. Download patch po/it/kde-gtk-config.po
  12. Download patch src/dialog_uninstaller.h

    --- 4:5.17.5-2/src/dialog_uninstaller.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/dialog_uninstaller.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef DIALOGUNINSTALLER_H -#define DIALOGUNINSTALLER_H - -#include <QDialog> - -class KJob; -class AppearenceGTK; -namespace Ui{ - class dialog_uninstaller; -} - -/** - * GUI to uninstall GTK themes and icon themes - */ -class DialogUninstaller: public QDialog -{ - Q_OBJECT -public: - DialogUninstaller(QWidget *parent = 0, AppearenceGTK *app=0); - ~DialogUninstaller(); - -signals: - void themeUninstalled(); - -public slots: - void refreshListsForUninstall(); - void uninstallTheme(); - void uninstallIcon(); - void threadUninstalledThemeFinished(KJob* job); - void threadUninstalledThemeIconFinished(KJob* job); - -private: - Ui::dialog_uninstaller *ui; - AppearenceGTK *appareance; -}; - -#endif //dialog_installer.h
  13. Download patch src/dialog_uninstaller.cpp

    --- 4:5.17.5-2/src/dialog_uninstaller.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/dialog_uninstaller.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "dialog_uninstaller.h" -#include "abstractappearance.h" -#include "iconthemesmodel.h" -#include "ui_dialog_uninstaller.h" -#include "thread.h" -#include "appearencegtk.h" -#include <QDir> -#include <QDebug> -#include <KLocalizedString> - -DialogUninstaller::DialogUninstaller(QWidget* parent, AppearenceGTK *app) - : QDialog(parent) - , ui(new Ui::dialog_uninstaller) - , appareance(app) -{ - ui->setupUi(this); - - refreshListsForUninstall(); - - connect(ui->but_uninstall_theme, &QAbstractButton::clicked, this, &DialogUninstaller::uninstallTheme); - connect(ui->but_uninstall_icon, &QAbstractButton::clicked, this, &DialogUninstaller::uninstallIcon); -} - -DialogUninstaller::~DialogUninstaller() -{ - delete ui; -} - -void DialogUninstaller::refreshListsForUninstall() -{ - ui->lb_notice_uninstall_icon->clear(); - ui->lb_notice_uninstall_theme->clear(); - - QStringList themes = appareance->gtk2Appearance()->installedThemes(); - themes = themes.filter(QDir::homePath()); //we only one the locally installed themes - - //Just leave the theme name - for(QStringList::iterator it=themes.begin(); it!=themes.end(); ++it) - *it = QDir(*it).dirName(); - - ui->cb_uninstall_theme->clear(); - ui->cb_uninstall_theme->addItems(themes); - - ui->cb_uninstall_icon->setModel(new IconThemesModel(true)); -} - -void DialogUninstaller::uninstallTheme() -{ - if(ui->cb_uninstall_theme->currentIndex() < 0) - return; - - QString tema = ui->cb_uninstall_theme->currentText(); - - QStringList themes = appareance->gtk2Appearance()->installedThemes(); - themes = themes.filter(QRegExp('/'+tema+'$')); - - Q_ASSERT(themes.size()==1); - - ui->cb_uninstall_theme->setEnabled(false); - ui->but_uninstall_theme->setEnabled(false); - - ui->lb_notice_uninstall_theme->setText(i18n("Uninstalling GTK theme...")); - - ThreadErase* threadEraseTheme = new ThreadErase; - threadEraseTheme->setThemeForErase(themes.first()); - connect(threadEraseTheme, &KJob::finished, this, &DialogUninstaller::threadUninstalledThemeFinished); - threadEraseTheme->start(); -} - -void DialogUninstaller::uninstallIcon() -{ - int themeIndex = ui->cb_uninstall_icon->currentIndex(); - if(themeIndex<0) - return; - - QAbstractItemModel* model = ui->cb_uninstall_icon->model(); - QString theme = model->data(model->index(themeIndex, 0), IconThemesModel::PathRole).toString(); - - ui->cb_uninstall_icon->setEnabled(false); - ui->but_uninstall_icon->setEnabled(false); - - ui->lb_notice_uninstall_icon->setText(i18n("Uninstalling icons...")); - - ThreadErase* threadEraseIcon = new ThreadErase; - threadEraseIcon->setThemeForErase(theme); - connect(threadEraseIcon, &KJob::finished, this, &DialogUninstaller::threadUninstalledThemeIconFinished); - threadEraseIcon->start(); -} - -void DialogUninstaller::threadUninstalledThemeFinished(KJob* job) -{ - if(job->error()==0) { - ui->lb_notice_uninstall_theme->setText(i18n("GTK theme successfully uninstalled.")); - emit(themeUninstalled()); - } else { - ui->lb_notice_uninstall_theme->setText(i18n("Could not uninstall the GTK theme.")); - } - - ui->cb_uninstall_theme->setEnabled(true); - ui->but_uninstall_theme->setEnabled(true); - - refreshListsForUninstall(); -} - -void DialogUninstaller::threadUninstalledThemeIconFinished(KJob* job) -{ - if(job->error()==0) { - ui->lb_notice_uninstall_icon->setText(i18n("Icons successfully uninstalled.")); - emit(themeUninstalled()); - } else { - ui->lb_notice_uninstall_icon->setText(i18n("Could not uninstall the icon theme.")); - } - - ui->cb_uninstall_icon->setEnabled(true); - ui->but_uninstall_icon->setEnabled(true); - - refreshListsForUninstall(); -}
  14. Download patch po/lt/kde-gtk-config.po
  15. Download patch po/ca/kde-gtk-config.po
  16. Download patch po/eu/kde-gtk-config.po
  17. Download patch po/pa/kde-gtk-config.po
  18. Download patch po/et/kde-gtk-config.po
  19. Download patch po/nn/kde-gtk-config.po
  20. Download patch src/thread.cpp
  21. Download patch src/installer.h

    --- 4:5.17.5-2/src/installer.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/installer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef INSTALLER_H -#define INSTALLER_H - -#include <QString> - -class Installer -{ -public: - /** - This function will unpack the @p urlPackage GTK theme packages wherever - it has to be installed - */ - static bool installTheme(const QString& urlPackage); - - /** - This function will unpack the @p urlPackage icons theme packages wherever - it has to be installed - */ - static bool installIconTheme(const QString& urlPackage); - -}; - -#endif // INSTALLER_H
  22. Download patch po/ia/kde-gtk-config.po
  23. Download patch kded/configvalueprovider.h

    --- 4:5.17.5-2/kded/configvalueprovider.h 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/configvalueprovider.h 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include <KSharedConfig> + +class QString; +class QFont; + +class ConfigValueProvider +{ +public: + ConfigValueProvider(); + + QString fontName() const; + QString iconThemeName() const; + QString cursorThemeName() const; + bool iconsOnButtons() const; + bool iconsInMenus() const; + int toolbarStyle() const; + bool scrollbarBehavior() const; + bool preferDarkTheme() const; + QString windowDecorationsButtonsOrder() const; + bool enableAnimations() const; + QMap<QString, QColor> colors() const; + +private: + QString fontStyleHelper(const QFont &font) const; + QString windowDecorationButtonsOrderInGtkNotation(const QString &kdeConfigValue) const; + + KSharedConfigPtr kdeglobalsConfig; + KSharedConfigPtr inputConfig; + KSharedConfigPtr kwinConfig; +};
  24. Download patch icons/CMakeLists.txt

    --- 4:5.17.5-2/icons/CMakeLists.txt 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/icons/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -ecm_install_icons( - ICONS - 128-apps-kde-gtk-config.png - 16-apps-kde-gtk-config.png - 22-apps-kde-gtk-config.png - 24-apps-kde-gtk-config.png - 256-apps-kde-gtk-config.png - 32-apps-kde-gtk-config.png - 48-apps-kde-gtk-config.png - 64-apps-kde-gtk-config.png - 8-apps-kde-gtk-config.png - sc-apps-kde-gtk-config.svgz - THEME hicolor - DESTINATION ${ICON_INSTALL_DIR} -) Binary files 4:5.17.5-2/icons/sc-apps-kde-gtk-config.svgz and 4:5.19.5-0ubuntu1/icons/sc-apps-kde-gtk-config.svgz differ
  25. Download patch po/en_GB/kde-gtk-config.po
  26. Download patch src/appearancegtk2.h

    --- 4:5.17.5-2/src/appearancegtk2.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/appearancegtk2.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef APPEARANCEGTK2_H -#define APPEARANCEGTK2_H - -#include "abstractappearance.h" - -class AppearanceGTK2 : public AbstractAppearance -{ - bool loadSettings(const QString& path) override; - bool saveSettings(const QString& path) const override; - bool loadSettings() override; - bool saveSettings() const override; - QStringList installedThemes() const override; - - QString themesGtkrcFile(const QString& themeName) const; - -private: - void reset(); - QString defaultConfigFile() const; - bool loadSettingsPrivate(const QString& path); - bool saveSettingsPrivate(const QString& path) const; - void modifyGtkrcContents(QString& fileContents) const; - void modifyGtkrcProperty(const QString& propertyName, const QString& newValue, QString& fileContents) const; - void removeGtkrcLegacyContents(QString& fileContents) const; -}; - -#endif // APPEARANCEGTK2_H
  27. Download patch debian/control

    --- 4:5.17.5-2/debian/control 2020-02-14 20:36:02.000000000 +0000 +++ 4:5.19.5-0ubuntu1/debian/control 2020-09-01 11:53:06.000000000 +0000 @@ -5,30 +5,31 @@ Maintainer: Debian/Kubuntu Qt/KDE Mainta Uploaders: Boris Pek <tehnick@debian.org>, Maximiliano Curia <maxy@debian.org> Build-Depends: cmake (>= 2.8.12~), debhelper-compat (= 12), - extra-cmake-modules (>= 0.0.9), + extra-cmake-modules (>= 5.70.0~), gettext, gsettings-desktop-schemas, libgtk-3-dev, libgtk2.0-dev, - libkf5archive-dev, - libkf5configwidgets-dev, - libkf5i18n-dev, - libkf5iconthemes-dev, - libkf5kcmutils-dev, - libkf5kio-dev, - libkf5newstuff-dev, + libkf5archive-dev (>= 5.70.0~), + libkf5configwidgets-dev (>= 5.70.0~), + libkf5i18n-dev (>= 5.70.0~), + libkf5iconthemes-dev (>= 5.70.0~), + libkf5kcmutils-dev (>= 5.70.0~), + libkf5kio-dev (>= 5.70.0~), + libkf5newstuff-dev (>= 5.70.0~), libqt5svg5-dev, libx11-dev, pkg-kde-tools (>= 0.15.16), qtbase5-dev, Homepage: https://projects.kde.org/projects/kde/workspace/kde-gtk-config -Vcs-Git: https://salsa.debian.org/qt-kde-team/kde/kde-gtk-config.git -Vcs-Browser: https://salsa.debian.org/qt-kde-team/kde/kde-gtk-config -Standards-Version: 4.5.0 +Vcs-Browser: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kde-gtk-config +Vcs-Git: https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kde-gtk-config +Standards-Version: 4.4.1 Package: kde-config-gtk-style Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Recommends: xsettingsd Suggests: kde-config-gtk-style-preview Multi-Arch: same Description: KDE configuration module for GTK+ 2.x and GTK+ 3.x styles selection
  28. Download patch src/dialog_installer.cpp
  29. Download patch po/pt_BR/kde-gtk-config.po
  30. Download patch po/pl/kde-gtk-config.po
  31. Download patch po/tr/kde-gtk-config.po
  32. Download patch po/sl/kde-gtk-config.po
  33. Download patch po/cs/kde-gtk-config.po
  34. Download patch ChangeLog

    --- 4:5.17.5-2/ChangeLog 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -V1.0 -* Port to Module KCM -* change tr() to i18n(), make it translatable, complete translation to english, complete intergation in Apperance module - -V1.1 -* Adding SVG preview suport, add Spanish, Galician and Italian - -v1.2 -* Fix a bug in the layout for some Qt themes - -v1.3 -* Symlink .gtkrc-2.0-kde4 - -v1.4 -* Bug Fixing - -v1.5 -* Add support for the toolbar style - -v1.6 -* Support for GHNS in gtk themes, added Euskara - -v1.7 -* Added Russian - -v1.7 -* Added Gtk3 Support, You can install gtk3 themes through GHNS API and manual installation. - -v2.0 -* Moved to KDE repositories, cleaned up GUI and features. \ No newline at end of file
  35. Download patch src/cursorthemesmodel.h

    --- 4:5.17.5-2/src/cursorthemesmodel.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/cursorthemesmodel.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2016 Andrey Bondrov <andrey.bondrov@rosalab.ru> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef CURSORTHEMESMODEL_H -#define CURSORTHEMESMODEL_H - -#include "iconthemesmodel.h" - -class QDir; -class CursorThemesModel : public IconThemesModel -{ - public: - explicit CursorThemesModel(QObject* parent = 0); - - void reload() override; - - private: - static void fillItem(const QDir& dir, QStandardItem* item); - QList<QDir> installedThemesPaths(); -}; - -#endif // CURSORTHEMESMODEL_H
  36. Download patch gtk3proxies/CMakeLists.txt

    --- 4:5.17.5-2/gtk3proxies/CMakeLists.txt 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/gtk3proxies/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -1,14 +1,12 @@ -find_package(GTK3 REQUIRED) # gtk3 pulls in X11 headers, we need to add the include path if they are not in /usr/include find_package(X11) - -include_directories(${GTK3_INCLUDE_DIRS}) - add_executable(gtk3_preview preview3.c) + if(X11_FOUND) target_include_directories(gtk3_preview PRIVATE ${X11_X11_INCLUDE_PATH}) endif() + target_compile_definitions(gtk3_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"") -target_link_libraries(gtk3_preview ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} ${GLIB2_LIBRARY}) +target_link_libraries(gtk3_preview PkgConfig::GTK+3 PkgConfig::GLib2 PkgConfig::GObject) install(TARGETS gtk3_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}")
  37. Download patch src/appearancegtk3.h

    --- 4:5.17.5-2/src/appearancegtk3.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/appearancegtk3.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef APPEARANCEGTK3_H -#define APPEARANCEGTK3_H - -#include <KSharedConfig> -#include "abstractappearance.h" - -class AppearanceGTK3 : public AbstractAppearance -{ - -public: - QStringList installedThemes() const override; - bool saveSettings() const override; - bool loadSettings() override; - bool saveSettings(const QString& file) const override; - bool loadSettings(const QString& path) override; - bool getApplicationPreferDarkTheme() const; - void setApplicationPreferDarkTheme(const bool& enable); - -private: - QString defaultConfigFile() const; - QString configFileName() const; - bool saveSettings(const KSharedConfig::Ptr& file) const; - bool loadSettings(const KSharedConfig::Ptr& file); -}; - -#endif // APPEARANCEGTK3_H
  38. Download patch po/fr/kde-gtk-config.po
  39. Download patch CMakeLists.txt

    --- 4:5.17.5-2/CMakeLists.txt 2020-01-07 15:23:54.000000000 +0000 +++ 4:5.19.5-0ubuntu1/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -1,22 +1,25 @@ project(kde-gtk-config) -set(PROJECT_VERSION "5.17.5") -cmake_minimum_required(VERSION 2.8.12) +set(PROJECT_VERSION "5.19.5") +cmake_minimum_required(VERSION 3.10) -find_package(ECM 0.0.9 REQUIRED NO_MODULE) +find_package(ECM REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH}) -find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Widgets Svg Test) -find_package(KF5 REQUIRED COMPONENTS I18n KIO ConfigWidgets NewStuff Archive KCMUtils IconThemes) -find_package(X11 REQUIRED) -find_package(GTK3 REQUIRED) +find_package(Qt5 REQUIRED NO_MODULE COMPONENTS DBus) +find_package(KF5CoreAddons REQUIRED) +find_package(KF5Config REQUIRED) +find_package(KF5ConfigWidgets REQUIRED) +find_package(KF5GuiAddons REQUIRED) +find_package(KF5DBusAddons REQUIRED) +find_package(PkgConfig REQUIRED) find_package(GSettingSchemas REQUIRED) +find_package(XSettingsd) -include_directories( - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/ui - ${GTK3_INCLUDE_DIRS} -) +pkg_check_modules(GTK+3 REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GTK+2 REQUIRED IMPORTED_TARGET gtk+-2.0) +pkg_check_modules(GLib2 REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GObject REQUIRED IMPORTED_TARGET gobject-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) include(ECMSetupVersion) include(ECMInstallIcons) @@ -26,48 +29,24 @@ include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) +include(KDEClangFormat) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) - -# Set KI18n translation domain -add_definitions(-DTRANSLATION_DOMAIN=\"kde-gtk-config\") - -set(kcm_SRCS - src/iconthemesmodel.cpp - src/cursorthemesmodel.cpp - src/appearancegtk3.cpp - src/appearancegtk2.cpp - src/appearencegtk.cpp - src/abstractappearance.cpp - src/thread.cpp - src/installer.cpp - src/gtkconfigkcmodule.cpp - src/dialog_installer.cpp - src/dialog_uninstaller.cpp - src/fontshelpers.cpp +set_package_properties(XSettingsd PROPERTIES + DESCRIPTION "XSettingsd daemon" + TYPE RUNTIME + PURPOSE "Allows GTK Config kded module to apply settings to GTK applications on the fly" ) -ki18n_wrap_ui(kcm_SRCS - src/ui/gui.ui - src/ui/dialog_installer.ui - src/ui/dialog_uninstaller.ui -) -add_library(kcm_kdegtkconfig MODULE ${kcm_SRCS}) -target_compile_definitions(kcm_kdegtkconfig PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") -target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} ${GIO2_LIBRARY} ${GLIB2_LIBRARY} ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} Qt5::Svg KF5::ConfigCore KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes) - -kcoreaddons_desktop_to_json(kcm_kdegtkconfig kde-gtk-config.desktop) - -install(TARGETS kcm_kdegtkconfig DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES cgctheme.knsrc cgcgtk3.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) -install(FILES kde-gtk-config.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake kded/config.h) add_subdirectory(gtkproxies) add_subdirectory(gtk3proxies) -add_subdirectory(icons) -add_subdirectory(tests) +add_subdirectory(kded) +add_subdirectory(kconf_update) +add_subdirectory(color-reload-module) + +# add clang-format target for all our real source files +file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) +kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) - -find_package(KF5I18n CONFIG REQUIRED) -ki18n_install(po)
  40. Download patch po/el/kde-gtk-config.po
  41. Download patch kded/themepreviewer.h

    --- 4:5.17.5-2/kded/themepreviewer.h 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/themepreviewer.h 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include <QProcess> +#include <QString> + +class ThemePreviewer : QObject { + Q_OBJECT +public: + ThemePreviewer(QObject *parent); + + void showGtk2App(const QString &themeName); + void showGtk3App(const QString &themeName); + +private Q_SLOTS: + void startXsettingsd(); + void stopXsettingsd(); + +private: + static const QString previewGtk2ConfigPath; + static const QString currentGtk2ConfigPath; + static const QString gtk2PreviewerExecutablePath; + + static const QString gtk3PreviewerExecutablePath; + + QProcess gtk2PreviewerProccess; + QProcess gtk3PreviewerProccess; +};
  42. Download patch cmake/modules/FindXSettingsd.cmake

    --- 4:5.17.5-2/cmake/modules/FindXSettingsd.cmake 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/cmake/modules/FindXSettingsd.cmake 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,32 @@ +# - Find XSettingsd +# This module defines the following variables: +# +# XSettingsd_FOUND - true if found +# XSettingsd_PATH - path to the bin (only when found) +# +# Copyright (c) 2020 Mikhail Zolotukhin <zomial@protonmail.com> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +find_program(XSettingsd_PATH "xsettingsd") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XSettingsd + FOUND_VAR XSettingsd_FOUND + REQUIRED_VARS XSettingsd_PATH +) +mark_as_advanced(XSettingsd_PATH) +
  43. Download patch po/sr/kde-gtk-config.po
  44. Download patch kded/configeditor.h

    --- 4:5.17.5-2/kded/configeditor.h 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/configeditor.h 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include <unistd.h> +#include <QString> + +class QColor; +class QFile; +class QVariant; + +namespace ConfigEditor +{ + void setGtk2ConfigValue(const QString &paramName, const QVariant &paramValue); + + void setGtk3ConfigValueGSettings(const QString &paramName, const QVariant &paramValue, const QString &category = QStringLiteral("org.gnome.desktop.interface")); + void setGtk3ConfigValueGSettingsAsEnum(const QString &paramName, int paramValue, const QString &category = QStringLiteral("org.gnome.desktop.interface")); + void setGtk3ConfigValueSettingsIni(const QString &paramName, const QVariant &paramValue); + void setGtk3ConfigValueXSettingsd(const QString &paramName, const QVariant &paramValue); + + void setGtk3Colors(const QMap<QString, QColor> &colorsDefinitions); + + QString gtk2ConfigValue(const QString& paramName); + QString gtk3ConfigValueSettingsIni(const QString& paramName); + + void removeLegacyGtk2Strings(); + + void addGtkModule(const QString &moduleName); + + void addImportStatementToGtkCssUserFile(); + void modifyColorsCssFile(const QMap<QString, QColor> &colorsDefinitions); + + void replaceValueInGtkrcContents(QString &gtkrcContents, const QString &paramName, const QVariant &paramValue); + void replaceValueInXSettingsdContents(QString &xSettingsdContents, const QString &paramName, const QVariant &paramValue); + + QString readFileContents(QFile &gtkrc); + + void reloadGtk2Apps(); + void reloadXSettingsd(); + + pid_t pidOfXSettingsd(); +};
  45. Download patch cgcgtk3.knsrc

    --- 4:5.17.5-2/cgcgtk3.knsrc 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/cgcgtk3.knsrc 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -[KNewStuff3] -Name=GTK 3.x Themes -Name[ar]=سمات جتك الثّالثة -Name[ca]=Temes GTK 3.x -Name[ca@valencia]=Temes GTK 3.x -Name[cs]=Motivy GTK 3.x -Name[da]=GTK 3.x-temaer -Name[de]=GTK 3.x-Designs -Name[el]=Θέματα GTK 3.x -Name[en_GB]=GTK 3.x Themes -Name[es]=Temas de GTK 3.x -Name[eu]=GTK 3.x gaiak -Name[fi]=GTK 3.x -teemat -Name[fr]=Thèmes GTK 3.x -Name[gl]=Temas de GTK 3.x -Name[he]=ערכות נושא של GTK 3.x -Name[hu]=GTK 3.x témák -Name[id]=Tema GTK 3.x -Name[it]=Temi GTK 3.x -Name[ko]=GTK 3.x 테마 -Name[lt]=GTK 3.x apipavidalinimai -Name[nl]=GTK 3.x thema's -Name[nn]=GTK 3.x-tema -Name[pl]=Wygląd GTK 3.x -Name[pt]=Temas do GTK 3.x -Name[pt_BR]=Temas GTK 3.x -Name[ru]=Темы GTK 3.x -Name[sk]=Témy GTK 3.x -Name[sl]=Teme GTK 3.x -Name[sr]=ГТК 3.x теме -Name[sr@ijekavian]=ГТК 3.x теме -Name[sr@ijekavianlatin]=GTK 3.x teme -Name[sr@latin]=GTK 3.x teme -Name[sv]=GTK 3.x-teman -Name[tr]=GTK 3.x Temaları -Name[uk]=Теми GTK 3.x -Name[x-test]=xxGTK 3.x Themesxx -Name[zh_CN]=GTK 3.x 主题 -Name[zh_TW]=GTK 3.x 主題 - -Categories=GTK 3.x Theme/Style -Uncompress=always -InstallPath=.themes
  46. Download patch src/dialog_installer.h

    --- 4:5.17.5-2/src/dialog_installer.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/dialog_installer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef DIALOGINSTALLER_H -#define DIALOGINSTALLER_H -#include <QDialog> - -class ThreadAnalisysThemeIcon; -class ThreadAnalisysTheme; -class Thread; -namespace Ui { - class dialog_installer; -} - -/** - * GUI to install icons and gtk themes - */ -class DialogInstaller : public QDialog -{ -Q_OBJECT -public: - DialogInstaller(QWidget *parent=0); - ~DialogInstaller(); - -signals: - /** - * Whenever a theme is installed, this signal is emitted - */ - void themeInstalled(); - -private slots: - /** - Instala el tema de icono a traves del objeto Installer - Para ello lanza un hilo para que no se bloqué la GUI - */ - void installThemeIcon(); - /** - Instala el tema de icono a traves del objeto Installer - Para ello lanza un hilo para que no se bloqué la GUI - */ - void installTheme(); - - void enableGUIThemeInstaller(); - void disableGUIThemeInstaller(); - void refreshGUITheme(); - void themeAnalisys(); - - ///executed after analyzing theme - void checkThemeAnalisys(); - - void enableGUIThemeIconInstaller(); - void disableGUIThemeIconInstaller(); - void refreshGUIIconTheme(); - void themeIconAnalisys(); - void checkThemeIconAnalisys(); - - -private: - Ui::dialog_installer *ui; - - //PROPIEDADES PARA EL AREA DE INSTALADOR - Thread *threadForTheme; //Hilo que instala el tema gtk - Thread *threadForIcon; //Hilo que instala el tema de iconos - ThreadAnalisysTheme *threadAnalisysTheme; //hilo para analizar los temas a instalar - ThreadAnalisysThemeIcon *threadAnalisysThemeIcon; //hilo para analizar los temas a instalar - -}; - -#endif //dialog_installer.h
  47. Download patch po/de/kde-gtk-config.po
  48. Download patch po/bs/kde-gtk-config.po
  49. Download patch kde-gtk-config.desktop

    --- 4:5.17.5-2/kde-gtk-config.desktop 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kde-gtk-config.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -[Desktop Entry] -Exec=kcmshell5 kde-gtk-config -Icon=kde-gtk-config -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kcm_kdegtkconfig -# X-KDE-ParentApp=kcontrol - -X-KDE-System-Settings-Parent-Category=applicationstyle -X-KDE-Weight=20 - -Name=GNOME/GTK Application Style -Name[ca]=Estil de les aplicacions GNOME/GTK -Name[ca@valencia]=Estil de les aplicacions GNOME/GTK -Name[cs]=Styl aplikací GNOME/GTK -Name[da]=Programstil for GNOME-/GTK-programmer -Name[de]=GNOME/GTK Anwendungs-Stil -Name[en_GB]=GNOME/GTK Application Style -Name[es]=Estilo de las aplicaciones de GNOME/GTK -Name[eu]=GNOME/GTK aplikazioen estiloa -Name[fi]=Gnome/GTK-sovellusten tyyli -Name[fr]=Style des applications « GNOME / GTK » -Name[gl]=Estilo das aplicacións de GNOME ou GTK -Name[hu]=GNOME/GTK alkalmazásstílus -Name[id]=Gaya Aplikasi GNOME/GTK -Name[it]=Stile delle applicazioni GNOME/GTK -Name[ja]=GNOME/GTK アプリケーションスタイル -Name[ko]=그놈/GTK 프로그램 스타일 -Name[lt]=GNOME/GTK programų stilius -Name[nl]=Stijl van GNOME/GTK-toepassingen -Name[nn]=GNOME/GTK-programstil -Name[pl]=Wygląd aplikacji GNOME/GTK -Name[pt]=Estilo de Aplicações do GNOME/GTK -Name[pt_BR]=Estilo dos aplicativos GNOME/GTK -Name[ru]=Стиль программ GNOME/GTK+ -Name[sk]=Štýl aplikácií GNOME (GTK) -Name[sv]=GNOME/GTK-programstil -Name[uk]=Стиль програм GNOME/GTK -Name[x-test]=xxGNOME/GTK Application Stylexx -Name[zh_CN]=GNOME/GTK 应用程序风格 -Name[zh_TW]=GNOME / GTK 應用程式樣式 -Comment=Configure GNOME/GTK application style and behavior -Comment[ca]=Configuració de l'estil i comportament de les aplicacions GNOME/GTK -Comment[ca@valencia]=Configuració de l'estil i comportament de les aplicacions GNOME/GTK -Comment[cs]=Nastavte styl a chováni aplikací GNOME/GTK -Comment[da]=Indstil stil og opførsel GNOME-/GTK-programmer -Comment[de]=Einrichtung des Stils und Verhaltens von GNOME-/GTK-Anwendungen -Comment[en_GB]=Configure GNOME/GTK application style and behaviour -Comment[es]=Configurar el estilo y el comportamiento de las aplicaciones de GNOME/GTK -Comment[eu]=Konfiguratu GNOME/Gtk aplikazioen estiloa eta jokabidea -Comment[fi]=Gnome/GTK-sovellusten tyyli- ja toimintaasetukset -Comment[fr]=Configuration du style et du comportement des applications « GNOME / GTK » -Comment[gl]=Configurar o estilo e comportamento das aplicacións de GNOME ou GTK -Comment[hu]=A GNOME/GTK alkalmazások stílusának és működésének beállítása -Comment[id]=Konfigurasikan perilaku dan gaya aplikasi GTK/GNOME -Comment[it]=Configura lo stile ed il comportamento delle applicazioni GNOME/GTK -Comment[ko]=그놈/GTK 프로그램 스타일과 행동 설정 -Comment[lt]=Konfigūruoti GNOME/GTK programų stilių ir elgseną -Comment[nl]=Stijl en gedrag van GNOME/GTK-toepassingen configureren -Comment[nn]=Set opp utsjånad og åtferd for GNOME/GTK-program -Comment[pl]=Ustawienia wyglądu i zachowania aplikacji GNOME/GTK -Comment[pt]=Configurar o estilo e comportamento das aplicações em GNOME/GTK -Comment[pt_BR]=Configure o estilo e comportamento dos aplicativos GNOME/GTK -Comment[ru]=Настройка стиля и поведения программ на основе GNOME/GTK+ -Comment[sk]=Nastavte správanie a vzhľad GTK/GNOME aplikácií. -Comment[sv]=Anpassa GNOME/GTK-programstil och beteende -Comment[uk]=Налаштовування стилю і поведінки програм на основі GNOME/GTK -Comment[x-test]=xxConfigure GNOME/GTK application style and behaviorxx -Comment[zh_CN]=配置 GNOME/GTK 应用程序风格和行为 -Comment[zh_TW]=設定 GNOME/GTK 應用程式的樣式與行為 - -X-KDE-Keywords=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu -X-KDE-Keywords[ca]=gnome,gtk,estil,estils,aspecte,estri,icones,barres d'eines,apps,aplicacions,tema,menú -X-KDE-Keywords[ca@valencia]=gnome,gtk,estil,estils,aspecte,giny(«widget»),icones,barres d'eines,apps,aplicacions,tema,menú -X-KDE-Keywords[cs]=gnome,gtk,styl,styly,vzhled,widget,ikony,nástrojové lišty,aplikace,motiv,nabídka -X-KDE-Keywords[da]=gnome,gtk,stil,udseende,widget,ikoner,værktøjslinjer,apps,programmer,tema,menu -X-KDE-Keywords[de]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,Stile,Stile,Design,Themes,Bedienelemente,Elemente,Bildschirmelemente,Werkzeugleisten,Symbole,Anwendungen,Menü -X-KDE-Keywords[en_GB]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu -X-KDE-Keywords[es]=gnome,gtk,estilo,estilos,apariencia,widget,iconos,barras de herramientas,apps,tema,menú -X-KDE-Keywords[eu]=gnome,gtk,estiloa,estiloak,itxura,trepeta,ikonoak,tresna-barrak,aplikazioak,gaia,menua -X-KDE-Keywords[fi]=gnome,gtk,tyyli,tyylit,ulkoasu,alkio,kuvakkeet,työkalurivit,sovellukset,teema,valikko -X-KDE-Keywords[fr]=gnome,gtk,style,styles,apparence,widget,composant,icônes,barre d'outils,applis,thème,menu -X-KDE-Keywords[gl]=gnome,gtk,estilo,estilos,aparencia,trebello,iconas,barras de ferramentas,aplicativos,tema,menú -X-KDE-Keywords[hu]=gnome,gtk,stílus,megjelenés,widget,ikonok,eszköztárak,alkalmazások,téma,menü -X-KDE-Keywords[id]=gnome,gtk,gaya,style,nuansa,widget,ikon,toolbar,bilah-alat,apl,tema,menu -X-KDE-Keywords[it]=gnome,gtk,stile,stili,aspetto,oggetto,icone,barre degli strumenti,app,tema,menu -X-KDE-Keywords[ko]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,그놈,스타일,위젯,아이콘,도구 모음,프로그램,테마,메뉴 -X-KDE-Keywords[lt]=gnome,gtk,stilius,stiliai,išvaizda,valdiklis,piktogramos,įrankių juostos,programos,apipavidalinimas,meniu -X-KDE-Keywords[nl]=gnome,gtk,stijl,stijlen,uiterlijk,widget,pictogrammen,werkbalken,apps,thema,menu,toepassingen -X-KDE-Keywords[nn]=gnome,gtk,stil,stilar,utsjånad,skjermelement,skjermkontrollar,ikon,verktøylinjer,appar,program,tema,meny -X-KDE-Keywords[pl]=gnome,gtk,styl,style,wygląd,widżet,elementy interfejsu,ikony,paski narzędzi,aplikacje,programy,wygląd,menu -X-KDE-Keywords[pt]=gnome,gtk,estilo,estilos,aparência,elemento,ícones,barras de ferramentas,aplicações,tema,menu -X-KDE-Keywords[pt_BR]=gnome,gtk,estilo,estilos,visual,widget,ícones,barras de ferramentas,apps,aplicativos,tema,menu -X-KDE-Keywords[ru]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,стиль,гном,оформление,внешний вид,виджеты,графические элементы,значки,панели инструментов,тема,меню -X-KDE-Keywords[sk]=gnome,gtk,štýl,štýly,vzhľad,widget,ikony,panel nástrojov,applikácie,téma,ponuka -X-KDE-Keywords[sv]=gnome,gtk,stil,stilar,utseende,komponent,ikoner,verktygsrader,program,tema,meny -X-KDE-Keywords[uk]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,гном,гноме,жтк,стиль,стилі,вигляд,віджет,піктограми,панелі,програми,тема,меню -X-KDE-Keywords[x-test]=xxgnomexx,xxgtkxx,xxstylexx,xxstylesxx,xxlookxx,xxwidgetxx,xxiconsxx,xxtoolbarsxx,xxappsxx,xxthemexx,xxmenuxx -X-KDE-Keywords[zh_CN]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,样式,外观,小部件,图标,工具栏,应用程序,主题,菜单 -X-KDE-Keywords[zh_TW]=gnome,gtk,style,styles,look,widget,icons,toolbars,apps,theme,menu,樣式,樣貌,元件,小工具,圖示,圖標,工具列,應用程式,App,應用,主題,選單,目錄 - -Categories=Qt;KDE;X-KDE-settings-looknfeel;
  50. Download patch gtkproxies/CMakeLists.txt

    --- 4:5.17.5-2/gtkproxies/CMakeLists.txt 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/gtkproxies/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -1,15 +1,10 @@ -find_package(GTK2 REQUIRED) - -include_directories(BEFORE ${GTK2_INCLUDE_DIRS}) - add_executable(reload_gtk_apps reload.c) -target_link_libraries(reload_gtk_apps ${GTK2_LIBRARIES}) +target_link_libraries(reload_gtk_apps PkgConfig::GTK+2) install(TARGETS reload_gtk_apps RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}") - add_executable(gtk_preview preview.c) target_compile_definitions(gtk_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"") -target_link_libraries(gtk_preview ${GTK2_LIBRARIES} ${GTK2_GIOMM_LIBRARY}) +target_link_libraries(gtk_preview PkgConfig::GTK+2) install(TARGETS gtk_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}") # preview file used for the gtk3 version too Binary files 4:5.17.5-2/icons/128-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/128-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/16-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/16-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/22-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/22-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/24-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/24-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/256-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/256-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/32-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/32-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/48-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/48-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/64-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/64-apps-kde-gtk-config.png differ Binary files 4:5.17.5-2/icons/8-apps-kde-gtk-config.png and 4:5.19.5-0ubuntu1/icons/8-apps-kde-gtk-config.png differ
  51. Download patch po/es/kde-gtk-config.po
  52. Download patch src/appearancegtk2.cpp
  53. Download patch po/uk/kde-gtk-config.po
  54. Download patch po/nl/kde-gtk-config.po
  55. Download patch kconf_update/gtktheme.cpp

    --- 4:5.17.5-2/kconf_update/gtktheme.cpp 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kconf_update/gtktheme.cpp 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2020 Mikhail Zolotukhin <zomial@protonmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <QString> +#include <QVariant> + +#include "configeditor.h" + +void upgradeGtk2Theme(); +void upgradeGtk3Theme(); + +int main() { + upgradeGtk2Theme(); + upgradeGtk3Theme(); + return 0; +} + +void upgradeGtk2Theme() { + QString currentGtk2Theme = ConfigEditor::gtk2ConfigValue(QStringLiteral("gtk-theme-name")); + if (currentGtk2Theme.isEmpty() + || currentGtk2Theme == QStringLiteral("oxygen-gtk") + || currentGtk2Theme == QStringLiteral("BreezyGTK") + || currentGtk2Theme == QStringLiteral("Orion") + ) { + ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-theme-name"), QStringLiteral("Breeze")); + } +} + +void upgradeGtk3Theme() { + QString currentGtk3Theme = ConfigEditor::gtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name")); + if (currentGtk3Theme.isEmpty() + || currentGtk3Theme == QStringLiteral("oxygen-gtk") + || currentGtk3Theme == QStringLiteral("BreezyGTK") + || currentGtk3Theme == QStringLiteral("Orion") + ) { + ConfigEditor::setGtk3ConfigValueGSettings(QStringLiteral("gtk-theme"), QStringLiteral("Breeze")); + ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name"), QStringLiteral("Breeze")); + ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Net/ThemeName"), QStringLiteral("Breeze")); + } +}
  56. Download patch kconf_update/CMakeLists.txt

    --- 4:5.17.5-2/kconf_update/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kconf_update/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,39 @@ +add_executable(gtk_theme gtktheme.cpp) + +target_sources(gtk_theme + PRIVATE + ../kded/configeditor.cpp +) + +target_link_libraries(gtk_theme + PRIVATE + Qt5::Core + KF5::ConfigCore + KF5::ConfigWidgets + KF5::GuiAddons + PkgConfig::GIO + PkgConfig::GObject +) + +target_include_directories(gtk_theme + PRIVATE + ../kded/ +) + +target_compile_definitions(gtk_theme + PRIVATE + QT_NO_SIGNALS_SLOTS_KEYWORDS +) + +install( + TARGETS + gtk_theme + DESTINATION + ${LIB_INSTALL_DIR}/kconf_update_bin/ +) +install( + FILES + gtkconfig.upd + DESTINATION + ${KCONF_UPDATE_INSTALL_DIR} +)
  57. Download patch debian/kde-config-gtk-style.install

    --- 4:5.17.5-2/debian/kde-config-gtk-style.install 2020-01-18 20:41:02.000000000 +0000 +++ 4:5.19.5-0ubuntu1/debian/kde-config-gtk-style.install 2020-09-01 11:53:06.000000000 +0000 @@ -1,8 +1,6 @@ +usr/lib/*/gtk-3.0/modules/libcolorreload-gtk-module.so +usr/lib/*/kconf_update_bin/gtk_theme usr/lib/*/libexec/reload_gtk_apps -usr/lib/*/qt5/plugins/kcm_kdegtkconfig.so -usr/share/icons/*/*/apps/kde-gtk-config.* +usr/lib/*/qt5/plugins/kf5/kded/gtkconfig.so usr/share/kcm-gtk-module/ -usr/share/knsrcfiles/cgcgtk3.knsrc -usr/share/knsrcfiles/cgctheme.knsrc -usr/share/kservices5/kde-gtk-config.desktop -usr/share/locale/*/*/kde-gtk-config.mo +usr/share/kconf_update/gtkconfig.upd
  58. Download patch po/gl/kde-gtk-config.po
  59. Download patch po/ar/kde-gtk-config.po
  60. Download patch color-reload-module/CMakeLists.txt

    --- 4:5.17.5-2/color-reload-module/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/color-reload-module/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,19 @@ +add_library(colorreload-gtk3-module MODULE + reloader.c +) + +target_link_libraries(colorreload-gtk3-module + PRIVATE + PkgConfig::GLib2 + PkgConfig::GTK+3 +) + +set_target_properties(colorreload-gtk3-module + PROPERTIES + OUTPUT_NAME libcolorreload-gtk-module +) + +install( + TARGETS colorreload-gtk3-module + DESTINATION ${KDE_INSTALL_LIBDIR}/gtk-3.0/modules +)
  61. Download patch src/iconthemesmodel.cpp

    --- 4:5.17.5-2/src/iconthemesmodel.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/iconthemesmodel.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "iconthemesmodel.h" -#include <QDir> -#include <QDirIterator> -#include <QDebug> -#include <QSet> -#include <KIconTheme> -#include <QStandardPaths> - -IconThemesModel::IconThemesModel(bool onlyHome, QObject* parent) - : QStandardItemModel(parent) - , m_onlyHome(onlyHome) -{ - reload(); -} - -QList<QDir> IconThemesModel::installedThemesPaths() -{ - QList<QDir> availableIcons; - - QSet<QString> dirs; - dirs += QDir::home().filePath(".icons"); - if(!m_onlyHome) { - dirs += QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory).toSet(); - } - - foreach(const QString& dir, dirs) { - QDir userIconsDir(dir); - QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs|QDir::NoSymLinks); - while(it.hasNext()) { - QString currentPath = it.next(); - QDir dir(currentPath); - - if(dir.exists() && dir.exists("index.theme")) { - availableIcons << dir; - } - } - } - - return availableIcons; -} - -bool greatSizeIs48(const QString& a, const QString& b) -{ - bool a48=a.contains("48"), b48=b.contains("48"); - if((a48 && b48) || (!a48 && !b48)) - return a<b; - else - return a48; -} - -QString IconThemesModel::findIconRecursivelyByName(const QString& name, const QDir& directory) -{ - return findFilesRecursively(QStringList() << (name+".png") << (name+".svg") << (name+".svgz"), directory); -} - -QString IconThemesModel::findFilesRecursively(const QStringList& wildcard, const QDir& directory) -{ - Q_ASSERT(directory.isAbsolute()); - QFileInfoList entries = directory.entryInfoList(wildcard, QDir::Files); - foreach(const QFileInfo& f, entries) { - return f.absoluteFilePath(); - } - - QStringList subdirs = directory.entryList(QDir::AllDirs|QDir::NoDotAndDotDot); - qSort(subdirs.begin(), subdirs.end(), greatSizeIs48); - foreach(const QString& subdir, subdirs) { - QString ret = findFilesRecursively(wildcard, QDir(directory.filePath(subdir))); - if(!ret.isEmpty()) - return ret; - } - - return QString(); -} - -void IconThemesModel::reload() -{ - clear(); - - QSet<QString> done; - QList<QDir> paths = installedThemesPaths(); - Q_FOREACH(const QDir& dir, paths) { - KIconTheme theme(dir.dirName()); - if (!theme.isValid()) { //most likely a cursor theme -// qWarning() << "invalid theme" << dir.dirName(); - continue; - } - - if (done.contains(dir.dirName())) - continue; - - done << dir.dirName(); - - QStandardItem* item = new QStandardItem(dir.dirName()); - item->setData(dir.path(), PathRole); - item->setData(dir.dirName(), DirNameRole); - - item->setText(theme.name()); - item->setToolTip(theme.description()); - item->setData(theme.inherits(), IconThemesModel::InheritsRole); - QString iconName = theme.example(); - if (iconName.isEmpty()) - iconName = QStringLiteral("folder"); - - QString path = theme.iconPathByName(iconName, 16, KIconLoader::MatchBest); - item->setIcon(QIcon(path)); - - appendRow(item); - } -}
  62. Download patch src/abstractappearance.cpp

    --- 4:5.17.5-2/src/abstractappearance.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/abstractappearance.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "abstractappearance.h" -#include <qregexp.h> -#include <QDir> -#include <QDebug> - -static bool isTrue(const QString& value) -{ - return value == "1" || value == "true"; -} - -//SETTERS -void AbstractAppearance::setTheme(const QString& name) { m_settings["theme"] = name;} -void AbstractAppearance::setCursor(const QString& cur) { m_settings["cursor"] = cur;} -void AbstractAppearance::setIcon(const QString& ic) { m_settings["icon"] = ic;} -void AbstractAppearance::setIconFallback(const QString& fall) { m_settings["icon_fallback"] = fall; } -void AbstractAppearance::setFont(const QString& fo) { m_settings["font"] = fo;} -void AbstractAppearance::setShowIconsInButtons(bool show) { m_settings["show_icons_buttons"] = show ? "1" : "0"; } -void AbstractAppearance::setShowIconsInMenus(bool show) { m_settings["show_icons_menus"] = show ? "1" : "0"; } -void AbstractAppearance::setPrimaryButtonWarpsSlider(bool enabled) { m_settings["primary_button_warps_slider"] = enabled ? "1" : "0"; } -void AbstractAppearance::setToolbarStyle(const QString& toolbar_style) { m_settings["toolbar_style"] = toolbar_style; } - -// GETTERS -QString AbstractAppearance::getTheme() const { return m_settings["theme"];} -QString AbstractAppearance::getCursor() const { return m_settings["cursor"];} -QString AbstractAppearance::getIcon() const { return m_settings["icon"];} -QString AbstractAppearance::getIconFallback() const { return m_settings["icon_fallback"]; } -QString AbstractAppearance::getFont() const { return m_settings["font"]; } -QString AbstractAppearance::getThemeGtk3() const { return m_settings["themegtk3"]; } -QString AbstractAppearance::getToolbarStyle() const { return m_settings["toolbar_style"]; } -bool AbstractAppearance::getShowIconsInButtons() const { return isTrue(m_settings["show_icons_buttons"]); } -bool AbstractAppearance::getShowIconsInMenus() const { return isTrue(m_settings["show_icons_menus"]); } -bool AbstractAppearance::getPrimaryButtonWarpsSlider() const { return isTrue(m_settings["primary_button_warps_slider"]); } - -QRegExp valueRx(" *([a-zA-Z\\-_]+) *= *\"?([^\"\\n]+)\"?", Qt::CaseSensitive, QRegExp::RegExp2); -QMap<QString,QString> AbstractAppearance::readSettingsTuples(QIODevice* device) -{ - QMap<QString, QString> ret; - QTextStream flow(device); - for(; !flow.atEnd() ;) { - QString line = flow.readLine(); - int idxComment = line.indexOf('#'); - if(idxComment>=0) - line = line.left(idxComment).simplified(); - - if(valueRx.exactMatch(line)) - ret[valueRx.cap(1)] = valueRx.cap(2); - else if(line.startsWith("include \"")) { - QString filename = line.mid(9); - filename.chop(1); -// qDebug() << "including: " << filename; - QFile f(filename); - if(f.open(QFile::Text|QFile::ReadOnly)) { - ret.unite(readSettingsTuples(&f)); - } else - qWarning() << "couldn't include " << filename; - } -// else if(!line.isEmpty()) -// qWarning() << "misinterpreted line" << line; - } - return ret; -} - -QStringList AbstractAppearance::installedThemesNames() const -{ - QStringList themes = installedThemes(); - QStringList ret; - - foreach(const QString& theme, themes) - ret += QDir(theme).dirName(); - - return ret; -} - -bool AbstractAppearance::hasProperty(const QString& key) const -{ - return !m_settings.value(key).isEmpty(); -}
  63. Download patch src/abstractappearance.h

    --- 4:5.17.5-2/src/abstractappearance.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/abstractappearance.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef ABSTACTAPPEARANCE_H -#define ABSTACTAPPEARANCE_H - -#include <QStringList> -#include <QMap> -#include <QIODevice> - -class AbstractAppearance -{ - public: - virtual ~AbstractAppearance() {} - virtual bool loadSettings() = 0; - virtual bool saveSettings() const = 0; - virtual bool loadSettings(const QString& path) = 0; - virtual bool saveSettings(const QString& path) const = 0; - - /** @returns the installed themes' paths*/ - virtual QStringList installedThemes() const = 0; - - void setTheme(const QString& name); - void setCursor(const QString& name); - void setIcon(const QString& name); - void setIconFallback(const QString& name); - void setFont(const QString& font); - void setShowIconsInMenus(bool show); - void setShowIconsInButtons(bool show); - void setPrimaryButtonWarpsSlider(bool enabled); - void setToolbarStyle(const QString& style); - - QString getTheme() const; - QString getCursor() const; - QString getIcon() const; - QString getIconFallback() const; - QString getFont() const; - QString getThemeGtk3() const; - QString getToolbarStyle() const; - bool getShowIconsInButtons() const; - bool getShowIconsInMenus() const; - bool getPrimaryButtonWarpsSlider() const; - - QStringList installedThemesNames() const; - bool hasProperty(const QString& key) const; - - static QMap<QString,QString> readSettingsTuples(QIODevice* device); - - protected: - QMap<QString, QString> m_settings; -}; - -#endif
  64. Download patch po/sr@latin/kde-gtk-config.po
  65. Download patch po/id/kde-gtk-config.po
  66. Download patch po/zh_TW/kde-gtk-config.po
  67. Download patch kde-gtk-config.kdev4

    --- 4:5.17.5-2/kde-gtk-config.kdev4 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kde-gtk-config.kdev4 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -[Project] -Manager=KDevCMakeManager -Name=kde-gtk-config
  68. Download patch src/gtkconfigkcmodule.h

    --- 4:5.17.5-2/src/gtkconfigkcmodule.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/gtkconfigkcmodule.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - - -#ifndef GTKCONFIGKCMODULE_H -#define GTKCONFIGKCMODULE_H - -#include <kcmodule.h> -#include "appearencegtk.h" -#include "dialog_installer.h" -#include "dialog_uninstaller.h" -#include <kns3/downloaddialog.h> -#include "iconthemesmodel.h" -#include "cursorthemesmodel.h" - -class KProcess; -namespace Ui { class Modulo; class GUI; } - -class GTKConfigKCModule : public KCModule -{ - Q_OBJECT -public: - explicit GTKConfigKCModule(QWidget* parent = 0 ,const QVariantList& args = QVariantList() ); - ~GTKConfigKCModule(); - - void refreshThemesUi(bool useConfig=false); - - void save() override; - void defaults() override; - void load() override; - -public slots: - void refreshLists(); - void makePreviewIconTheme(); - - ///it is called whenever something in the UI has changed - void appChanged(); - void savePreviewConfig(); - - void showThemeGHNS(); - void installThemeGTK3GHNS(); - - void showDialogForInstall(); - void showDialogForUninstall(); - - void runGtk2IfNecessary(bool); - void runGtk3IfNecessary(bool); - void untogglePreview(); - -signals: - void selectedIconTheme(); - -private: - void syncUI(); - bool m_loading = false; - - Ui::GUI *ui; - AppearenceGTK *appareance; - - DialogInstaller *installer; - DialogUninstaller *uninstaller; - KProcess* m_p2; - KProcess* m_p3; - QString m_tempGtk2Preview; - QString m_tempGtk3Preview; - bool m_saveEnabled; - CursorThemesModel* m_cursorsModel; - IconThemesModel* m_iconsModel; -}; - -#endif // MODULO_H
  69. Download patch po/sk/kde-gtk-config.po
  70. Download patch po/he/kde-gtk-config.po
  71. Download patch src/gtkconfigkcmodule.cpp
  72. Download patch README

    --- 4:5.17.5-2/README 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -KDE GTK CONFIG v1.7 ----------------------- - -Copyright (c) 2011 - Jose Antonio Sánchez Reynaga <joanzare@gmail.com> and the Team behind Chakra -Copyright (c) 2011 - Aleix Pol Gonzalez <aleixpol@kde.org> - -This program it's licensed under GPLv3 - -Compilation: -$ mkdir build && cd build -$ cmake -DCMAKE_INSTALL_PREFIX=/usr .. -$ make -# make install - -Features: - -> Themes installation -> Themes uninstallation -> Icon themes selection -> Icon themes fallback selection -> themes selection -> fonts selection - -enjoy !
  73. Download patch po/sr@ijekavian/kde-gtk-config.po
  74. Download patch kded/configeditor.cpp
  75. Download patch po/sr@ijekavianlatin/kde-gtk-config.po
  76. Download patch cgctheme.knsrc

    --- 4:5.17.5-2/cgctheme.knsrc 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/cgctheme.knsrc 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -[KNewStuff3] -Name=GTK 2.x Themes -Name[ar]=سمات جتك الثّانية -Name[ca]=Temes GTK 2.x -Name[ca@valencia]=Temes GTK 2.x -Name[cs]=Motivy GTK 2.x -Name[da]=GTK 2.x-temaer -Name[de]=GTK 2.x-Designs -Name[el]=Θέματα GTK 2.x -Name[en_GB]=GTK 2.x Themes -Name[es]=Temas de GTK 2.x -Name[eu]=GTK 2.x gaiak -Name[fi]=GTK 2.x -teemat -Name[fr]=Thèmes GTK 2.x -Name[gl]=Temas de GTK 2.x -Name[he]=ערכות נושא של GTK 2.x -Name[hu]=GTK 2.x témák -Name[id]=Tema GTK 2.x -Name[it]=Temi GTK 2.x -Name[ko]=GTK 2.x 테마 -Name[lt]=GTK 2.x apipavidalinimai -Name[nl]=GTK 2.x thema's -Name[nn]=GTK 2.x-tema -Name[pl]=Wygląd GTK 2.x -Name[pt]=Temas do GTK 2.x -Name[pt_BR]=Temas GTK 2.x -Name[ru]=Темы GTK 2.x -Name[sk]=Témy GTK 2.x -Name[sl]=Teme GTK 2.x -Name[sr]=ГТК 2.x теме -Name[sr@ijekavian]=ГТК 2.x теме -Name[sr@ijekavianlatin]=GTK 2.x teme -Name[sr@latin]=GTK 2.x teme -Name[sv]=GTK 2.x-teman -Name[tr]=GTK 2.x Temaları -Name[uk]=Теми GTK 2.x -Name[x-test]=xxGTK 2.x Themesxx -Name[zh_CN]=GTK 2.x 主题 -Name[zh_TW]=GTK 2.x 主題 - -Categories=GTK 2.x Theme/Style -Uncompress=always -InstallPath=.themes
  77. Download patch src/thread.h

    --- 4:5.17.5-2/src/thread.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/thread.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef THREAD_H -#define THREAD_H - -#include <installer.h> -#include <kjob.h> - -/** - Used so that we don't block the GUI when we install the themes - */ -class Thread: public KJob -{ -Q_OBJECT -public: - Thread(const QString& ); - void start() override; - - ///sets the icon path - void setUrlPackage(const QString& ); - - ///@returns whether it was successful - bool isSuccess() const; - -signals: - void started(); - -private: - QString action; - QString urlPackage; -}; - -class ThreadAnalisysTheme: public KJob -{ -public: - void start() override; - - ///@returns whether the theme is correct - bool isSuccess() const; - - ///sets the theme to analyze - void setPackageTheme(const QString& ); -private: - QString packageTheme; -}; - -class ThreadAnalisysThemeIcon: public KJob -{ -public: - void start() override; - - ///@returns whether the theme is correct - bool isSuccess(); - - ///sets what theme to use - void setPackageTheme(const QString& ); -private: - QString packageTheme; -}; - -/** - Thread to erase the icons - */ -class ThreadErase: public KJob -{ -Q_OBJECT -public: - void start() override; - - bool isSuccess(); - void setThemeForErase(const QString& theme ); -private: - QString themeForErase; - -public slots: - void deleted(KJob*); -}; - -#endif // THREAD_H - -
  78. Download patch src/cursorthemesmodel.cpp

    --- 4:5.17.5-2/src/cursorthemesmodel.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/cursorthemesmodel.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2016 Jason A. Donenfeld <Jason@zx2c4.com> - * Copyright 2016 Andrey Bondrov <andrey.bondrov@rosalab.ru> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "cursorthemesmodel.h" -#include <QDir> -#include <QDirIterator> -#include <QSet> -#include <QStandardPaths> -#include <KIconTheme> -#include <KShell> - -#include <X11/Xcursor/Xcursor.h> - -CursorThemesModel::CursorThemesModel(QObject* parent) - : IconThemesModel(parent) -{ - reload(); -} - -QList<QDir> CursorThemesModel::installedThemesPaths() -{ - QList<QDir> availableIcons; - QStringList dirs(QString(XcursorLibraryPath()).split(':', QString::SkipEmptyParts)); - - std::transform(dirs.begin(), dirs.end(), dirs.begin(), KShell::tildeExpand); - dirs.removeDuplicates(); - - foreach(const QString& dir, dirs) { - QDir userIconsDir(dir); - QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs|QDir::NoSymLinks); - while(it.hasNext()) { - QString currentPath = it.next(); - QDir dir(currentPath); - - if(dir.exists() && dir.exists("cursors")) - availableIcons << dir; - } - } - return availableIcons; -} - -void CursorThemesModel::fillItem(const QDir& dir, QStandardItem* item) -{ - KIconTheme theme(dir.dirName()); - if(!theme.name().isEmpty()) - item->setText(theme.name()); - else - item->setText(dir.dirName()); - item->setToolTip(theme.description()); - item->setData(theme.inherits(), CursorThemesModel::InheritsRole); -} - - - -void CursorThemesModel::reload() -{ - clear(); - - QList<QDir> paths = installedThemesPaths(); - Q_FOREACH(const QDir& dir, paths) { - QStandardItem* themeit = new QStandardItem(dir.dirName()); - themeit->setData(dir.path(), PathRole); - themeit->setData(dir.dirName(), DirNameRole); - fillItem(dir, themeit); - appendRow(themeit); - } -}
  79. Download patch po/sv/kde-gtk-config.po
  80. Download patch src/fontshelpers.h

    --- 4:5.17.5-2/src/fontshelpers.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/fontshelpers.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef FONTSHELPERS_H -#define FONTSHELPERS_H - -#include <QFont> - -QString fontToString(const QFont& f); -QFont stringToFont(const QString& font); - -#endif
  81. Download patch po/ro/kde-gtk-config.po
  82. Download patch src/ui/dialog_uninstaller.ui
  83. Download patch src/ui/dialog_installer.ui
  84. Download patch po/ko/kde-gtk-config.po
  85. Download patch kded/CMakeLists.txt

    --- 4:5.17.5-2/kded/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kded/CMakeLists.txt 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,34 @@ +set(kscreen_daemon_SRCS + gtkconfig.cpp + configeditor.cpp + configvalueprovider.cpp + themepreviewer.cpp +) + +add_library(gtkconfig MODULE ${kscreen_daemon_SRCS}) + +target_compile_definitions(gtkconfig + PUBLIC + -DQT_NO_SIGNALS_SLOTS_KEYWORDS +) + +target_include_directories(gtkconfig + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${GTK3_INCLUDE_DIRS} +) + +target_link_libraries(gtkconfig + PUBLIC + Qt5::DBus + KF5::CoreAddons + KF5::ConfigCore + KF5::ConfigWidgets + KF5::DBusAddons + PkgConfig::GTK+3 + KF5::GuiAddons + PkgConfig::GIO + PkgConfig::GObject +) + +install(TARGETS gtkconfig DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kded)
  86. Download patch src/appearencegtk.h

    --- 4:5.17.5-2/src/appearencegtk.h 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/appearencegtk.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef APARIENCIAGTK_H -#define APARIENCIAGTK_H - -#include <QString> -#include <QMap> -#include <qvector.h> - -class AbstractAppearance; -/** - * This class is responsible of administrating the GTK themes. It loads the - * configurations from the .gtkrc-2.0 file. - */ -class AppearenceGTK -{ -public: - AppearenceGTK(); - ~AppearenceGTK(); - - void setTheme(const QString&); - void setThemeGtk3(const QString &theme); - void setApplicationPreferDarkTheme(const bool& enable); - void setCursor(const QString&); - void setIcon(const QString&); - void setIconFallback(const QString&); - void setFont(const QString&); - - void setToolbarStyle(const QString&); - void setShowIconsInMenus(const bool& show); - void setShowIconsInButtons(const bool& show); - void setPrimaryButtonWarpsSlider(const bool &enable); - - QString getTheme() const; - QString getThemeGtk3() const; - bool getApplicationPreferDarkTheme() const; - - QString getCursor() const; - QString getIcon() const; - QString getFont() const; - QString getIconFallback() const; - QString getToolbarStyle() const; - bool getShowIconsInMenus() const; - bool getShowIconsInButtons() const; - bool getPrimaryButtonWarpsSlider() const; - - bool loadFileConfig(); - bool saveFileConfig(); - - AbstractAppearance* gtk2Appearance() const { return m_app.first(); } - AbstractAppearance* gtk3Appearance() const { return m_app.last(); } -private: - QVector<AbstractAppearance*> m_app; -}; - -#endif // APARIENCIAGTK_H
  87. Download patch po/zh_CN/kde-gtk-config.po
  88. Download patch po/ca@valencia/kde-gtk-config.po
  89. Download patch kded/configvalueprovider.cpp
  90. Download patch cmake/modules/FindGTK2.cmake
  91. Download patch po/ru/kde-gtk-config.po
  92. Download patch po/hu/kde-gtk-config.po
  93. Download patch color-reload-module/reloader.c

    --- 4:5.17.5-2/color-reload-module/reloader.c 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/color-reload-module/reloader.c 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2020 Carson Black <uhhadd@gmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <gtk/gtk.h> +#include <glib.h> +#include <gio/gio.h> +#include <gdk/gdk.h> + +gchar *path; +GFile *file; +GFileMonitor *mon; +GtkCssProvider *provider; + +void reload_colours() { + if (provider == NULL) { + provider = gtk_css_provider_new(); + } else { + gtk_style_context_remove_provider_for_screen( + gdk_screen_get_default(), + GTK_STYLE_PROVIDER(provider) + ); + g_clear_object(&provider); + provider = gtk_css_provider_new(); + } + gtk_style_context_add_provider_for_screen( + gdk_screen_get_default(), + GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_USER+1 + ); + gtk_css_provider_load_from_file( + provider, + file, + NULL + ); +} + +__attribute__((visibility("default"))) void gtk_module_init(gint *argc, gchar ***argv[]) { + path = g_strconcat(g_get_user_config_dir(), "/gtk-3.0/colors.css", NULL); + file = g_file_new_for_path(path); + + mon = g_file_monitor_file( + file, + G_FILE_MONITOR_NONE, + NULL, + NULL + ); + + g_signal_connect(mon, "changed", G_CALLBACK(reload_colours), NULL); +}
  94. Download patch po/fi/kde-gtk-config.po
  95. Download patch cmake/modules/FindGTK3.cmake

    --- 4:5.17.5-2/cmake/modules/FindGTK3.cmake 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/cmake/modules/FindGTK3.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -# - Find gtk3, glib -# Defines: -# GTK3_FOUND -# GTK3_INCLUDE_DIRS -# GTK3_LIBRARY_DIRS -# GTK3_DEFINITIONS -# GTK3_DEFINITIONS - -FIND_PACKAGE(PkgConfig) - -# -# gtk -# -PKG_CHECK_MODULES(PC_GTK3 REQUIRED gtk+-3.0) - -SET(GTK3_DEFINITIONS ${PC_GTK3_CXXFLAGS_OTHER}) - -FIND_PATH( - GTK3_INCLUDE_DIR gtk/gtk.h - HINTS ${PC_GTK3_INCLUDEDIR} ${PC_GTK3_INCLUDE_DIRS} - PATH_SUFFIXES gtk-3.0) - -FIND_LIBRARY( - GTK3_LIBRARY NAMES gtk-3 - HINTS ${PC_GTK3_LIBDIR} ${PC_GTK3_LIBRARY_DIRS}) - -# -# glib -# -PKG_CHECK_MODULES(PC_GLIB2 REQUIRED glib-2.0) - -SET(GLIB2_DEFINITIONS ${PC_GLIB2_CXXFLAGS_OTHER}) - -FIND_PATH( - GLIB2_INCLUDE_DIR_PART1 glib.h - HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0) - -FIND_PATH( - GLIB2_INCLUDE_DIR_PART2 glibconfig.h - HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/include) - -SET(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) - -FIND_LIBRARY( - GLIB2_LIBRARY NAMES glib-2.0 - HINTS ${PC_GLIB2_LIBDIR} ${PC_GLIB2_LIBRARY_DIRS}) - -# -# gobject -# -PKG_CHECK_MODULES(PC_GOBJECT2 REQUIRED gobject-2.0) - -SET(GLIB2_DEFINITIONS ${PC_GOBJECT2_CXXFLAGS_OTHER}) - -FIND_PATH( - GOBJECT2_INCLUDE_DIR_PART1 glib.h - HINTS ${PC_GOBJECT2_INCLUDEDIR} ${PC_GOBJECT2_INCLUDE_DIRS} - PATH_SUFFIXES gobject-2.0) - -FIND_PATH( - GOBJECT2_INCLUDE_DIR_PART2 gobject.h - HINTS ${PC_GOBJECT2_INCLUDEDIR} ${PC_GOBJECT2_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/gobject) - -SET(GOBJECT2_INCLUDE_DIR ${GOBJECT2_INCLUDE_DIR_PART1} ${GOBJECT2_INCLUDE_DIR_PART2}) - -FIND_LIBRARY( - GOBJECT2_LIBRARY NAMES gobject-2.0 - HINTS ${PC_GOBJECT2_LIBDIR} ${PC_GOBJECT2_LIBRARY_DIRS}) - -# -# gio -# -PKG_CHECK_MODULES(PC_GIO2 REQUIRED gio-2.0) - -SET(GLIB2_DEFINITIONS ${PC_GIO2_CXXFLAGS_OTHER}) - -FIND_PATH( - GIO2_INCLUDE_DIR_PART1 glib.h - HINTS ${PC_GIO2_INCLUDEDIR} ${PC_GIO2_INCLUDE_DIRS} - PATH_SUFFIXES gio) - -FIND_PATH( - GIO2_INCLUDE_DIR_PART2 gio.h - HINTS ${PC_GIO2_INCLUDEDIR} ${PC_GIO2_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/gio) - -SET(GIO2_INCLUDE_DIR ${GIO2_INCLUDE_DIR_PART1} ${GIO2_INCLUDE_DIR_PART2}) - -FIND_LIBRARY( - GIO2_LIBRARY NAMES gio-2.0 - HINTS ${PC_GIO2_LIBDIR} ${PC_GIO2_LIBRARY_DIRS}) - - -# -# pango -# -PKG_CHECK_MODULES(PC_PANGO REQUIRED pango) - -SET(PANGO_DEFINITIONS ${PC_PANGO_CXXFLAGS_OTHER}) - -FIND_PATH( - PANGO_INCLUDE_DIR pango/pango.h - HINTS ${PC_PANGO_INCLUDEDIR} ${PC_PANGO_INCLUDE_DIRS} - PATH_SUFFIXES pango-1.0) - -FIND_LIBRARY( - PANGO_LIBRARY NAMES pango-1.0 - HINTS ${PC_PANGO_LIBDIR} ${PC_PANGO_LIBRARY_DIRS}) - -# -# harfbuzz -# -if(PC_PANGO_VERSION VERSION_EQUAL 1.44 OR PC_PANGO_VERSION VERSION_GREATER 1.44) - PKG_CHECK_MODULES(PC_HARFBUZZ REQUIRED harfbuzz) - - SET(HARFBUZZ_DEFINITIONS ${PC_HARFBUZZ_CXXFLAGS_OTHER}) - - FIND_PATH( - HARFBUZZ_INCLUDE_DIR hb.h - HINTS ${PC_HARFBUZZ_INCLUDEDIR} ${PC_HARFBUZZ_INCLUDE_DIRS} - PATH_SUFFIXES harfbuzz) - - FIND_LIBRARY( - HARFBUZZ_LIBRARY NAMES harfbuzz - HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS}) -endif() - -# -# cairo -# -PKG_CHECK_MODULES(PC_CAIRO REQUIRED cairo) - -SET(CAIRO_DEFINITIONS ${PC_CAIRO_CXXFLAGS_OTHER}) - -FIND_PATH( - CAIRO_INCLUDE_DIR cairo.h - HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIRS} - PATH_SUFFIXES cairo) - -FIND_LIBRARY( - CAIRO_LIBRARY NAMES cairo - HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}) - -# -# gdk-pixbuf -# -PKG_CHECK_MODULES(PC_GDKPIXBUF REQUIRED gdk-pixbuf-2.0) - -SET(GDKPIXBUF_DEFINITIONS ${PC_GDKPIXBUF_CXXFLAGS_OTHER}) - -FIND_PATH( - GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h - HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS} - PATH_SUFFIXES gdk-pixbuf-2.0) - -FIND_LIBRARY( - GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 - HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS}) - -# -# atk -# -PKG_CHECK_MODULES(PC_ATK REQUIRED atk) - -SET(ATK_DEFINITIONS ${PC_ATK_CXXFLAGS_OTHER}) - -FIND_PATH( - ATK_INCLUDE_DIR atk/atk.h - HINTS ${PC_ATK_INCLUDEDIR} ${PC_ATK_INCLUDE_DIRS} - PATH_SUFFIXES atk-1.0) - -FIND_LIBRARY( - ATK_LIBRARY NAMES atk-1.0 - HINTS ${PC_ATK_LIBDIR} ${PC_ATK_LIBRARY_DIRS}) - -# -# -#result -# -# -SET(GTK3_LIBRARY_DIRS ${GTK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${HARFBUZZ_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) -SET(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${GIO2_INCLUDE_DIR} ${HARFBUZZ_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) - -INCLUDE(FindPackageHandleStandardArgs) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - GTK3 DEFAULT_MSG - GTK3_LIBRARY GTK3_INCLUDE_DIR) - -MARK_AS_ADVANCED(GTK3_INCLUDE_DIR GTK3_LIBRARY)
  96. Download patch src/installer.cpp

    --- 4:5.17.5-2/src/installer.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/installer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "installer.h" -#include <QDir> -#include <QProcess> -#include <KTar> - -bool Installer::installTheme(const QString &urlPackage) -{ - QString dest(QDir::homePath()+"/.themes"); - QDir::home().mkpath(dest); - - KTar package(urlPackage); - if(!package.open(QIODevice::ReadOnly)) - return false; - package.directory()->copyTo(dest); - return true; -} - -bool Installer::installIconTheme(const QString &urlPackage) -{ - QString dest(QDir::homePath()+"/.icons"); - QDir::home().mkpath(dest); - - KTar package(urlPackage); - if(!package.open(QIODevice::ReadOnly)) - return false; - package.directory()->copyTo(dest); - return true; -}
  97. Download patch kconf_update/gtkconfig.upd

    --- 4:5.17.5-2/kconf_update/gtkconfig.upd 1970-01-01 00:00:00.000000000 +0000 +++ 4:5.19.5-0ubuntu1/kconf_update/gtkconfig.upd 2020-09-01 10:24:51.000000000 +0000 @@ -0,0 +1,3 @@ +Version=5 +Id=gtk_theme +Script=gtk_theme
  98. Download patch src/fontshelpers.cpp

    --- 4:5.17.5-2/src/fontshelpers.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/fontshelpers.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "fontshelpers.h" -#include <QFontDatabase> -#include <QRegularExpression> -#include <QDebug> -#include <QStringList> - -QString fontToString(const QFont& f) -{ - return f.family() + ' ' + f.styleName() + ' ' + QString::number(f.pointSize()); -} - -QFont stringToFont(const QString& font) -{ - QFontDatabase fdb; - QString fontFamily; - int familyIdx=-1; - QStringList allFamilies = fdb.families(); - for(int idx=font.indexOf(' '); idx<font.size() && idx>=0; idx=font.indexOf(' ', idx+1)) { - QString testFont = font.left(idx); - if(allFamilies.contains(testFont)) { - fontFamily = testFont; - familyIdx = idx; - } - } - - QFont f; - f.setFamily(fontFamily); - QRegularExpression fontRx(QStringLiteral(" (.*) +([0-9]+)$")); - QRegularExpressionMatch match = fontRx.match(font, familyIdx); - if (match.isValid()) { - QString fontStyle = match.captured(1).trimmed(); - int fontSize = match.captured(2).toInt(); - f.setStyleName(fontStyle); - f.setPointSize(fontSize); - } else { - qWarning() << "Couldn't figure out style and size" << font; - } - return f; -}
  99. Download patch kded/gtkconfig.cpp
  100. Download patch src/appearancegtk3.cpp

    --- 4:5.17.5-2/src/appearancegtk3.cpp 2020-01-07 15:23:26.000000000 +0000 +++ 4:5.19.5-0ubuntu1/src/appearancegtk3.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ -/* KDE GTK Configuration Module - * - * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com> - * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) version 3, or any - * later version accepted by the membership of KDE e.V. (or its - * successor approved by the membership of KDE e.V.), which shall - * act as a proxy defined in Section 6 of version 3 of the license. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "appearancegtk3.h" -#include <QFile> -#include <QDir> -#include <QDebug> -#include <QStandardPaths> -#include <KSharedConfig> -#include <KConfigGroup> - -#undef signals -#include <gio/gio.h> -#include <gtk/gtk.h> -#define signals Q_SIGNALS - -QStringList AppearanceGTK3::installedThemes() const -{ - QFileInfoList availableThemes; - foreach(const QString& themesDir, QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "themes", QStandardPaths::LocateDirectory)) { - QDir root(themesDir); - availableThemes += root.entryInfoList(QDir::NoDotAndDotDot|QDir::AllDirs); - } - - //Also show the user-installed themes - QDir user(QDir::homePath()+"/.themes"); - availableThemes += user.entryInfoList(QDir::NoDotAndDotDot|QDir::AllDirs); - - //we just want actual themes - QStringList themes; - - // Check that the theme contains a gtk-3.* subdirectory - QStringList gtk3SubdirPattern{QStringLiteral("gtk-3.*")}; - for(QFileInfoList::const_iterator it=availableThemes.constBegin(); it!=availableThemes.constEnd(); ++it) { - QDir themeDir(it->filePath()); - if(!themeDir.entryList(gtk3SubdirPattern, QDir::Dirs).isEmpty()) - themes += it->filePath(); - } - - return themes; -} - -bool AppearanceGTK3::saveSettings(const KSharedConfig::Ptr& file) const -{ - KConfigGroup group(file, "Settings"); - - group.writeEntry("gtk-font-name", m_settings["font"]); - group.writeEntry("gtk-theme-name", m_settings["theme"]); - group.writeEntry("gtk-icon-theme-name", m_settings["icon"]); - group.writeEntry("gtk-fallback-icon-theme", m_settings["icon_fallback"]); - group.writeEntry("gtk-cursor-theme-name", m_settings["cursor"]); - group.writeEntry("gtk-toolbar-style", m_settings["toolbar_style"]); - group.writeEntry("gtk-menu-images", m_settings["show_icons_menus"]); - group.writeEntry("gtk-button-images", m_settings["show_icons_buttons"]); - group.writeEntry("gtk-primary-button-warps-slider", m_settings["primary_button_warps_slider"]); - group.writeEntry("gtk-application-prefer-dark-theme", m_settings["application_prefer_dark_theme"]); - - const bool sync = group.sync(); - Q_ASSERT(sync); - return true; -} - -bool AppearanceGTK3::loadSettings(const KSharedConfig::Ptr& file) -{ - KConfigGroup group(file, "Settings"); - - if (!file || !group.isValid()) { - qWarning() << "Cannot open the GTK3 config file" << file; - return false; - } - - m_settings = QMap<QString, QString> { - {"toolbar_style", "GTK_TOOLBAR_ICONS"}, - {"show_icons_buttons", "0"}, - {"show_icons_menus", "0"}, - {"primary_button_warps_slider", "false"}, - {"application_prefer_dark_theme", "false"} - }; - - m_settings["theme"] = group.readEntry("gtk-theme-name"); - m_settings["icon"] = group.readEntry("gtk-icon-theme-name"); - m_settings["icon_fallback"] = group.readEntry("gtk-fallback-icon-theme"); - m_settings["cursor"] = group.readEntry("gtk-cursor-theme-name"); - m_settings["font"] = group.readEntry("gtk-font-name"); - m_settings["toolbar_style"] = group.readEntry("gtk-toolbar-style"); - m_settings["show_icons_buttons"] = group.readEntry("gtk-button-images"); - m_settings["show_icons_menus"] = group.readEntry("gtk-menu-images"); - m_settings["primary_button_warps_slider"] = group.readEntry("gtk-primary-button-warps-slider"); - m_settings["application_prefer_dark_theme"] = group.readEntry("gtk-application-prefer-dark-theme"); - for(auto it = m_settings.begin(); it != m_settings.end(); ) { - if (it.value().isEmpty()) - it = m_settings.erase(it); - else - ++it; - } - return true; -} - -QString AppearanceGTK3::configFileName() const -{ - return QStringLiteral("gtk-3.0/settings.ini"); -} - -QString AppearanceGTK3::defaultConfigFile() const -{ - QString root = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation); - if(root.isEmpty()) - root = QFileInfo(QDir::home(), ".config").absoluteFilePath(); - - return root + '/' + configFileName(); -} - -bool AppearanceGTK3::getApplicationPreferDarkTheme() const -{ - return m_settings["application_prefer_dark_theme"] == "1" || m_settings["application_prefer_dark_theme"] == "true"; -} - -void AppearanceGTK3::setApplicationPreferDarkTheme(const bool& enable) -{ - m_settings["application_prefer_dark_theme"] = enable ? "true" : "false"; -} - -bool AppearanceGTK3::saveSettings(const QString& file) const -{ - auto cfg = KSharedConfig::openConfig(file, KConfig::NoGlobals); - return saveSettings(cfg); -} - -bool AppearanceGTK3::loadSettings(const QString& path) -{ - auto cfg = KSharedConfig::openConfig(path, KConfig::NoGlobals); - return loadSettings(cfg); -} - -bool AppearanceGTK3::loadSettings() -{ - auto cfg = KSharedConfig::openConfig(configFileName(), KConfig::NoGlobals); - return loadSettings(cfg); -} - -bool AppearanceGTK3::saveSettings() const -{ - // FIXME kdebz#387417 - // We should maybe use GSettings everywhere in future, but at this moment we - // need this to have this configuration available in sandboxed applications which - // is only possible through dconf - gtk_init(nullptr, nullptr); - - g_autoptr(GSettings) gsettings = g_settings_new("org.gnome.desktop.interface"); - g_settings_set_string(gsettings, "gtk-theme", m_settings["theme"].toUtf8().constData()); - g_settings_set_string(gsettings, "icon-theme", m_settings["icon"].toUtf8().constData()); - g_settings_set_string(gsettings, "cursor-theme", m_settings["cursor"].toUtf8().constData()); - g_settings_set_string(gsettings, "font-name", m_settings["font"].toUtf8().constData()); - - QString toolbarStyle; - if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_ICONS")) { - toolbarStyle = QStringLiteral("icons"); - } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_TEXT")) { - toolbarStyle = QStringLiteral("text"); - } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_BOTH")) { - toolbarStyle = QStringLiteral("both"); - } else if (m_settings["toolbar_style"] == QStringLiteral("GTK_TOOLBAR_BOTH_HORIZ")) { - toolbarStyle = QStringLiteral("both-horiz"); - } - - g_settings_set_string(gsettings, "toolbar-style", toolbarStyle.toUtf8().constData()); - - g_object_set(gtk_settings_get_default(), "gtk-application-prefer-dark-theme", getApplicationPreferDarkTheme(), nullptr); - - auto cfg = KSharedConfig::openConfig(configFileName(), KConfig::NoGlobals); - return saveSettings(cfg); -}
  101. ...
  1. kde-gtk-config