summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-08 22:30:19 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-08 22:30:19 +0300
commit2061d47d50cafad5fd5d412b25c1dae110cd85ab (patch)
tree49f624f61216713368e350ee4f5550acd33184be /src/gui/windows/charselectdialog.cpp
parentb17247b5586f7e6a20802a0d3113b96c50810665 (diff)
downloadmanaplus-2061d47d50cafad5fd5d412b25c1dae110cd85ab.tar.gz
manaplus-2061d47d50cafad5fd5d412b25c1dae110cd85ab.tar.bz2
manaplus-2061d47d50cafad5fd5d412b25c1dae110cd85ab.tar.xz
manaplus-2061d47d50cafad5fd5d412b25c1dae110cd85ab.zip
Add option to change pin code into char selection dialog.
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r--src/gui/windows/charselectdialog.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index d48a1a162..638e5caa0 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -82,6 +82,7 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
mDeleteButton(new Button(this, _("Delete"), "delete", this)),
// TRANSLATORS: char select dialog. button.
mRenameButton(nullptr),
+ mChangePinButton(nullptr),
mCharacterView(nullptr),
mCharacterEntries(0),
mCharServerHandler(charServerHandler),
@@ -116,6 +117,18 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
placer(n, 0, mRenameButton, 1, 1);
n ++;
}
+#ifdef TMWA_SUPPORT
+ if (serverFeatures->havePincode())
+#endif
+ {
+ mChangePinButton = new Button(this,
+ // TRANSLATORS: change pincode button
+ _("Change pin"),
+ "changepin",
+ this);
+ placer(n, 0, mChangePinButton, 1, 1);
+ n ++;
+ }
placer(n, 0, mInfoButton, 1, 1);
n ++;
@@ -321,6 +334,13 @@ void CharSelectDialog::action(const ActionEvent &event)
}
mDeleteIndex = -1;
}
+ else if (eventId == "changepin")
+ {
+ if (blocked)
+ return;
+ pincodeManager.setState(PincodeState::Change);
+ pincodeManager.updateState();
+ }
}
void CharSelectDialog::use(const int selected)