diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-10-11 23:14:15 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-10-11 23:14:15 +0000 |
commit | 38baa32f47092ef0a140a3aa94bf50f89786ec86 (patch) | |
tree | fff9e184ec2e578b44ac70e0959c6c373472c791 /src/gui/windows/editserverdialog.cpp | |
parent | 9c7c7093b94e908efff0798004c2595a8b5c0fcd (diff) | |
download | mv-38baa32f47092ef0a140a3aa94bf50f89786ec86.tar.gz mv-38baa32f47092ef0a140a3aa94bf50f89786ec86.tar.bz2 mv-38baa32f47092ef0a140a3aa94bf50f89786ec86.tar.xz mv-38baa32f47092ef0a140a3aa94bf50f89786ec86.zip |
Introduce a kludge to deduplicate server type strings.
****
mana/plus!104
Diffstat (limited to 'src/gui/windows/editserverdialog.cpp')
-rw-r--r-- | src/gui/windows/editserverdialog.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index e73e1ab43..80dfe60ea 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -165,24 +165,16 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, switch (mServer.type) { - case ServerType::EATHENA: -#ifdef TMWA_SUPPORT - mTypeField->setSelected(1); -#else // TMWA_SUPPORT - mTypeField->setSelected(0); -#endif // TMWA_SUPPORT - break; default: case ServerType::UNKNOWN: case ServerType::TMWATHENA: mTypeField->setSelected(0); break; + case ServerType::EATHENA: + mTypeField->setSelected(1 - SERVER_TYPE_INDEX_OFFSET); + break; case ServerType::EVOL2: -#ifdef TMWA_SUPPORT - mTypeField->setSelected(2); -#else // TMWA_SUPPORT - mTypeField->setSelected(1); -#endif // TMWA_SUPPORT + mTypeField->setSelected(2 - SERVER_TYPE_INDEX_OFFSET); break; } @@ -253,22 +245,13 @@ void EditServerDialog::action(const ActionEvent &event) case 0: mServer.type = ServerType::TMWATHENA; break; - case 1: - mServer.type = ServerType::EATHENA; - break; - case 2: +#endif // TMWA_SUPPORT + case 1 - SERVER_TYPE_INDEX_OFFSET: mServer.type = ServerType::EVOL2; break; -#else // TMWA_SUPPORT - - case 0: + case 2 - SERVER_TYPE_INDEX_OFFSET: mServer.type = ServerType::EATHENA; break; - case 1: - mServer.type = ServerType::EVOL2; - break; -#endif // TMWA_SUPPORT - default: mServer.type = ServerType::UNKNOWN; break; |