Author: mordante
Date: Sun Mar 13 08:49:21 2011
New Revision: 48872
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48872&view=rev
Log:
Add another user of tgame_delete class.
This also fixes the behaviour that closing the dialog with 'no' still
stored the status of the preference.
Modified:
trunk/src/dialogs.cpp
Modified: trunk/src/dialogs.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=48872&r1=48871&r2=48872&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Sun Mar 13 08:49:21 2011
@@ -26,6 +26,7 @@
#include "game_events.hpp"
#include "game_display.hpp"
#include "game_preferences.hpp"
+#include "gui/dialogs/game_delete.hpp"
#include "gettext.hpp"
#include "help.hpp"
#include "language.hpp"
@@ -284,17 +285,7 @@
// See if we should ask the user for deletion confirmation
if(preferences::ask_delete_saves()) {
- gui::dialog dmenu(disp_,"",
- _("Do you really want to delete
this game?"),
- gui::YES_NO);
- dmenu.add_option(_("Donât ask me again!"), false);
- const int res = dmenu.show();
- // See if the user doesn't want to be asked this again
- if(dmenu.option_checked()) {
- preferences::set_ask_delete_saves(false);
- }
-
- if(res != 0) {
+ if(!gui2::tgame_delete::execute(disp_.video())) {
return gui::CONTINUE_DIALOG;
}
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits