Changeset View
Changeset View
Standalone View
Standalone View
kded/gtkconfig.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | 57 | | |||
58 | GtkConfig::~GtkConfig() | 58 | GtkConfig::~GtkConfig() | ||
59 | { | 59 | { | ||
60 | QDBusConnection dbus = QDBusConnection::sessionBus(); | 60 | QDBusConnection dbus = QDBusConnection::sessionBus(); | ||
61 | dbus.unregisterService(QStringLiteral("org.kde.GtkConfig")); | 61 | dbus.unregisterService(QStringLiteral("org.kde.GtkConfig")); | ||
62 | dbus.unregisterObject(QStringLiteral("/GtkConfig")); | 62 | dbus.unregisterObject(QStringLiteral("/GtkConfig")); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | void GtkConfig::setGtk2Theme(const QString &themeName) const | 65 | void GtkConfig::setGtkTheme(const QString &themeName) const | ||
66 | { | 66 | { | ||
67 | ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-theme-name"), themeName); | 67 | ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-theme-name"), themeName); | ||
68 | } | | |||
69 | | ||||
70 | void GtkConfig::setGtk3Theme(const QString &themeName) const | | |||
71 | { | | |||
72 | ConfigEditor::setGtk3ConfigValueGSettings(QStringLiteral("gtk-theme"), themeName); | 68 | ConfigEditor::setGtk3ConfigValueGSettings(QStringLiteral("gtk-theme"), themeName); | ||
73 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name"), themeName); | 69 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name"), themeName); | ||
74 | ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Net/ThemeName"), themeName); | 70 | ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Net/ThemeName"), themeName); | ||
75 | } | 71 | } | ||
76 | 72 | | |||
77 | QString GtkConfig::gtk2Theme() const | 73 | QString GtkConfig::gtkTheme() const | ||
78 | { | | |||
79 | return ConfigEditor::gtk2ConfigValue(QStringLiteral("gtk-theme-name")); | | |||
80 | } | | |||
81 | | ||||
82 | QString GtkConfig::gtk3Theme() const | | |||
83 | { | 74 | { | ||
84 | return ConfigEditor::gtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name")); | 75 | return ConfigEditor::gtk3ConfigValueSettingsIni(QStringLiteral("gtk-theme-name")); | ||
85 | } | 76 | } | ||
86 | 77 | | |||
87 | void GtkConfig::showGtk2ThemePreview(const QString& themeName) const | 78 | void GtkConfig::showGtkThemePreview(const QString& themeName) const | ||
88 | { | | |||
89 | themePreviewer->showGtk2App(themeName); | | |||
90 | } | | |||
91 | | ||||
92 | void GtkConfig::showGtk3ThemePreview(const QString& themeName) const | | |||
93 | { | 79 | { | ||
94 | themePreviewer->showGtk3App(themeName); | 80 | themePreviewer->showGtk3App(themeName); | ||
95 | } | 81 | } | ||
96 | 82 | | |||
97 | void GtkConfig::setFont() const | 83 | void GtkConfig::setFont() const | ||
98 | { | 84 | { | ||
99 | const QString configFontName = configValueProvider->fontName(); | 85 | const QString configFontName = configValueProvider->fontName(); | ||
100 | ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-font-name"), configFontName); | 86 | ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-font-name"), configFontName); | ||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |