summaryrefslogtreecommitdiff
path: root/src/gui/models
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/models
parent8a616021cbefff5f62b0ca55cf535130c8c1b5f0 (diff)
downloadplus-da98d12637db106b87341560cc72ca6207b2d12f.tar.gz
plus-da98d12637db106b87341560cc72ca6207b2d12f.tar.bz2
plus-da98d12637db106b87341560cc72ca6207b2d12f.tar.xz
plus-da98d12637db106b87341560cc72ca6207b2d12f.zip
Add configure and cmake option to enable/disable compilation for tmwa/evol.
Tmwa/evol by default enabled.
Diffstat (limited to 'src/gui/models')
-rw-r--r--src/gui/models/typelistmodel.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/models/typelistmodel.h b/src/gui/models/typelistmodel.h
index 2db290e70..bd27fce39 100644
--- a/src/gui/models/typelistmodel.h
+++ b/src/gui/models/typelistmodel.h
@@ -37,8 +37,10 @@ class TypeListModel final : public ListModel
* Used to get number of line in the list
*/
int getNumberOfElements() override final A_WARN_UNUSED
-#ifdef EATHENA_SUPPORT
+#if defined(EATHENA_SUPPORT) && defined(TMWA_SUPPORT)
{ return 3; }
+#elif defined(EATHENA_SUPPORT)
+ { return 1; }
#else
{ return 2; }
#endif
@@ -49,6 +51,7 @@ class TypeListModel final : public ListModel
std::string getElementAt(int elementIndex)
override final A_WARN_UNUSED
{
+#ifdef TMWA_SUPPORT
if (elementIndex == 0)
return "TmwAthena";
else if (elementIndex == 1)
@@ -56,7 +59,13 @@ class TypeListModel final : public ListModel
#ifdef EATHENA_SUPPORT
else if (elementIndex == 2)
return "eAthena";
-#endif
+#endif // EATHENA_SUPPORT
+#else // TMWA_SUPPORT
+#ifdef EATHENA_SUPPORT
+ if (elementIndex == 0)
+ return "eAthena";
+#endif // EATHENA_SUPPORT
+#endif // TMWA_SUPPORT
else
return "Unknown";
}