GCI: use player's name for the default team
task: http://www.google-melange.com/gci/task/view/google/gci2012/8007227
note:
these bugs were NOT introduced by this:
- double confirmation on team removal
- team addition fails
--- a/QTfrontend/hwform.cpp Wed Nov 28 10:57:07 2012 -0500
+++ b/QTfrontend/hwform.cpp Thu Nov 29 04:57:35 2012 +0100
@@ -453,9 +453,19 @@
if(teamslist.empty())
{
- HWTeam defaultTeam(tr("DefaultTeam"));
+ QString currentNickName = gameSettings->value("net/nick","").toString().toUtf8();
+ QString teamName;
+ if (currentNickName == "")
+ {
+ teamName = tr("DefaultTeam");
+ }
+ else
+ {
+ teamName = tr("%1's Team").arg(currentNickName);
+ }
+ HWTeam defaultTeam(teamName);
defaultTeam.saveToFile();
- teamslist.push_back(tr("DefaultTeam"));
+ teamslist.push_back(teamName);
}
ui.pageOptions->CBTeamName->clear();