diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-16 13:14:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-16 13:14:40 +0300 |
commit | 70e36aca580fd6ebce8f28a301de3cc2660023d1 (patch) | |
tree | fade54b3e3144068978ed48a06dff5251debfbfb /src/gui/windows/charselectdialog.cpp | |
parent | ce699929e853c21d4cbd4e5a84ed76ca904f5bab (diff) | |
download | manaverse-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.gz manaverse-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.bz2 manaverse-70e36aca580fd6ebce8f28a301de3cc2660023d1.tar.xz manaverse-70e36aca580fd6ebce8f28a301de3cc2660023d1.zip |
Move chardeleteconfirm into separate file.
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 33 |
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)"), |