summaryrefslogtreecommitdiff
path: root/src/gui/customserverdialog.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 17:22:46 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 17:25:39 +0100
commit6fd1246735010bccd0d75e9e7969431b963b7858 (patch)
treebc92ba46c7fa966e44519317dc9e53e7008ef050 /src/gui/customserverdialog.cpp
parente30673821b6bd79d21e9443b5fe7f4a093b98dbc (diff)
downloadmana-6fd1246735010bccd0d75e9e7969431b963b7858.tar.gz
mana-6fd1246735010bccd0d75e9e7969431b963b7858.tar.bz2
mana-6fd1246735010bccd0d75e9e7969431b963b7858.tar.xz
mana-6fd1246735010bccd0d75e9e7969431b963b7858.zip
Fixed manaserv-enabled builds
Wrong define was used in the code.
Diffstat (limited to 'src/gui/customserverdialog.cpp')
-rw-r--r--src/gui/customserverdialog.cpp14
1 files changed, 7 insertions, 7 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: