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:
Stephan Kulow 2000-09-23 21:54:37 +00:00
parent 6c767761ae
commit c4e41683d7

View file

@ -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() );
} }
c.writeEntry( QString("Name_%1").arg(i), s );
if (s != defaultvalue) {
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), "" );
}
} }
} }