diff options
author | Max Horn | 2003-11-02 11:32:18 +0000 |
---|---|---|
committer | Max Horn | 2003-11-02 11:32:18 +0000 |
commit | 5c387a67ae4d2c14703f9f9d0c3251f529d0f7db (patch) | |
tree | 6337c3023fc43cf4257551975771f2b87061781d | |
parent | 81cca1b95ebd512cc31d5398dfa01230cff7a3c8 (diff) | |
download | scummvm-rg350-5c387a67ae4d2c14703f9f9d0c3251f529d0f7db.tar.gz scummvm-rg350-5c387a67ae4d2c14703f9f9d0c3251f529d0f7db.tar.bz2 scummvm-rg350-5c387a67ae4d2c14703f9f9d0c3251f529d0f7db.zip |
ask before removing a game config
svn-id: r11050
-rw-r--r-- | gui/launcher.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 814624f4d7..ead4891d25 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -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 |