Author: jhinrichs
Date: Mon Apr 27 22:57:49 2009
New Revision: 35271

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35271&view=rev
Log:
Savegame reorganization Step 1: Providing a simpler interface to saving and 
loading.
Remove dialogs.cpp::get_save_name_oos, which is no longer needed now.

Modified:
    trunk/src/dialogs.cpp
    trunk/src/dialogs.hpp

Modified: trunk/src/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=35271&r1=35270&r2=35271&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Mon Apr 27 22:57:49 2009
@@ -249,44 +249,6 @@
        ;
 }
 
-int get_save_name_oos(display & disp,const std::string& message, const 
std::string& txt_label,
-                                 std::string* fname, gui::DIALOG_TYPE 
dialog_type, const std::string& title)
-{
-       static int quit_prompt = 0;
-       std::string tmp_title = title;
-       if (tmp_title.empty()) tmp_title = _("Save Game");
-       bool ignore_opt = false;
-       int res=0;
-
-       gui::dialog d(disp, tmp_title, message, dialog_type);
-       d.set_textbox(txt_label, *fname);
-
-       d.add_button(new gui::dialog_button(disp.video(), _("Quit Game"),
-               gui::button::TYPE_PRESS, 2), gui::dialog::BUTTON_STANDARD);
-       if(quit_prompt < 0) {
-               res = 1;
-       } else if(quit_prompt > 5) {
-               d.add_button(new gui::dialog_button(disp.video(), _("Ignore 
All"),
-                       gui::button::TYPE_CHECK), gui::dialog::BUTTON_CHECKBOX);
-               res = d.show();
-               ignore_opt = d.option_checked();
-       } else {
-               res = d.show();
-               if(res == 1) {
-                       ++quit_prompt;
-               } else {
-                       quit_prompt = 0;
-               }
-       }
-
-       *fname = d.textbox_text();
-
-       if(ignore_opt) {
-               quit_prompt = -1;
-       }
-       return res;
-}
-
 namespace {
 
 /** Class to handle deleting a saved game. */

Modified: trunk/src/dialogs.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.hpp?rev=35271&r1=35270&r2=35271&view=diff
==============================================================================
--- trunk/src/dialogs.hpp (original)
+++ trunk/src/dialogs.hpp Mon Apr 27 22:57:49 2009
@@ -53,14 +53,6 @@
 
 /** check if a character is valid for a filename. */
 bool is_illegal_file_char(char c);
-
-/**
- * Ask user if I should really save the game and what name I should use returns
- * 0 if user wants to save the game.
- */
-int get_save_name_oos(display & disp,const std::string& message, const 
std::string& txt_label,
-                                 std::string* fname, gui::DIALOG_TYPE 
dialog_type=gui::YES_NO,
-                                 const std::string& title="");
 
 /**
  * Allow user to select the game they want to load. Returns the name of the


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to