aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorChristopher Page2008-08-17 22:50:05 +0000
committerChristopher Page2008-08-17 22:50:05 +0000
commit852bc9dbb750b9995d31e70f4158c97d3758c46f (patch)
treec00a148af276efcc6ad424378df82651c6ff7640 /gui
parentc559546020af4313a620f5f7e839d79ba1887909 (diff)
downloadscummvm-rg350-852bc9dbb750b9995d31e70f4158c97d3758c46f.tar.gz
scummvm-rg350-852bc9dbb750b9995d31e70f4158c97d3758c46f.tar.bz2
scummvm-rg350-852bc9dbb750b9995d31e70f4158c97d3758c46f.zip
Added a confirm dialog for deleting savegames
svn-id: r33981
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 273091a981..40e0c3685e 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -967,17 +967,21 @@ void LauncherDialog::loadGame(int item) {
// Delete the savegame
if (_loadDialog->delSave()) {
String filename = saveList[idx].filename();
- printf("Deleting file: %s\n", filename.c_str());
- saveFileMan->removeSavefile(filename.c_str());
- if ((saveList.size() - 1) == 0)
- ConfMan.setInt("save_slot", -1);
+ //printf("Deleting file: %s\n", filename.c_str());
+ MessageDialog alert("Do you really want to delete this savegame?",
+ "Yes", "No");
+ if (alert.runModal() == GUI::kMessageOK) {
+ saveFileMan->removeSavefile(filename.c_str());
+ if ((saveList.size() - 1) == 0)
+ ConfMan.setInt("save_slot", -1);
+ }
}
// Load the savegame
else {
int slot = atoi(saveList[idx].save_slot().c_str());
- const char *file = saveList[idx].filename().c_str();
- printf("Loading slot: %d\n", slot);
- printf("Loading file: %s\n", file);
+ //const char *file = saveList[idx].filename().c_str();
+ //printf("Loading slot: %d\n", slot);
+ //printf("Loading file: %s\n", file);
ConfMan.setActiveDomain(_domains[item]);
ConfMan.setInt("save_slot", slot);
close();