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.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src game.cpp
Date: Tue, 07 Dec 2004 13:13:05 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    04/12/07 18:02:33

Modified files:
        src            : game.cpp 

Log message:
        Remove implicit column separators in campaign selection boxes.

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

Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.173 wesnoth/src/game.cpp:1.174
--- wesnoth/src/game.cpp:1.173  Sat Dec  4 23:44:09 2004
+++ wesnoth/src/game.cpp        Tue Dec  7 18:02:32 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.173 2004/12/04 23:44:09 isaaccp Exp $ */
+/* $Id: game.cpp,v 1.174 2004/12/07 18:02:32 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -938,10 +938,10 @@
                const std::string& icon = (**i)["icon"];
                const std::string desc = (**i)["description"];
                const std::string image = (**i)["image"];
-               if(icon == "") {
-                       str << " ,";
+               if(icon.empty()) {
+                       str << COLUMN_SEPARATOR;
                } else {
-                       str << "&" << icon << ",";
+                       str << IMAGE_PREFIX << icon << COLUMN_SEPARATOR;
                }
 
                str << (**i)["name"];
@@ -950,7 +950,7 @@
                
campaign_desc.push_back(std::pair<std::string,std::string>(desc,image));
        }
 
-       campaign_names.push_back(_(" ,Get More Campaigns..."));
+       campaign_names.push_back(std::string(1, COLUMN_SEPARATOR) + _("Get More 
Campaigns..."));
        campaign_desc.push_back(std::pair<std::string,std::string>(_("Download 
more campaigns from a server on 
Internet."),game_config::download_campaign_image));
 
        int res = 0;
@@ -1050,7 +1050,12 @@
                }
 
                std::vector<std::string> campaigns, options;
-               options.push_back(_(",Name,Version,Author,Downloads,Size"));
+               std::string sep(1, COLUMN_SEPARATOR);
+               options.push_back(sep + _("Name") +
+                                 sep + _("Version") +
+                                 sep + _("Author") +
+                                 sep + _("Downloads") +
+                                 sep + _("Size"));
                const config::child_list& cmps = 
campaigns_cfg->get_children("campaign");
                const std::vector<std::string>& publish_options = 
available_campaigns();
 
@@ -1083,15 +1088,20 @@
                        }
 
                        std::replace(name.begin(),name.end(),'_',' ');
-                       options.push_back("&" + (**i)["icon"] + "," + name + 
"," + (**i)["version"] + "," + (**i)["author"] + "," + (**i)["downloads"] + "," 
+ size_str);
+                       options.push_back(IMAGE_PREFIX + (**i)["icon"] + 
COLUMN_SEPARATOR +
+                                         name + COLUMN_SEPARATOR +
+                                         (**i)["version"] + COLUMN_SEPARATOR +
+                                         (**i)["author"] + COLUMN_SEPARATOR +
+                                         (**i)["downloads"] + COLUMN_SEPARATOR 
+
+                                         size_str);
                }
 
                for(std::vector<std::string>::const_iterator j = 
publish_options.begin(); j != publish_options.end(); ++j) {
-                       options.push_back(std::string(",") + _("Publish 
campaign: ") + *j);
+                       options.push_back(sep + _("Publish campaign: ") + *j);
                }
 
                for(std::vector<std::string>::const_iterator d = 
delete_options.begin(); d != delete_options.end(); ++d) {
-                       options.push_back(std::string(",") + _("Delete 
campaign: ") + *d);
+                       options.push_back(sep + _("Delete campaign: ") + *d);
                }
 
                if(campaigns.empty() && publish_options.empty()) {




reply via email to

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