summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
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)"),