diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-14 21:16:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-14 21:16:40 +0300 |
commit | 0e13e22e4902eca435812ae002c56ad13233efc6 (patch) | |
tree | baa2a7d2554977854ad50340e5fc208779abee18 /src/net/ea/charserverhandler.cpp | |
parent | 2763d9c893b3f19485581cb21eabfa38f427eab9 (diff) | |
download | manaplus-0e13e22e4902eca435812ae002c56ad13233efc6.tar.gz manaplus-0e13e22e4902eca435812ae002c56ad13233efc6.tar.bz2 manaplus-0e13e22e4902eca435812ae002c56ad13233efc6.tar.xz manaplus-0e13e22e4902eca435812ae002c56ad13233efc6.zip |
Use CREATEWIDGET macro in charserverhandler.
Diffstat (limited to 'src/net/ea/charserverhandler.cpp')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index e798467e7..eafdaff34 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -27,6 +27,8 @@ #include "gui/windows/charcreatedialog.h" #include "gui/windows/okdialog.h" +#include "gui/widgets/createwidget.h" + #include "net/ea/eaprotocol.h" #include "net/character.h" @@ -135,15 +137,17 @@ void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg) errorMessage = _("Incorrect look."); break; } - // TRANSLATORS: error message header - (new OkDialog(_("Error"), errorMessage, + CREATEWIDGET(OkDialog, + // TRANSLATORS: error message header + _("Error"), + errorMessage, // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); if (mCharCreateDialog) mCharCreateDialog->unlock(); BLOCK_END("CharServerHandler::processCharCreateFailed") @@ -157,15 +161,18 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED) mSelectedCharacter = nullptr; updateCharSelectDialog(); unlockCharSelectDialog(); - // TRANSLATORS: info message - (new OkDialog(_("Info"), _("Character deleted."), + CREATEWIDGET(OkDialog, + // TRANSLATORS: info message header + _("Info"), + // TRANSLATORS: info message + _("Character deleted."), // TRANSLATORS: ok dialog button _("OK"), DialogType::OK, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); BLOCK_END("CharServerHandler::processCharDelete") } |