diff options
Diffstat (limited to 'src/gui/customserverdialog.cpp')
-rw-r--r-- | src/gui/customserverdialog.cpp | 14 |
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: |