From 828a0879bfdeb2a8fe2ca37cb54694266705a4cf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 19:34:25 +0300 Subject: Use CREATEWIDGET macro in charcreatedialog. --- src/gui/windows/charcreatedialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 049d91dc6..eba1dd96e 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -30,6 +30,7 @@ #include "gui/widgets/button.h" #include "gui/windows/charselectdialog.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/label.h" #include "gui/widgets/playerbox.h" #include "gui/widgets/slider.h" @@ -372,8 +373,9 @@ void CharCreateDialog::action(const ActionEvent &event) } else { - // TRANSLATORS: char creation error - (new OkDialog(_("Error"), + CREATEWIDGET(OkDialog, + // TRANSLATORS: char creation error + _("Error"), // TRANSLATORS: char creation error _("Your name needs to be at least 4 characters."), // TRANSLATORS: ok dialog button @@ -382,7 +384,7 @@ void CharCreateDialog::action(const ActionEvent &event) Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); } } else if (id == "cancel") -- cgit v1.2.3-70-g09d2