summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-06 18:27:23 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-06 18:27:23 +0300
commit1db4d18ed1c04548ce8414adfb4e7cf830b39279 (patch)
tree4534efeb99af72798c8074a23a4b47a5bf6b3e75 /src/gui
parent088ce632451aef33f28801029aaded8c5a4c9dac (diff)
downloadplus-1db4d18ed1c04548ce8414adfb4e7cf830b39279.tar.gz
plus-1db4d18ed1c04548ce8414adfb4e7cf830b39279.tar.bz2
plus-1db4d18ed1c04548ce8414adfb4e7cf830b39279.tar.xz
plus-1db4d18ed1c04548ce8414adfb4e7cf830b39279.zip
Move servertype enum into separate file.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/editserverdialog.cpp26
-rw-r--r--src/gui/windows/serverdialog.cpp34
2 files changed, 30 insertions, 30 deletions
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 7a33d9a99..9de90ed91 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -143,7 +143,7 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
switch (mServer.type)
{
- case ServerInfo::EATHENA:
+ case ServerType::EATHENA:
#ifdef EATHENA_SUPPORT
#ifdef TMWA_SUPPORT
mTypeField->setSelected(2);
@@ -155,18 +155,18 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
#endif // EATHENA_SUPPORT
break;
default:
- case ServerInfo::UNKNOWN:
- case ServerInfo::TMWATHENA:
+ case ServerType::UNKNOWN:
+ case ServerType::TMWATHENA:
mTypeField->setSelected(0);
break;
- case ServerInfo::EVOL:
+ case ServerType::EVOL:
#ifdef TMWA_SUPPORT
mTypeField->setSelected(1);
#else // TMWA_SUPPORT
mTypeField->setSelected(0);
#endif // TMWA_SUPPORT
break;
- case ServerInfo::EVOL2:
+ case ServerType::EVOL2:
#ifdef EATHENA_SUPPORT
#ifdef TMWA_SUPPORT
mTypeField->setSelected(3);
@@ -239,38 +239,38 @@ void EditServerDialog::action(const ActionEvent &event)
{
#ifdef TMWA_SUPPORT
case 0:
- mServer.type = ServerInfo::TMWATHENA;
+ mServer.type = ServerType::TMWATHENA;
break;
case 1:
- mServer.type = ServerInfo::EVOL;
+ mServer.type = ServerType::EVOL;
break;
#ifdef EATHENA_SUPPORT
case 2:
- mServer.type = ServerInfo::EATHENA;
+ mServer.type = ServerType::EATHENA;
break;
case 3:
- mServer.type = ServerInfo::EVOL2;
+ mServer.type = ServerType::EVOL2;
break;
#endif
#else
#ifdef EATHENA_SUPPORT
case 0:
- mServer.type = ServerInfo::EATHENA;
+ mServer.type = ServerType::EATHENA;
break;
case 1:
- mServer.type = ServerInfo::EVOL2;
+ mServer.type = ServerType::EVOL2;
break;
#endif
#endif
default:
- mServer.type = ServerInfo::UNKNOWN;
+ mServer.type = ServerType::UNKNOWN;
break;
}
}
else
#endif // defined(TMWA_SUPPORT) || defined(EATHENA_SUPPORT)
{
- mServer.type = ServerInfo::TMWATHENA;
+ mServer.type = ServerType::TMWATHENA;
}
// Tell the server has to be saved
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 808fde152..fab444050 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -60,50 +60,50 @@
static const int MAX_SERVERLIST = 15;
-static std::string serverTypeToString(const ServerInfo::Type type)
+static std::string serverTypeToString(const ServerType::Type type)
{
switch (type)
{
#ifdef TMWA_SUPPORT
- case ServerInfo::TMWATHENA:
+ case ServerType::TMWATHENA:
return "TmwAthena";
- case ServerInfo::EVOL:
+ case ServerType::EVOL:
return "Evol";
#else
- case ServerInfo::TMWATHENA:
- case ServerInfo::EVOL:
+ case ServerType::TMWATHENA:
+ case ServerType::EVOL:
return "";
#endif
#ifdef EATHENA_SUPPORT
- case ServerInfo::EATHENA:
+ case ServerType::EATHENA:
return "eAthena";
- case ServerInfo::EVOL2:
+ case ServerType::EVOL2:
return "Evol2";
#else
- case ServerInfo::EATHENA:
- case ServerInfo::EVOL2:
+ case ServerType::EATHENA:
+ case ServerType::EVOL2:
return "";
#endif
default:
- case ServerInfo::UNKNOWN:
+ case ServerType::UNKNOWN:
return "";
}
}
-static uint16_t defaultPortForServerType(const ServerInfo::Type type)
+static uint16_t defaultPortForServerType(const ServerType::Type type)
{
switch (type)
{
default:
- case ServerInfo::EATHENA:
- case ServerInfo::EVOL2:
+ case ServerType::EATHENA:
+ case ServerType::EVOL2:
#ifdef EATHENA_SUPPORT
return 6900;
#endif
- case ServerInfo::UNKNOWN:
+ case ServerType::UNKNOWN:
#ifdef TMWA_SUPPORT
- case ServerInfo::TMWATHENA:
- case ServerInfo::EVOL:
+ case ServerType::TMWATHENA:
+ case ServerType::EVOL:
#endif
return 6901;
}
@@ -492,7 +492,7 @@ void ServerDialog::loadServers(const bool addNew)
server.type = ServerInfo::parseType(type);
// Ignore unknown server types
- if (server.type == ServerInfo::UNKNOWN)
+ if (server.type == ServerType::UNKNOWN)
{
logger->log("Ignoring server entry with unknown type: %s",
type.c_str());