[Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.127,1.128 options.cpp,1.93,1.94 options.h,1.32,1.33

Gregory Montoir cyx at users.sourceforge.net
Wed Aug 10 11:32:39 CEST 2005


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18605/gui

Modified Files:
	launcher.cpp options.cpp options.h 
Log Message:
committed patch #1255847, thanks Simon Sawatzki.

Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- launcher.cpp	30 Jul 2005 21:11:01 -0000	1.127
+++ launcher.cpp	10 Aug 2005 18:30:55 -0000	1.128
@@ -409,7 +409,7 @@
 
 	// Change path for the game
 	case kCmdGameBrowser: {
-		BrowserDialog browser("Select additional game directory", true);
+		BrowserDialog browser("Select directory with game data", true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			FilesystemNode dir(browser.getResult());

Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- options.cpp	30 Jul 2005 21:11:01 -0000	1.93
+++ options.cpp	10 Aug 2005 18:30:55 -0000	1.94
@@ -571,19 +571,12 @@
 	addButton(this, _w - 2 * (buttonWidth + 10), _h - buttonHeight - 8, "Cancel", kCloseCmd, 0, ws);
 	addButton(this, _w - (buttonWidth + 10), _h - buttonHeight - 8, "OK", kOKCmd, 0, ws);
 
-	// Create file browser dialogs
-	_dirBrowser = new BrowserDialog("Select directory for savegames", true);
-	_fileBrowser = new BrowserDialog("Select SoundFont", false);
-
 #ifdef SMALL_SCREEN_DEVICE
 	_keysDialog = new KeysDialog();
 #endif
 }
 
 GlobalOptionsDialog::~GlobalOptionsDialog() {
-	delete _dirBrowser;
-	delete _fileBrowser;
-
 #ifdef SMALL_SCREEN_DEVICE
 	delete _keysDialog;
 #endif
@@ -639,31 +632,37 @@
 
 void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	switch (cmd) {
-	case kChooseSaveDirCmd:
-		if (_dirBrowser->runModal() > 0) {
+	case kChooseSaveDirCmd: {
+		BrowserDialog browser("Select directory for savegames", true);
+		if (browser.runModal() > 0) {
 			// User made his choice...
-			FilesystemNode dir(_dirBrowser->getResult());
+			FilesystemNode dir(browser.getResult());
 			_savePath->setLabel(dir.path());
 			draw();
 			// TODO - we should check if the directory is writeable before accepting it
 		}
 		break;
-	case kChooseExtraDirCmd:
-		if (_dirBrowser->runModal() > 0) {
+	}
+	case kChooseExtraDirCmd: {
+		BrowserDialog browser("Select directory for extra files", true);
+		if (browser.runModal() > 0) {
 			// User made his choice...
-			FilesystemNode dir(_dirBrowser->getResult());
+			FilesystemNode dir(browser.getResult());
 			_extraPath->setLabel(dir.path());
 			draw();
 		}
 		break;
-	case kChooseSoundFontCmd:
-		if (_fileBrowser->runModal() > 0) {
+	}
+	case kChooseSoundFontCmd: {
+		BrowserDialog browser("Select SoundFont", false);
+		if (browser.runModal() > 0) {
 			// User made his choice...
-			FilesystemNode file(_fileBrowser->getResult());
+			FilesystemNode file(browser.getResult());
 			_soundFont->setLabel(file.path());
 			draw();
 		}
 		break;
+	}
 #ifdef SMALL_SCREEN_DEVICE
 	case kChooseKeyMappingCmd:
 		_keysDialog->runModal();

Index: options.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- options.h	5 Jul 2005 20:22:37 -0000	1.32
+++ options.h	10 Aug 2005 18:30:55 -0000	1.33
@@ -118,8 +118,6 @@
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
 
 protected:
-	BrowserDialog *_dirBrowser;
-	BrowserDialog *_fileBrowser;
 #ifdef SMALL_SCREEN_DEVICE
 	KeysDialog *_keysDialog;
 #endif





More information about the Scummvm-git-logs mailing list