mail[Wesnoth-commits] r44284 - /trunk/src/game.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 18, 2010 - 12:06:
Author: silene
Date: Sun Jul 18 12:06:48 2010
New Revision: 44284

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44284&view=rev
Log:
Made the return value of game_controller::change_language useful.

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=44284&r1=44283&r2=44284&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sun Jul 18 12:06:48 2010
@@ -1429,15 +1429,13 @@
 bool game_controller::change_language()
 {
        gui2::tlanguage_selection dlg;
-
        dlg.show(disp().video());
-
-       if(dlg.get_retval() == gui2::twindow::OK) {
-               if(!no_gui_) {
-                       std::string wm_title_string = _("The Battle for 
Wesnoth");
-                       wm_title_string += " - " + game_config::revision;
-                       SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
-               }
+       if (dlg.get_retval() != gui2::twindow::OK) return false;
+
+       if (!no_gui_) {
+               std::string wm_title_string = _("The Battle for Wesnoth");
+               wm_title_string += " - " + game_config::revision;
+               SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
        }
 
        return true;
@@ -2235,7 +2233,7 @@
                                continue;
                        }
                } else if(res == gui::CHANGE_LANGUAGE) {
-                       if(game.change_language() == true) {
+                       if (game.change_language()) {
                                tips_of_day.clear();
                                t_string::reset_translations();
                                image::flush_cache();




Related Messages


Powered by MHonArc, Updated Sun Jul 18 12:20:14 2010