[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/magazynier
From:       Tadeusz Andrzej Kadłubowski <yess () hell ! org ! pl>
Date:       2009-12-25 16:22:10
Message-ID: 1261758130.458556.17086.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1066064 by tkadlubo:

Fix a bug: there was an empty entry in level collection menu, when the game was \
started for the first time without magazynierrc file.


 M  +6 -1      window.cpp  


--- trunk/playground/games/magazynier/window.cpp #1066063:1066064
@@ -91,13 +91,18 @@
 	KConfig config;
 	KConfigGroup general = config.group("General");
 	QString lastLevelPackName = general.readEntry("LastLevelPack");
+	if (lastLevelPackName.isNull()) {
+		lastLevelPackName = QString("Sasquatch");
+	}
 
 	LevelPack *newLevelPack;
 	
 	if (m_levelPacks[lastLevelPackName] && \
!m_levelPacks[lastLevelPackName]->getName().isNull()) {  newLevelPack = \
m_levelPacks[lastLevelPackName];  } else {
-		newLevelPack = m_levelPacks[QString("Sasquatch")];
+		KMessageBox::error(this, i18n("Could not find level collection \"%1\". Please \
check your installation.", lastLevelPackName)); +		exit(EXIT_FAILURE);
+	
 	}
 	
 	levelPackChanged(newLevelPack);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic