summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-13 23:01:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-13 23:02:53 +0300
commitcd7e273322d9648be6c005fd2930a6037149a357 (patch)
treeda429361f7c1ddc5e3c4500684a4b25dee36406b /src/gui
parent3f87e3c0f191d72c3295955736a057430b3ab661 (diff)
downloadmanaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.gz
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.bz2
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.xz
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.zip
Remove manaserv related RegistrationOptions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/charselectdialog.cpp28
-rw-r--r--src/gui/windows/charselectdialog.h2
-rw-r--r--src/gui/windows/registerdialog.cpp9
3 files changed, 3 insertions, 36 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 476cd50b9..65d7d19f6 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -49,7 +49,6 @@
#include "net/charserverhandler.h"
#include "net/logindata.h"
#include "net/loginhandler.h"
-#include "net/registrationoptions.h"
#include "net/serverfeatures.h"
#include "debug.h"
@@ -72,8 +71,6 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
// TRANSLATORS: char select dialog. button.
mChangePasswordButton(new Button(this, _("Password"),
"change_password", this)),
- mUnregisterButton(nullptr),
- mChangeEmailButton(nullptr),
// TRANSLATORS: char select dialog. button.
mPlayButton(new Button(this, _("Play"), "use", this)),
// TRANSLATORS: char select dialog. button.
@@ -94,35 +91,14 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
setCloseButton(true);
setFocusable(true);
- const int optionalActions = loginHandler->supportedOptionalActions();
-
ContainerPlacer placer;
placer = getPlacer(0, 0);
placer(0, 0, mSwitchLoginButton);
int n = 1;
- if (optionalActions & Net::RegistrationOptions::Unregister)
- {
- // TRANSLATORS: char select dialog. button.
- mUnregisterButton = new Button(this, _("Unregister"),
- "unregister", this);
- placer(n, 0, mUnregisterButton);
- n ++;
- }
-
placer(n, 0, mChangePasswordButton);
n ++;
-
- if (optionalActions & Net::RegistrationOptions::ChangeEmail)
- {
- // TRANSLATORS: char select dialog. button.
- mChangeEmailButton = new Button(this, _("Change Email"),
- "change_email", this);
- placer(n, 0, mChangeEmailButton);
- n ++;
- }
-
placer(n, 0, mDeleteButton);
n ++;
if (serverFeatures->haveCharRename())
@@ -555,10 +531,6 @@ void CharSelectDialog::setLocked(const bool locked)
mSwitchLoginButton->setEnabled(!locked);
if (mChangePasswordButton)
mChangePasswordButton->setEnabled(!locked);
- if (mUnregisterButton)
- mUnregisterButton->setEnabled(!locked);
- if (mChangeEmailButton)
- mChangeEmailButton->setEnabled(!locked);
mPlayButton->setEnabled(!locked);
if (mDeleteButton)
mDeleteButton->setEnabled(!locked);
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 39df750ac..7cb496f14 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -118,8 +118,6 @@ class CharSelectDialog final : public Window,
Button *mSwitchLoginButton A_NONNULLPOINTER;
Button *mChangePasswordButton A_NONNULLPOINTER;
- Button *mUnregisterButton;
- Button *mChangeEmailButton;
Button *mPlayButton A_NONNULLPOINTER;
Button *mInfoButton A_NONNULLPOINTER;
Button *mDeleteButton A_NONNULLPOINTER;
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 06a47c6b5..d3deaeb5e 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -38,7 +38,6 @@
#include "net/logindata.h"
#include "net/loginhandler.h"
-#include "net/registrationoptions.h"
#include "net/serverfeatures.h"
#include "utils/delete2.h"
@@ -67,9 +66,6 @@ RegisterDialog::RegisterDialog(LoginData &data) :
{
setCloseButton(true);
- const int optionalActions = loginHandler->
- supportedOptionalActions();
-
// TRANSLATORS: register dialog. label.
Label *const userLabel = new Label(this, _("Name:"));
// TRANSLATORS: register dialog. label.
@@ -89,7 +85,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
int row = 3;
- if (optionalActions & Net::RegistrationOptions::SetGenderOnRegister)
+ // for future usage flag
+ if (true)
{
// TRANSLATORS: register dialog. button.
mMaleButton = new RadioButton(this, _("Male"), "sex", true);
@@ -112,7 +109,7 @@ RegisterDialog::RegisterDialog(LoginData &data) :
row++;
}
- if (optionalActions & Net::RegistrationOptions::SetEmailOnRegister)
+ if (serverFeatures->haveEmailOnRegister())
{
// TRANSLATORS: register dialog. label.
Label *const emailLabel = new Label(this, _("Email:"));