[Scummvm-cvs-logs] SF.net SVN: scummvm:[35811] scummvm/trunk/gui/launcher.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Jan 11 00:38:30 CET 2009


Revision: 35811
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35811&view=rev
Author:   eriktorbjorn
Date:     2009-01-10 23:38:30 +0000 (Sat, 10 Jan 2009)

Log Message:
-----------
Moved some stuff from the EditGameDialog constructor to its open() method to
avoid uninitialised variables. (This is similar to some bugs that were fixed
earlier today.)

Modified Paths:
--------------
    scummvm/trunk/gui/launcher.cpp

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2009-01-10 23:17:02 UTC (rev 35810)
+++ scummvm/trunk/gui/launcher.cpp	2009-01-10 23:38:30 UTC (rev 35811)
@@ -246,16 +246,10 @@
 	// GUI:  Button + Label for the additional path
 	new ButtonWidget(tab, "GameOptions_Paths.Extrapath", "Extra Path:", kCmdExtraBrowser, 0);
 	_extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath);
-	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPathWidget->setLabel("None");
-	}
 
 	// GUI:  Button + Label for the save path
 	new ButtonWidget(tab, "GameOptions_Paths.Savepath", "Save Path:", kCmdSaveBrowser, 0);
 	_savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath);
-	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePathWidget->setLabel("Default");
-	}
 
 	// Activate the first tab
 	tab->setActiveTab(0);
@@ -280,6 +274,16 @@
 void EditGameDialog::open() {
 	OptionsDialog::open();
 
+	String extraPath(ConfMan.get("extrapath", _domain));
+	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
+		_extraPathWidget->setLabel("None");
+	}
+
+	String savePath(ConfMan.get("savepath", _domain));
+	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
+		_savePathWidget->setLabel("Default");
+	}
+
 	int sel, i;
 	bool e;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list