From 3d447679df26179b7ffa781c34f5277e6a1aec29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Apr 2011 18:38:52 +0300 Subject: Dont compile manaserv related code if manaserv support disabled. --- src/gui/serverdialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gui/serverdialog.cpp') 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); -- cgit v1.2.3-60-g2f50