[Scummvm-cvs-logs] SF.net SVN: scummvm:[34530] scummvm/trunk/gui

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Sep 14 20:19:24 CEST 2008


Revision: 34530
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34530&view=rev
Author:   lordhoto
Date:     2008-09-14 18:19:22 +0000 (Sun, 14 Sep 2008)

Log Message:
-----------
Committed patch by [md5] from bug tracker item #2100790 "GUI:Clicking "Load" when no games are added triggers a crash".

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

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2008-09-14 18:00:06 UTC (rev 34529)
+++ scummvm/trunk/gui/launcher.cpp	2008-09-14 18:19:22 UTC (rev 34530)
@@ -662,9 +662,10 @@
 	new ButtonWidget(this, "launcher_options_button", "Options", kOptionsCmd, 'O');
 	_startButton =
 			new ButtonWidget(this, "launcher_start_button", "Start", kStartCmd, 'S');
-	
-	new ButtonWidget(this, "launcher_loadGame_button", "Load", kLoadGameCmd, 'L');
 
+	_loadButton =
+		new ButtonWidget(this, "launcher_loadGame_button", "Load", kLoadGameCmd, 'L');
+
 	// Above the lowest button rows: two more buttons (directly below the list box)
 	_addButton =
 		new ButtonWidget(this, "launcher_addGame_button", "Add Game...", kAddGameCmd, 'A');
@@ -1067,6 +1068,10 @@
 		_removeButton->setEnabled(enable);
 		_removeButton->draw();
 	}
+	if (enable != _loadButton->isEnabled()) {
+		_loadButton->setEnabled(enable);
+		_loadButton->draw();
+	}
 
 	// Update the label of the "Add" button depending on whether shift is pressed or not
 	int modifiers = g_system->getEventManager()->getModifierState();

Modified: scummvm/trunk/gui/launcher.h
===================================================================
--- scummvm/trunk/gui/launcher.h	2008-09-14 18:00:06 UTC (rev 34529)
+++ scummvm/trunk/gui/launcher.h	2008-09-14 18:19:22 UTC (rev 34530)
@@ -54,6 +54,7 @@
 	ListWidget		*_list;
 	ButtonWidget	*_addButton;
 	Widget			*_startButton;
+	Widget			*_loadButton;
 	Widget			*_editButton;
 	Widget			*_removeButton;
 #ifndef DISABLE_FANCY_THEMES


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