don't save default values if they are not yet written as defaults
svn path=/trunk/kdebase/kwin/; revision=64871
This commit is contained in:
parent
6c767761ae
commit
c4e41683d7
1 changed files with 10 additions and 2 deletions
|
@ -2838,11 +2838,19 @@ void Workspace::saveDesktopSettings()
|
||||||
c.writeEntry("Number", number_of_desktops );
|
c.writeEntry("Number", number_of_desktops );
|
||||||
for(int i = 1; i <= number_of_desktops; i++) {
|
for(int i = 1; i <= number_of_desktops; i++) {
|
||||||
QString s = desktopName( i );
|
QString s = desktopName( i );
|
||||||
|
QString defaultvalue = i18n("Desktop %1").arg(i);
|
||||||
if ( s.isEmpty() ) {
|
if ( s.isEmpty() ) {
|
||||||
s = i18n("Desktop %1").arg(i);
|
s = defaultvalue;
|
||||||
rootInfo->setDesktopName( i, s.utf8().data() );
|
rootInfo->setDesktopName( i, s.utf8().data() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s != defaultvalue) {
|
||||||
c.writeEntry( QString("Name_%1").arg(i), s );
|
c.writeEntry( QString("Name_%1").arg(i), s );
|
||||||
|
} else {
|
||||||
|
QString currentvalue = c.readEntry(QString("Name_%1").arg(i));
|
||||||
|
if (currentvalue != defaultvalue)
|
||||||
|
c.writeEntry( QString("Name_%1").arg(i), "" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue