summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 22:54:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 22:54:17 +0300
commit721c0090e666a77ce5f3f72bbbb356b8b3570d1a (patch)
tree1a3cf1600486fb68dc13124ec445f96bb0864cee /src
parent18ec6c4b67c6636a15e453672569249c30bfb5fa (diff)
downloadmv-721c0090e666a77ce5f3f72bbbb356b8b3570d1a.tar.gz
mv-721c0090e666a77ce5f3f72bbbb356b8b3570d1a.tar.bz2
mv-721c0090e666a77ce5f3f72bbbb356b8b3570d1a.tar.xz
mv-721c0090e666a77ce5f3f72bbbb356b8b3570d1a.zip
Use CREATEWIDGET macro in setup_theme.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp16
1 files changed, 10 insertions, 6 deletions
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", "");