summaryrefslogtreecommitdiff
path: root/src/gui/windows/editserverdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-14 16:51:36 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-14 16:51:36 +0300
commitda98d12637db106b87341560cc72ca6207b2d12f (patch)
treec79f1c3389f38ec878fc2dfc4729839242e2e81c /src/gui/windows/editserverdialog.cpp
parent8a616021cbefff5f62b0ca55cf535130c8c1b5f0 (diff)
downloadmv-da98d12637db106b87341560cc72ca6207b2d12f.tar.gz
mv-da98d12637db106b87341560cc72ca6207b2d12f.tar.bz2
mv-da98d12637db106b87341560cc72ca6207b2d12f.tar.xz
mv-da98d12637db106b87341560cc72ca6207b2d12f.zip
Add configure and cmake option to enable/disable compilation for tmwa/evol.
Tmwa/evol by default enabled.
Diffstat (limited to 'src/gui/windows/editserverdialog.cpp')
-rw-r--r--src/gui/windows/editserverdialog.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 11f22fafe..3dd7dd72b 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -145,21 +145,28 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
switch (mServer.type)
{
-#ifdef EATHENA_SUPPORT
case ServerInfo::EATHENA:
+#ifdef EATHENA_SUPPORT
+#ifdef TMWA_SUPPORT
mTypeField->setSelected(2);
+#else // TMWA_SUPPORT
+ mTypeField->setSelected(0);
+#endif // TMWA_SUPPORT
+#else // EATHENA_SUPPORT
+ mTypeField->setSelected(0);
+#endif // EATHENA_SUPPORT
break;
-#endif
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
-#ifndef EATHENA_SUPPORT
- case ServerInfo::EATHENA:
-#endif
mTypeField->setSelected(0);
break;
case ServerInfo::EVOL:
+#ifdef TMWA_SUPPORT
mTypeField->setSelected(1);
+#else // TMWA_SUPPORT
+ mTypeField->setSelected(0);
+#endif // TMWA_SUPPORT
break;
}
@@ -220,6 +227,7 @@ void EditServerDialog::action(const ActionEvent &event)
{
switch (mTypeField->getSelected())
{
+#ifdef TMWA_SUPPORT
case 0:
mServer.type = ServerInfo::TMWATHENA;
break;
@@ -231,6 +239,13 @@ void EditServerDialog::action(const ActionEvent &event)
mServer.type = ServerInfo::EATHENA;
break;
#endif
+#else
+#ifdef EATHENA_SUPPORT
+ case 0:
+ mServer.type = ServerInfo::EATHENA;
+ break;
+#endif
+#endif
default:
mServer.type = ServerInfo::UNKNOWN;
break;