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

svn-id: r34530
This commit is contained in:
Johannes Schickel 2008-09-14 18:19:22 +00:00
parent dc31d1d9a8
commit ed40e5d374
2 changed files with 8 additions and 2 deletions

View File

@ -662,8 +662,9 @@ LauncherDialog::LauncherDialog()
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 =
@ -1067,6 +1068,10 @@ void LauncherDialog::updateButtons() {
_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();

View File

@ -54,6 +54,7 @@ protected:
ListWidget *_list;
ButtonWidget *_addButton;
Widget *_startButton;
Widget *_loadButton;
Widget *_editButton;
Widget *_removeButton;
#ifndef DISABLE_FANCY_THEMES