only save to the config file if we are the default theme
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799909
This commit is contained in:
parent
203fda098d
commit
f1aba49d18
12
theme.cpp
12
theme.cpp
@ -195,10 +195,14 @@ void Theme::setThemeName(const QString &themeName)
|
||||
d->colors = KSharedConfig::openConfig(colorsFile);
|
||||
}
|
||||
|
||||
KConfigGroup cg = d->config();
|
||||
if (cg.readEntry("name", Private::defaultTheme) != d->themeName) {
|
||||
cg.writeEntry("name", d->themeName);
|
||||
cg.config()->sync();
|
||||
if (this == self()) {
|
||||
// we're the defualt theme, let's save our state
|
||||
KConfigGroup cg = d->config();
|
||||
if (Private::defaultTheme == d->themeName) {
|
||||
cg.deleteEntry("name");
|
||||
} else {
|
||||
cg.writeEntry("name", d->themeName);
|
||||
}
|
||||
}
|
||||
|
||||
emit changed();
|
||||
|
Loading…
Reference in New Issue
Block a user