Changeset View
Changeset View
Standalone View
Standalone View
lookandfeelexplorer/src/lnflogic.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | { | 56 | { | ||
57 | const QString metadataPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) % QLatin1Literal("/plasma/look-and-feel/") % pluginName % QLatin1Literal("/metadata.desktop")); | 57 | const QString metadataPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) % QLatin1Literal("/plasma/look-and-feel/") % pluginName % QLatin1Literal("/metadata.desktop")); | ||
58 | KConfig c(metadataPath); | 58 | KConfig c(metadataPath); | ||
59 | 59 | | |||
60 | KConfigGroup cg(&c, "Desktop Entry"); | 60 | KConfigGroup cg(&c, "Desktop Entry"); | ||
61 | cg.writeEntry("Name", name); | 61 | cg.writeEntry("Name", name); | ||
62 | cg.writeEntry("Comment", comment); | 62 | cg.writeEntry("Comment", comment); | ||
63 | cg.writeEntry("X-KDE-PluginInfo-Name", pluginName); | 63 | cg.writeEntry("X-KDE-PluginInfo-Name", pluginName); | ||
64 | cg.writeEntry("X-KDE-ServiceTypes", "Plasma/LookAndFeel"); | ||||
64 | cg.writeEntry("X-KDE-PluginInfo-Author", author); | 65 | cg.writeEntry("X-KDE-PluginInfo-Author", author); | ||
65 | cg.writeEntry("X-KDE-PluginInfo-Email", email); | 66 | cg.writeEntry("X-KDE-PluginInfo-Email", email); | ||
66 | cg.writeEntry("X-KDE-PluginInfo-Website", website); | 67 | cg.writeEntry("X-KDE-PluginInfo-Website", website); | ||
67 | cg.writeEntry("X-KDE-PluginInfo-Category", "Plasma Look And Feel"); | 68 | cg.writeEntry("X-KDE-PluginInfo-Category", "Plasma Look And Feel"); | ||
68 | cg.writeEntry("X-KDE-PluginInfo-License", license); | 69 | cg.writeEntry("X-KDE-PluginInfo-License", license); | ||
69 | cg.writeEntry("X-KDE-PluginInfo-EnabledByDefault", "true"); | 70 | cg.writeEntry("X-KDE-PluginInfo-EnabledByDefault", "true"); | ||
70 | cg.writeEntry("X-KDE-PluginInfo-Version", "0.1"); | 71 | cg.writeEntry("X-KDE-PluginInfo-Version", "0.1"); | ||
71 | cg.sync(); | 72 | cg.sync(); | ||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 119 | { | |||
141 | //cursor theme | 142 | //cursor theme | ||
142 | defaultsConfigGroup = KConfigGroup(&defaultsConfig, "kcminputrc"); | 143 | defaultsConfigGroup = KConfigGroup(&defaultsConfig, "kcminputrc"); | ||
143 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "Mouse"); | 144 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "Mouse"); | ||
144 | systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("kcminputrc")), "Mouse"); | 145 | systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("kcminputrc")), "Mouse"); | ||
145 | defaultsConfigGroup.writeEntry("cursorTheme", systemCG.readEntry("cursorTheme", QStringLiteral("breeze_cursors"))); | 146 | defaultsConfigGroup.writeEntry("cursorTheme", systemCG.readEntry("cursorTheme", QStringLiteral("breeze_cursors"))); | ||
146 | 147 | | |||
147 | //KWin window switcher theme | 148 | //KWin window switcher theme | ||
148 | systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("kwinrc")), "TabBox"); | 149 | systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("kwinrc")), "TabBox"); | ||
150 | defaultsConfigGroup = KConfigGroup(&defaultsConfig, "kwinrc"); | ||||
149 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "WindowSwitcher"); | 151 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "WindowSwitcher"); | ||
150 | defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("LayoutName", QStringLiteral("org.kde.breeze.desktop"))); | 152 | defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("LayoutName", QStringLiteral("org.kde.breeze.desktop"))); | ||
151 | 153 | | |||
154 | defaultsConfigGroup = KConfigGroup(&defaultsConfig, "kwinrc"); | ||||
152 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "DesktopSwitcher"); | 155 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "DesktopSwitcher"); | ||
153 | defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("DesktopLayout", QStringLiteral("org.kde.breeze.desktop"))); | 156 | defaultsConfigGroup.writeEntry("LayoutName", systemCG.readEntry("DesktopLayout", QStringLiteral("org.kde.breeze.desktop"))); | ||
154 | 157 | | |||
158 | systemCG = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("kwinrc")), "org.kde.kdecoration2"); | ||||
159 | defaultsConfigGroup = KConfigGroup(&defaultsConfig, "kwinrc"); | ||||
160 | defaultsConfigGroup = KConfigGroup(&defaultsConfigGroup, "org.kde.kdecoration2"); | ||||
161 | defaultsConfigGroup.writeEntry("library", systemCG.readEntry("library", QStringLiteral("org.kde.breeze"))); | ||||
graesslin: this is not the default used by kwin. KWin determines the default based on the optional compile… | |||||
162 | defaultsConfigGroup.writeEntry("theme", systemCG.readEntry("theme", QString())); | ||||
163 | | ||||
155 | emit messageRequested(ErrorLevel::Info, i18n("Defaults config file saved from your current setup")); | 164 | emit messageRequested(ErrorLevel::Info, i18n("Defaults config file saved from your current setup")); | ||
graesslin: like in the other request I don't like this being exported. | |||||
mart: would empty string make it use the default? | |||||
graesslin: no, empty string would result in no buttons at all. | |||||
156 | } | 165 | } | ||
157 | 166 | | |||
158 | void LnfLogic::dumpCurrentPlasmaLayout() | 167 | void LnfLogic::dumpCurrentPlasmaLayout() | ||
159 | { | 168 | { | ||
160 | dumpPlasmaLayout(m_themeName); | 169 | dumpPlasmaLayout(m_themeName); | ||
161 | } | 170 | } | ||
162 | 171 | | |||
163 | void LnfLogic::save() | 172 | void LnfLogic::save() | ||
▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines |
this is not the default used by kwin. KWin determines the default based on the optional compile time dep on breeze