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/eathena | |
parent | 2763d9c893b3f19485581cb21eabfa38f427eab9 (diff) | |
download | mv-0e13e22e4902eca435812ae002c56ad13233efc6.tar.gz mv-0e13e22e4902eca435812ae002c56ad13233efc6.tar.bz2 mv-0e13e22e4902eca435812ae002c56ad13233efc6.tar.xz mv-0e13e22e4902eca435812ae002c56ad13233efc6.zip |
Use CREATEWIDGET macro in charserverhandler.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 893be8f4f..692ea5dfb 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -30,6 +30,8 @@ #include "gui/windows/charselectdialog.h" #include "gui/windows/okdialog.h" +#include "gui/widgets/createwidget.h" + #include "net/character.h" #include "net/serverfeatures.h" @@ -578,15 +580,18 @@ void CharServerHandler::processCharCheckRename(Net::MessageIn &msg) } else { - // TRANSLATORS: info message - (new OkDialog(_("Error"), _("Character rename error."), + CREATEWIDGET(OkDialog, + // TRANSLATORS: error header + _("Error"), + // TRANSLATORS: error message + _("Character rename error."), // TRANSLATORS: ok dialog button _("Error"), DialogType::ERROR, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); } } @@ -596,15 +601,18 @@ void CharServerHandler::processCharRename(Net::MessageIn &msg) if (!flag) { mCharSelectDialog->setName(mRenameId, mNewName); - // TRANSLATORS: info message - (new OkDialog(_("Info"), _("Character renamed."), + CREATEWIDGET(OkDialog, + // TRANSLATORS: info header + _("Info"), + // TRANSLATORS: info message + _("Character renamed."), // TRANSLATORS: ok dialog button _("OK"), DialogType::OK, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); } else { @@ -629,15 +637,17 @@ void CharServerHandler::processCharRename(Net::MessageIn &msg) message = _("Character not found."); break; } - // TRANSLATORS: info message - (new OkDialog(_("Info"), message, + CREATEWIDGET(OkDialog, + // TRANSLATORS: info message + _("Info"), + message, // TRANSLATORS: ok dialog button _("OK"), DialogType::OK, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); } } @@ -662,15 +672,18 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg) BLOCK_START("CharServerHandler::processCharDeleteFailed") unlockCharSelectDialog(); msg.readUInt8("error"); - // TRANSLATORS: error message - (new OkDialog(_("Error"), _("Failed to delete character."), + CREATEWIDGET(OkDialog, + // TRANSLATORS: error header + _("Error"), + // TRANSLATORS: error message + _("Failed to delete character."), // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); BLOCK_END("CharServerHandler::processCharDeleteFailed") } |