ask before removing a game config

svn-id: r11050
This commit is contained in:
Max Horn 2003-11-02 11:32:18 +00:00
parent 81cca1b95e
commit 5c387a67ae

View File

@ -340,17 +340,23 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
}
break;
case kRemoveGameCmd:
// Remove the currently selected game from the list
assert(item >= 0);
ConfMan.removeGameDomain(_domains[item]);
// Write config to disk
ConfMan.flushToDisk();
case kRemoveGameCmd: {
MessageDialog alert("Do you really want to remove this game configuration?", "Yes", "No");
// Update the ListWidget and force a redraw
updateListing();
draw();
if (alert.runModal() == 1) {
// Remove the currently selected game from the list
assert(item >= 0);
ConfMan.removeGameDomain(_domains[item]);
// Write config to disk
ConfMan.flushToDisk();
// Update the ListWidget and force a redraw
updateListing();
draw();
}
}
break;
case kEditGameCmd: {
// Set game specifc options. Most of these should be "optional", i.e. by