Author: alink
Date: Mon Jul  7 02:19:55 2008
New Revision: 27806

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27806&view=rev
Log:
Display the add-on name in the message 'add-on installed'

Modified:
    trunk/src/game.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=27806&r1=27805&r2=27806&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Mon Jul  7 02:19:55 2008
@@ -1309,7 +1309,7 @@
                        return;
                }
 
-               std::vector<std::string> campaigns, versions, uploads, types, 
options, options_to_filter;
+               std::vector<std::string> campaigns, titles, versions, uploads, 
types, options, options_to_filter;
 
                std::string sep(1, COLUMN_SEPARATOR);
 
@@ -1344,6 +1344,7 @@
                                title = name;
                                std::replace(title.begin(),title.end(),'_',' ');
                        }
+                       titles.push_back(title);
 
                        std::string version   = (**i)["version"],
                                    author    = (**i)["author"];
@@ -1528,8 +1529,12 @@
                        }
                }
 
+               std::string message = _("The add-on '$addon|' has been 
installed.");
+               utils::string_map symbols;
+               symbols["addon"] = titles[index];
+               message = utils::interpolate_variables_into_string(message, 
&symbols);
                /* GCC-3.3 needs a temp var otherwise compilation fails */
-               gui::message_dialog dlg(disp(),_("Add-on Installed"),_("The 
add-on has been installed."));
+               gui::message_dialog dlg(disp(),_("Add-on Installed"),message);
                dlg.show();
        } catch(config::error&) {
                gui::show_error_message(disp(), _("Network communication 
error."));


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

Reply via email to