summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-09 21:05:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-09 21:05:11 +0300
commitc175949a70a621a246df04a7824267a59299136b (patch)
tree988feb528c421dbc69eabbb1cc4fc03c97912cd6 /src/client.cpp
parent76a67b908156124490210db74832f34d3ab3652e (diff)
downloadplus-c175949a70a621a246df04a7824267a59299136b.tar.gz
plus-c175949a70a621a246df04a7824267a59299136b.tar.bz2
plus-c175949a70a621a246df04a7824267a59299136b.tar.xz
plus-c175949a70a621a246df04a7824267a59299136b.zip
Show player login in window title.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index ccc64b30f..c027aae9e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -775,7 +775,6 @@ void Client::stateConnectServer1()
settings.persistentIp = mCurrentServer.persistentIp;
settings.supportUrl = mCurrentServer.supportUrl;
settings.updateMirrors = mCurrentServer.updateMirrors;
- WindowManager::updateTitle();
if (settings.options.username.empty())
{
@@ -788,6 +787,8 @@ void Client::stateConnectServer1()
{
loginData.username = settings.options.username;
}
+ settings.login = loginData.username;
+ WindowManager::updateTitle();
loginData.remember = serverConfig.getValue("remember", 1);
Net::connectToServer(mCurrentServer);
@@ -1086,7 +1087,7 @@ int Client::gameExec()
CREATEWIDGETV(mCurrentDialog, ConnectionDialog,
// TRANSLATORS: connection dialog header
_("Connecting to server"),
- State::SWITCH_SERVER);
+ State::SWITCH_SERVER);
TranslationManager::loadCurrentLang();
BLOCK_END("Client::gameExec State::CONNECT_SERVER")
break;
@@ -1619,6 +1620,7 @@ int Client::gameExec()
gameHandler->clear();
}
settings.serverName.clear();
+ settings.login.clear();
WindowManager::updateTitle();
serverConfig.write();
serverConfig.unload();
@@ -1643,6 +1645,8 @@ int Client::gameExec()
if (loginHandler)
loginHandler->connect();
+ settings.login.clear();
+ WindowManager::updateTitle();
mState = State::LOGIN;
BLOCK_END("Client::gameExec State::SWITCH_LOGIN")
break;
@@ -1655,6 +1659,8 @@ int Client::gameExec()
if (gameHandler)
gameHandler->disconnect();
+ settings.login.clear();
+ WindowManager::updateTitle();
mState = State::GET_CHARACTERS;
BLOCK_END("Client::gameExec State::SWITCH_CHARACTER")
break;