summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-25 18:38:52 +0300
commit3d447679df26179b7ffa781c34f5277e6a1aec29 (patch)
tree242365d32770a89448130684ad7ed2bf00c22561 /src/gui/serverdialog.cpp
parent8c8f9f6cf53a6d5b8d9d72f4860921b3325a7696 (diff)
downloadmanaverse-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.gz
manaverse-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.bz2
manaverse-3d447679df26179b7ffa781c34f5277e6a1aec29.tar.xz
manaverse-3d447679df26179b7ffa781c34f5277e6a1aec29.zip
Dont compile manaserv related code if manaserv support disabled.
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r--src/gui/serverdialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 45ec907fb..e0d0a1e41 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -63,8 +63,10 @@ static std::string serverTypeToString(ServerInfo::Type type)
{
case ServerInfo::TMWATHENA:
return "TmwAthena";
+#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
return "ManaServ";
+#endif
default:
case ServerInfo::UNKNOWN:
return "";
@@ -79,8 +81,10 @@ static unsigned short defaultPortForServerType(ServerInfo::Type type)
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
return 6901;
+#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
return 9601;
+#endif
}
}
@@ -390,9 +394,11 @@ void ServerDialog::action(const gcn::ActionEvent &event)
case 0:
mServerInfo->type = ServerInfo::TMWATHENA;
break;
+#ifdef MANASERV_SUPPORT
case 1:
mServerInfo->type = ServerInfo::MANASERV;
break;
+#endif
default:
mServerInfo->type = ServerInfo::UNKNOWN;
}
@@ -478,9 +484,11 @@ void ServerDialog::valueChanged(const gcn::SelectionEvent &)
default:
mTypeField->setSelected(0);
break;
+#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
mTypeField->setSelected(1);
break;
+#endif
}
}
setFieldsReadOnly(true);