From 5c387a67ae4d2c14703f9f9d0c3251f529d0f7db Mon Sep 17 00:00:00 2001 From: Max Horn <max@quendi.de> Date: Sun, 2 Nov 2003 11:32:18 +0000 Subject: [PATCH] ask before removing a game config svn-id: r11050 --- gui/launcher.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 814624f4d72..ead4891d25c 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