Select the default decoration if the configured decoration doesn't exist.

svn path=/trunk/KDE/kdebase/workspace/; revision=1016905
This commit is contained in:
Lucas Murray 2009-08-29 10:16:13 +00:00
parent 47ef5f02cc
commit 8b19de13f0

View file

@ -446,6 +446,12 @@ void KWinDecorationModule::readConfig( const KConfigGroup & conf )
((QPixmap::defaultDepth() > 8) ? "kwin3_nitrogen" : "kwin3_plastik"));
QString decoName = decorationName( currentLibraryName );
if (decoName.isEmpty())
{ // Selected decoration doesn't exist, use the default
currentLibraryName = ((QPixmap::defaultDepth() > 8) ? "kwin3_nitrogen" : "kwin3_plastik");
decoName = decorationName( currentLibraryName );
}
// If we are using the "default" kde client, use the "default" entry.
// if (decoName.isEmpty())
// decoName = i18n("KDE 2");