From 721c0090e666a77ce5f3f72bbbb356b8b3570d1a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 22:54:17 +0300 Subject: Use CREATEWIDGET macro in setup_theme. --- src/gui/widgets/tabs/setup_theme.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index a7a473593..63f17175c 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -34,6 +34,7 @@ #include "gui/widgets/button.h" #include "gui/widgets/containerplacer.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/dropdown.h" #include "gui/widgets/label.h" #include "gui/widgets/layouthelper.h" @@ -304,15 +305,17 @@ void Setup_Theme::action(const ActionEvent &event) } else if (eventId == ACTION_INFO) { - // TRANSLATORS: theme info dialog header - (new OkDialog(_("Theme info"), mThemeInfo, + CREATEWIDGET(OkDialog, + // TRANSLATORS: theme info dialog header + _("Theme info"), + mThemeInfo, // TRANSLATORS: ok dialog button _("OK"), DialogType::OK, Modal_false, ShowCenter_true, nullptr, - 600))->postInit(); + 600); } } @@ -337,8 +340,9 @@ void Setup_Theme::apply() { if (config.getStringValue("theme") != mTheme) { - // TRANSLATORS: theme message dialog - (new OkDialog(_("Theme Changed"), + CREATEWIDGET(OkDialog, + // TRANSLATORS: theme message dialog + _("Theme Changed"), // TRANSLATORS: ok dialog message _("Restart your client for the change to take effect."), // TRANSLATORS: ok dialog button @@ -347,7 +351,7 @@ void Setup_Theme::apply() Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); } config.setValue("selectedSkin", ""); -- cgit v1.2.3-60-g2f50