summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/customserverdialog.cpp14
-rw-r--r--src/gui/customserverdialog.h2
-rw-r--r--src/gui/serverdialog.cpp4
-rw-r--r--src/net/net.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp
index d23b9459..9d56a3ce 100644
--- a/src/gui/customserverdialog.cpp
+++ b/src/gui/customserverdialog.cpp
@@ -38,7 +38,7 @@ std::string TypeListModel::getElementAt(int elementIndex)
{
if (elementIndex == 0)
return "TmwAthena";
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
else if (elementIndex == 1)
return "ManaServ";
#endif
@@ -56,14 +56,14 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index):
Label *nameLabel = new Label(_("Name:"));
Label *serverAdressLabel = new Label(_("Address:"));
Label *portLabel = new Label(_("Port:"));
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
Label *typeLabel = new Label(_("Server type:"));
#endif
Label *descriptionLabel = new Label(_("Description:"));
mServerAddressField = new TextField(std::string());
mPortField = new TextField(std::string());
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
mTypeListModel = new TypeListModel();
mTypeField = new DropDown(mTypeListModel);
mTypeField->setSelected(0); // TmwAthena by default for now.
@@ -84,7 +84,7 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index):
place(1, 1, mServerAddressField, 4).setPadding(3);
place(0, 2, portLabel);
place(1, 2, mPortField, 4).setPadding(3);
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
place(0, 3, typeLabel);
place(1, 3, mTypeField).setPadding(3);
#endif
@@ -127,7 +127,7 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index):
mDescriptionField->setText(serverInfo.description);
mServerAddressField->setText(serverInfo.hostname);
mPortField->setText(toString(serverInfo.port));
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
mTypeField->setSelected(serverInfo.type == ServerInfo::TMWATHENA ?
0 : 1);
#endif
@@ -141,7 +141,7 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index):
CustomServerDialog::~CustomServerDialog()
{
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
delete mTypeListModel;
#endif
}
@@ -179,7 +179,7 @@ void CustomServerDialog::action(const gcn::ActionEvent &event)
serverInfo.description = mDescriptionField->getText();
serverInfo.hostname = mServerAddressField->getText();
serverInfo.port = (short) atoi(mPortField->getText().c_str());
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
switch (mTypeField->getSelected())
{
case 0:
diff --git a/src/gui/customserverdialog.h b/src/gui/customserverdialog.h
index 37a3b823..19812875 100644
--- a/src/gui/customserverdialog.h
+++ b/src/gui/customserverdialog.h
@@ -86,7 +86,7 @@ class CustomServerDialog : public Window,
TextField *mDescriptionField;
Button *mOkButton;
Button *mCancelButton;
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
DropDown *mTypeField;
TypeListModel *mTypeListModel;
#endif
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 66afe912..5c1d35a1 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -282,7 +282,7 @@ void ServerDialog::action(const gcn::ActionEvent &event)
// Check login
if (index < 0
-#ifndef ENABLE_MANASERV
+#ifndef MANASERV_SUPPORT
|| mServersListModel->getServer(index).type == ServerInfo::MANASERV
#endif
)
@@ -475,7 +475,7 @@ void ServerDialog::loadServers()
// Ignore unknown server types
if (server.type == ServerInfo::UNKNOWN
-#ifndef ENABLE_MANASERV
+#ifndef MANASERV_SUPPORT
|| server.type == ServerInfo::MANASERV
#endif
)
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 4b28f567..8946945b 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -154,7 +154,7 @@ void connectToServer(ServerInfo &server)
switch (server.type)
{
-#ifdef ENABLE_MANASERV
+#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
new ManaServ::GeneralHandler;
break;