mail[Wesnoth-commits] r33312 - in /trunk/src: font.cpp game.cpp gui/widgets/settings.cpp language.cpp titlescreen.cpp


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

Header


Content

Posted by guillaume . melquiond on March 03, 2009 - 18:44:
Author: silene
Date: Tue Mar  3 18:44:21 2009
New Revision: 33312

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33312&view=rev
Log:
Changed to proper WML lookup.

Modified:
    trunk/src/font.cpp
    trunk/src/game.cpp
    trunk/src/gui/widgets/settings.cpp
    trunk/src/language.cpp
    trunk/src/titlescreen.cpp

Modified: trunk/src/font.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/font.cpp?rev=33312&r1=33311&r2=33312&view=diff
==============================================================================
--- trunk/src/font.cpp (original)
+++ trunk/src/font.cpp Tue Mar  3 18:44:21 2009
@@ -1258,7 +1258,7 @@
        //config when changing languages
        config cfg;
        try {
-               scoped_istream stream = 
preprocess_file("data/hardwired/fonts.cfg");
+               scoped_istream stream = 
preprocess_file(get_wml_location("hardwired/fonts.cfg"));
                read(cfg, *stream);
        } catch(config::error &e) {
                ERR_FT << "could not read fonts.cfg:\n"

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=33312&r1=33311&r2=33312&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Tue Mar  3 18:44:21 2009
@@ -1251,7 +1251,7 @@
        if (!file_exists(config))
        {
                // copy file if it isn't created yet
-               write_file(config, read_file("data/lan_server.cfg"));
+               write_file(config, 
read_file(get_wml_location("lan_server.cfg")));
        }
        for (path_store::iterator iname = paths_to_try.begin();
                        iname != paths_to_try.end(); ++iname)

Modified: trunk/src/gui/widgets/settings.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.cpp?rev=33312&r1=33311&r2=33312&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.cpp (original)
+++ trunk/src/gui/widgets/settings.cpp Tue Mar  3 18:44:21 2009
@@ -109,15 +109,14 @@
 
        // Read file.
        config cfg;
-       const std::string& filename = "data/gui/default.cfg";
        try {
                preproc_map preproc(
                                
game_config::config_cache::instance().get_preproc_map());
-               scoped_istream stream = preprocess_file(filename, &preproc);
+               scoped_istream stream = 
preprocess_file(get_wml_location("gui/default.cfg"), &preproc);
 
                read(cfg, *stream);
        } catch(config::error&) {
-               ERR_G_P << "Setting: could not read file '" << filename << 
"'.\n";
+               ERR_G_P << "Setting: could not read file 
'data/gui/default.cfg'.\n";
        }
 
        // Parse guis

Modified: trunk/src/language.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=33312&r1=33311&r2=33312&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Tue Mar  3 18:44:21 2009
@@ -152,7 +152,7 @@
 {
        config cfg;
        try {
-               scoped_istream stream = 
preprocess_file("data/hardwired/language.cfg");
+               scoped_istream stream = 
preprocess_file(get_wml_location("hardwired/language.cfg"));
                read(cfg, *stream);
        } catch(config::error &) {
                return false;
@@ -314,7 +314,7 @@
 
        // fill string_table (should be moved somwhere else some day)
        try {
-               scoped_istream stream = 
preprocess_file("data/hardwired/english.cfg");
+               scoped_istream stream = 
preprocess_file(get_wml_location("hardwired/english.cfg"));
                read(cfg, *stream);
        } catch(config::error& e) {
                std::cerr << "Could not read english.cfg\n";

Modified: trunk/src/titlescreen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=33312&r1=33311&r2=33312&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Tue Mar  3 18:44:21 2009
@@ -136,7 +136,7 @@
        tips_of_day.clear();
        LOG_CONFIG << "Loading tips of day\n";
        try {
-               scoped_istream stream = 
preprocess_file("data/hardwired/tips.cfg");
+               scoped_istream stream = 
preprocess_file(get_wml_location("hardwired/tips.cfg"));
                read(tips_of_day, *stream);
        } catch(config::error&) {
                ERR_CONFIG << "Could not read data/hardwired/tips.cfg\n";




Related Messages


Powered by MHonArc, Updated Tue Mar 03 19:00:07 2009