summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-13 22:14:56 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-13 22:14:56 +0300
commit6b894220f3c029d256f7f15f41ecb2f635d25bde (patch)
treea8c9b891f3f0df44440def2ea755fcf7454ddb32 /src/gui
parentb4cd8029339cac3c577b67bd161b4dd3ab4f1530 (diff)
downloadplus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.gz
plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.bz2
plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.tar.xz
plus-6b894220f3c029d256f7f15f41ecb2f635d25bde.zip
Add more MANASERV_SUPPORT defines to disable server type checks, if manaserv disabled.
Fix some compilation warnings.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/serverdialog.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 48b364264..ca5711104 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -66,6 +66,8 @@ static std::string serverTypeToString(ServerInfo::Type type)
#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
return "ManaServ";
+#else
+ case ServerInfo::MANASERV:
#endif
default:
case ServerInfo::UNKNOWN:
@@ -80,10 +82,13 @@ static unsigned short defaultPortForServerType(ServerInfo::Type type)
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
- return 6901;
#ifdef MANASERV_SUPPORT
+ return 6901;
case ServerInfo::MANASERV:
return 9601;
+#else
+ case ServerInfo::MANASERV:
+ return 6901;
#endif
}
}
@@ -481,13 +486,18 @@ void ServerDialog::valueChanged(const gcn::SelectionEvent &)
{
case ServerInfo::TMWATHENA:
case ServerInfo::UNKNOWN:
+#ifdef MANASERV_SUPPORT
default:
mTypeField->setSelected(0);
break;
-#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
mTypeField->setSelected(1);
break;
+#else
+ case ServerInfo::MANASERV:
+ default:
+ mTypeField->setSelected(0);
+ break;
#endif
}
}