Author: mordante
Date: Sat Jun  7 14:59:36 2008
New Revision: 27026

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27026&view=rev
Log:
Move the new_widgets to the settings so becomes globally available, which is 
required for further development.

Modified:
    trunk/src/game.cpp
    trunk/src/gui/widgets/settings.cpp
    trunk/src/gui/widgets/settings.hpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=27026&r1=27025&r2=27026&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Jun  7 14:59:36 2008
@@ -103,8 +103,6 @@
 
 namespace {
 
-static bool new_widgets = false;
-
 class game_controller
 {
 public:
@@ -312,7 +310,7 @@
                        no_sound = true;
                } else if(val == "--new-widgets") {
                        // This is a hidden option to enable the new widget 
toolkit.
-                       new_widgets = true;
+                       gui2::new_widgets = true;
                } else if(val[0] == '-') {
                        std::cerr << "unknown option: " << val << std::endl;
                        throw config::error("unknown option");
@@ -1108,7 +1106,7 @@
        {
                int res;
                std::string host;
-               if(new_widgets) {
+               if(gui2::new_widgets) {
                        gui2::taddon_connect addon_dlg;
                        
                        addon_dlg.set_host_name(preferences::campaign_server());
@@ -1590,7 +1588,7 @@
 
        //Print Gui only if the user hasn't specified any server
        if( multiplayer_server_.empty() ){
-               if(new_widgets) {
+               if(gui2::new_widgets) {
                        gui2::tmp_method_selection dlg;
 
                                dlg.show(disp().video());
@@ -1705,7 +1703,7 @@
 
 bool game_controller::change_language()
 {
-       if(new_widgets) {
+       if(gui2::new_widgets) {
                        gui2::tlanguage_selection dlg;
 
                        dlg.show(disp().video());

Modified: trunk/src/gui/widgets/settings.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.cpp?rev=27026&r1=27025&r2=27026&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.cpp (original)
+++ trunk/src/gui/widgets/settings.cpp Sat Jun  7 14:59:36 2008
@@ -50,6 +50,8 @@
 #define ERR_G_P LOG_STREAM_INDENT(err, gui_parse)
 
 namespace gui2 {
+
+bool new_widgets = false;
 
 namespace settings {
        unsigned screen_width = 0;

Modified: trunk/src/gui/widgets/settings.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.hpp?rev=27026&r1=27025&r2=27026&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.hpp (original)
+++ trunk/src/gui/widgets/settings.hpp Sat Jun  7 14:59:36 2008
@@ -29,6 +29,9 @@
 #include <vector>
 
 namespace gui2 {
+
+/** Do we wish to use the new library or not. */
+extern bool new_widgets;
 
 enum twindow_type {
        ADDON_CONNECT,           //<! The addon connection dialog.


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

Reply via email to