summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-13 03:27:36 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-13 03:27:36 +0300
commit9e400ed9be599e9d74bae6422f8c7e458a016de0 (patch)
tree8a950046ae518748f326618eea103e0c7593f495 /src
parente2b81d3e9adb1e101d3a28144a0a1f17d91ed958 (diff)
downloadManaVerse-9e400ed9be599e9d74bae6422f8c7e458a016de0.tar.gz
ManaVerse-9e400ed9be599e9d74bae6422f8c7e458a016de0.tar.bz2
ManaVerse-9e400ed9be599e9d74bae6422f8c7e458a016de0.tar.xz
ManaVerse-9e400ed9be599e9d74bae6422f8c7e458a016de0.zip
Show site url in server info window.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/serverdialog.cpp5
-rw-r--r--src/gui/windows/serverinfowindow.cpp8
-rw-r--r--src/net/serverinfo.h5
3 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 6192f040d..2cd006e4e 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -650,6 +650,10 @@ void ServerDialog::loadServers(const bool addNew)
{
server.updateMirrors.push_back(XmlChildContent(subNode));
}
+ else if (xmlNameEqual(subNode, "site"))
+ {
+ server.serverUrl = XmlChildContent(subNode);
+ }
}
if (xmlNameEqual(subNode, "updates"))
{
@@ -687,6 +691,7 @@ void ServerDialog::loadServers(const bool addNew)
mServers[i].registerUrl = server.registerUrl;
mServers[i].onlineListUrl = server.onlineListUrl;
mServers[i].supportUrl = server.supportUrl;
+ mServers[i].serverUrl = server.serverUrl;
mServers[i].althostname = server.althostname;
mServers[i].persistentIp = server.persistentIp;
mServers[i].updateMirrors = server.updateMirrors;
diff --git a/src/gui/windows/serverinfowindow.cpp b/src/gui/windows/serverinfowindow.cpp
index 23e7a7e50..99c0a902a 100644
--- a/src/gui/windows/serverinfowindow.cpp
+++ b/src/gui/windows/serverinfowindow.cpp
@@ -121,12 +121,15 @@ void ServerInfoWindow::showServerInfo()
mBrowserBox->addRow(_("##BServer unknown licesne."));
}
mBrowserBox->addRow("");
+ addServerComment(mServerInfo.serverUrl,
+ // TRANSLATORS: server info comment
+ _("Server"));
addServerComment(mServerInfo.supportUrl,
// TRANSLATORS: server info comment
- _("Support url"));
+ _("Support"));
addServerComment(mServerInfo.registerUrl,
// TRANSLATORS: server info comment
- _("Register url"));
+ _("Register"));
addSourcesList(mServerInfo.nonFreeSources,
// TRANSLATORS: server info non free comment
@@ -149,7 +152,6 @@ void ServerInfoWindow::addSourcesList(const std::vector<ServerUrlInfo> &list,
addServerComment(info.url,
info.name);
}
- mBrowserBox->addRow("");
}
}
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index ab4a99081..70ac3b716 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -47,6 +47,7 @@ class ServerInfo final
std::string registerUrl;
std::string onlineListUrl;
std::string supportUrl;
+ std::string serverUrl;
std::string defaultHostName;
std::vector<std::string> updateMirrors;
std::vector<HostsGroup> updateHosts;
@@ -68,6 +69,7 @@ class ServerInfo final
registerUrl(),
onlineListUrl(),
supportUrl(),
+ serverUrl(),
defaultHostName(),
updateMirrors(),
updateHosts(),
@@ -96,6 +98,7 @@ class ServerInfo final
registerUrl(info.registerUrl),
onlineListUrl(info.onlineListUrl),
supportUrl(info.supportUrl),
+ serverUrl(info.serverUrl),
defaultHostName(info.defaultHostName),
updateMirrors(info.updateMirrors),
updateHosts(info.updateHosts),
@@ -124,6 +127,7 @@ class ServerInfo final
registerUrl = info.registerUrl;
onlineListUrl = info.onlineListUrl;
supportUrl = info.supportUrl;
+ serverUrl = info.serverUrl;
defaultHostName = info.defaultHostName;
updateMirrors = info.updateMirrors;
updateHosts = info.updateHosts;
@@ -156,6 +160,7 @@ class ServerInfo final
registerUrl.clear();
onlineListUrl.clear();
supportUrl.clear();
+ serverUrl.clear();
defaultHostName.clear();
updateMirrors.clear();
updateHosts.clear();