summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-16 13:14:40 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-16 13:14:40 +0300
commit70e36aca580fd6ebce8f28a301de3cc2660023d1 (patch)
treefade54b3e3144068978ed48a06dff5251debfbfb /src/gui/windows/charselectdialog.cpp
parentce699929e853c21d4cbd4e5a84ed76ca904f5bab (diff)
downloadplus-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.gz
plus-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.bz2
plus-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.xz
plus-70e36aca580fd6ebce8f28a301de3cc2660023d1.zip
Move chardeleteconfirm into separate file.
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r--src/gui/windows/charselectdialog.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index c9801e26a..559b1f349 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -33,6 +33,7 @@
#include "being/attributes.h"
#include "gui/windows/charcreatedialog.h"
+#include "gui/windows/chardeleteconfirm.h"
#include "gui/windows/confirmdialog.h"
#include "gui/windows/logindialog.h"
#include "gui/windows/okdialog.h"
@@ -56,38 +57,6 @@
// Character slots per row in the dialog
static const int SLOTS_PER_ROW = 5;
-/**
- * Listener for confirming character deletion.
- */
-class CharDeleteConfirm final : public ConfirmDialog
-{
- public:
- CharDeleteConfirm(CharSelectDialog *const m, const int index) :
- // TRANSLATORS: char deletion message
- ConfirmDialog(_("Confirm Character Delete"),
- // TRANSLATORS: char deletion message
- _("Are you sure you want to delete this character?"),
- SOUND_REQUEST, false, false, m),
- mMaster(m),
- mIndex(index)
- {
- }
-
- A_DELETE_COPY(CharDeleteConfirm)
-
- void action(const ActionEvent &event)
- {
- if (event.getId() == "yes" && mMaster)
- mMaster->askPasswordForDeletion(mIndex);
-
- ConfirmDialog::action(event);
- }
-
- private:
- CharSelectDialog *mMaster;
- int mIndex;
-};
-
CharSelectDialog::CharSelectDialog(LoginData *const data):
// TRANSLATORS: char select dialog name
Window(strprintf(_("Account %s (last login time %s)"),