wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src game_events.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src game_events.cpp
Date: Tue, 19 Oct 2004 14:25:30 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    04/10/19 18:18:20

Modified files:
        src            : game_events.cpp 

Log message:
        Remove obsolete code that still relies on ids to get message 
translation.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game_events.cpp.diff?tr1=1.109&tr2=1.110&r1=text&r2=text

Patches:
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.109 wesnoth/src/game_events.cpp:1.110
--- wesnoth/src/game_events.cpp:1.109   Sun Oct  3 19:28:43 2004
+++ wesnoth/src/game_events.cpp Tue Oct 19 18:18:20 2004
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.109 2004/10/03 19:28:43 Sirp Exp $ */
+/* $Id: game_events.cpp,v 1.110 2004/10/19 18:18:20 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -938,16 +938,8 @@
                        sound::play_sound(sfx);
                }
 
-               const std::string& id = cfg["id"];
-
                std::string image = cfg["image"];
-               std::string caption;
-
-               const std::string& lang_caption = string_table[id + "_caption"];
-               if(!lang_caption.empty())
-                       caption = lang_caption;
-               else
-                       caption = cfg["caption"];
+               std::string caption = cfg["caption"];
 
                if(speaker != units->end()) {
                        LOG_DP << "scrolling to speaker..\n";
@@ -983,7 +975,6 @@
                        surface.assign(image::get_image(image,image::UNSCALED));
                }
 
-               const std::string& lang_message = string_table[id];
                int option_chosen = -1;
 
                LOG_DP << "showing dialog...\n";
@@ -991,7 +982,7 @@
                //if we're not replaying, or if we are replaying and there is 
no choice
                //to be made, show the dialog.
                if(get_replay_source().at_end() || options.empty()) {
-                       const std::string msg = 
config::interpolate_variables_into_string(lang_message.empty() ? cfg["message"] 
: lang_message);
+                       const std::string msg = 
config::interpolate_variables_into_string(cfg["message"]);
                        option_chosen = 
gui::show_dialog(*screen,surface,caption,msg,
                                        options.empty() ? gui::MESSAGE : 
gui::OK_ONLY,
                                        options.empty() ? NULL : &options);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]