|
|
|
|
@ -124,28 +124,6 @@ ShellCorona::ShellCorona(QObject *parent) |
|
|
|
|
saveLayout(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const QString themeGroupKey = QStringLiteral("Theme"); |
|
|
|
|
const QString themeNameKey = QStringLiteral("name"); |
|
|
|
|
|
|
|
|
|
QString themeName; |
|
|
|
|
|
|
|
|
|
KConfigGroup plasmarc(KSharedConfig::openConfig("plasmarc"), themeGroupKey); |
|
|
|
|
themeName = plasmarc.readEntry(themeNameKey, themeName); |
|
|
|
|
|
|
|
|
|
if (themeName.isEmpty()) { |
|
|
|
|
KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig( |
|
|
|
|
m_lookAndFeelPackage.filePath("defaults")), |
|
|
|
|
"plasmarc" |
|
|
|
|
); |
|
|
|
|
lnfCfg = KConfigGroup(&lnfCfg, themeGroupKey); |
|
|
|
|
themeName = lnfCfg.readEntry(themeNameKey, themeName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!themeName.isEmpty()) { |
|
|
|
|
Plasma::Theme *t = new Plasma::Theme(this); |
|
|
|
|
t->setThemeName(themeName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
connect(this, &ShellCorona::containmentAdded, |
|
|
|
|
this, &ShellCorona::handleContainmentAdded); |
|
|
|
|
|
|
|
|
|
@ -208,6 +186,31 @@ void ShellCorona::setShell(const QString &shell) |
|
|
|
|
setPackage(package); |
|
|
|
|
m_desktopDefaultsConfig = KConfigGroup(KSharedConfig::openConfig(package.filePath("defaults")), "Desktop"); |
|
|
|
|
|
|
|
|
|
const QString themeGroupKey = QStringLiteral("Theme"); |
|
|
|
|
const QString themeNameKey = QStringLiteral("name"); |
|
|
|
|
|
|
|
|
|
QString themeName; |
|
|
|
|
|
|
|
|
|
KConfigGroup plasmarc(KSharedConfig::openConfig("plasmarc"), themeGroupKey); |
|
|
|
|
themeName = plasmarc.readEntry(themeNameKey, themeName); |
|
|
|
|
|
|
|
|
|
if (themeName.isEmpty()) { |
|
|
|
|
KConfigGroup shellCfg = KConfigGroup(KSharedConfig::openConfig(package.filePath("defaults")), "Theme"); |
|
|
|
|
|
|
|
|
|
themeName = shellCfg.readEntry("name", "default"); |
|
|
|
|
KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig( |
|
|
|
|
m_lookAndFeelPackage.filePath("defaults")), |
|
|
|
|
"plasmarc" |
|
|
|
|
); |
|
|
|
|
lnfCfg = KConfigGroup(&lnfCfg, themeGroupKey); |
|
|
|
|
themeName = lnfCfg.readEntry(themeNameKey, themeName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!themeName.isEmpty()) { |
|
|
|
|
Plasma::Theme *t = new Plasma::Theme(this); |
|
|
|
|
t->setThemeName(themeName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//FIXME: this would change the runtime platform to a fixed one if available
|
|
|
|
|
// but a different way to load platform specific components is needed beforehand
|
|
|
|
|
// because if we import and use two different components plugin, the second time
|
|
|
|
|
|