summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/serverdialog.cpp14
-rw-r--r--src/gui/theme.cpp2
2 files changed, 3 insertions, 13 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index eb6e9b4b..6a6c7a91 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -49,16 +49,6 @@
static const int MAX_SERVERLIST = 6;
-static ServerInfo::Type stringToServerType(const std::string &type)
-{
- if (compareStrI(type, "eathena") == 0)
- return ServerInfo::EATHENA;
- else if (compareStrI(type, "manaserv") == 0)
- return ServerInfo::MANASERV;
-
- return ServerInfo::UNKNOWN;
-}
-
static std::string serverTypeToString(ServerInfo::Type type)
{
switch (type)
@@ -448,7 +438,7 @@ void ServerDialog::loadServers()
std::string type = XML::getProperty(serverNode, "type", "unknown");
- server.type = stringToServerType(type);
+ server.type = ServerInfo::parseType(type);
server.name = XML::getProperty(serverNode, "name", std::string());
if (server.type == ServerInfo::UNKNOWN)
@@ -503,7 +493,7 @@ void ServerDialog::loadCustomServers()
ServerInfo server;
server.hostname = config.getValue(nameKey, "");
- server.type = stringToServerType(config.getValue(typeKey, ""));
+ server.type = ServerInfo::parseType(config.getValue(typeKey, ""));
const int defaultPort = defaultPortForServerType(server.type);
server.port = (unsigned short) config.getValue(portKey, defaultPort);
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 1841f8d9..4e0090e9 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -40,7 +40,7 @@
#include <algorithm>
-#define GUI_ROOT "graphics/gui"
+#define GUI_ROOT "graphics/gui/"
std::string Theme::mThemePath;
Theme *Theme::mInstance = 0;