[Top][All Lists]
[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: |
Sat, 07 May 2005 16:53:48 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 05/05/07 20:53:48
Modified files:
src : game.cpp
Log message:
Don't reload the multiplayer configuration if the user just noticed
that he prefers a single-player game.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.242&tr2=1.243&r1=text&r2=text
Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.242 wesnoth/src/game.cpp:1.243
--- wesnoth/src/game.cpp:1.242 Sat May 7 10:03:53 2005
+++ wesnoth/src/game.cpp Sat May 7 20:53:48 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.242 2005/05/07 10:03:53 silene Exp $ */
+/* $Id: game.cpp,v 1.243 2005/05/07 20:53:48 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1081,18 +1081,32 @@
std::vector<std::string> host_or_join;
std::string const pre = IMAGE_PREFIX + std::string("icons/icon-");
char const sep1 = COLUMN_SEPARATOR, sep2 = HELP_STRING_SEPARATOR;
- host_or_join.push_back(pre + "server.png" + sep1 + _("Join Official
Server") + sep2 + _("Log on to the official Wesnoth multiplayer server"));
- host_or_join.push_back(pre + "serverother.png" + sep1 + _("Join Game")
+ sep2 + _("Join a server or hosted game"));
- host_or_join.push_back(pre + "hostgame.png" + sep1 + _("Host Networked
Game") + sep2 + _("Host a game without using a server"));
- host_or_join.push_back(pre + "hotseat.png" + sep1 + _("Hotseat Game") +
sep2 + _("Play a multiplayer game sharing the same machine"));
- host_or_join.push_back(pre + "ai.png" + sep1 + _("Human vs AI") + sep2
+ _("Play a game against AI opponents"));
+
+ host_or_join.push_back(pre + "server.png"
+ + sep1 + _("Join Official Server")
+ + sep2 + _("Log on to the official Wesnoth multiplayer
server"));
+ host_or_join.push_back(pre + "serverother.png"
+ + sep1 + _("Join Game")
+ + sep2 + _("Join a server or hosted game"));
+ host_or_join.push_back(pre + "hostgame.png"
+ + sep1 + _("Host Networked Game")
+ + sep2 + _("Host a game without using a server"));
+ host_or_join.push_back(pre + "hotseat.png"
+ + sep1 + _("Hotseat Game")
+ + sep2 + _("Play a multiplayer game sharing the same machine"));
+ host_or_join.push_back(pre + "ai.png"
+ + sep1 + _("Human vs AI")
+ + sep2 + _("Play a game against AI opponents"));
std::string login = preferences::login();
- const int res =
gui::show_dialog(disp(),NULL,_("Multiplayer"),"",gui::OK_CANCEL,&host_or_join,NULL,_("Login:
"),&login);
- if(res >= 0) {
- preferences::set_login(login);
- }
+ int res = gui::show_dialog(disp(), NULL, _("Multiplayer"), "",
+ gui::OK_CANCEL, &host_or_join, NULL,
+ _("Login: "), &login);
+ if (res < 0)
+ return false;
+
+ preferences::set_login(login);
try {
defines_map_.clear();