From e8f38bb21acdade340979f51871513845a3d8a4f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 17:14:34 +0300 Subject: Use CREATEWIDGET macro in windowmanager. --- src/gui/windowmanager.cpp | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'src/gui/windowmanager.cpp') diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 902acb60d..6f1f223bc 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -43,6 +43,7 @@ #include "gui/windows/helpwindow.h" #include "gui/windows/setupwindow.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/desktop.h" #include "utils/delete2.h" @@ -94,24 +95,15 @@ void WindowManager::init() void WindowManager::createWindows() { userPalette = new UserPalette; - setupWindow = new SetupWindow; - setupWindow->postInit(); - helpWindow = new HelpWindow; - helpWindow->postInit(); - didYouKnowWindow = new DidYouKnowWindow; - didYouKnowWindow->postInit(); - popupMenu = new PopupMenu; - popupMenu->postInit(); - beingPopup = new BeingPopup; - beingPopup->postInit(); - textPopup = new TextPopup; - textPopup->postInit(); - textBoxPopup = new TextBoxPopup; - textBoxPopup->postInit(); - itemPopup = new ItemPopup; - itemPopup->postInit(); - spellPopup = new SpellPopup; - spellPopup->postInit(); + CREATEWIDGET1(setupWindow, SetupWindow); + CREATEWIDGET1(helpWindow, HelpWindow); + CREATEWIDGET1(didYouKnowWindow, DidYouKnowWindow); + CREATEWIDGET1(popupMenu, PopupMenu); + CREATEWIDGET1(beingPopup, BeingPopup); + CREATEWIDGET1(textPopup, TextPopup); + CREATEWIDGET1(textBoxPopup, TextBoxPopup); + CREATEWIDGET1(itemPopup, ItemPopup); + CREATEWIDGET1(spellPopup, SpellPopup); } void WindowManager::deleteWindows() -- cgit v1.2.3-70-g09d2