summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 19:14:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 19:14:32 +0300
commit0038b6987575b830366a49db354757afb64a8db1 (patch)
tree2a78c67937c3e6ecd5ea1122234965ce905c8cb0
parent38e76a1e6b2cd24c8f4ddf17631a0865142b169f (diff)
downloadmv-0038b6987575b830366a49db354757afb64a8db1.tar.gz
mv-0038b6987575b830366a49db354757afb64a8db1.tar.bz2
mv-0038b6987575b830366a49db354757afb64a8db1.tar.xz
mv-0038b6987575b830366a49db354757afb64a8db1.zip
Use CREATEWIDGET macro in mailwindow.
-rw-r--r--src/gui/windows/mailwindow.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 530e71090..dfb8f2c8c 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -32,6 +32,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/containerplacer.h"
+#include "gui/widgets/createwidget.h"
#include "gui/widgets/extendedlistbox.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/layouttype.h"
@@ -53,7 +54,8 @@ MailWindow::MailWindow() :
mMessages(),
mMessagesMap(),
mMailModel(new ExtendedNamesModel),
- mListBox(new ExtendedListBox(this, mMailModel, "extendedlistbox.xml")),
+ mListBox(CREATEWIDGETR(ExtendedListBox,
+ this, mMailModel, "extendedlistbox.xml")),
mListScrollArea(new ScrollArea(this, mListBox,
getOptionBool("showlistbackground"), "mail_listbackground.xml")),
// TRANSLATORS: mail window button
@@ -67,7 +69,6 @@ MailWindow::MailWindow() :
// TRANSLATORS: mail window button
mOpenButton(new Button(this, _("Open"), "open", this))
{
- mListBox->postInit();
setWindowName("Mail");
setCloseButton(true);
setResizable(true);
@@ -121,8 +122,7 @@ void MailWindow::action(const ActionEvent &event)
{
if (!mailEditWindow)
{
- mailEditWindow = new MailEditWindow;
- mailEditWindow->postInit();
+ CREATEWIDGETV0(mailEditWindow, MailEditWindow);
}
}
else if (eventId == "open")
@@ -215,8 +215,7 @@ void MailWindow::showMessage(MailMessage *const mail)
mail->strTime = mail2->strTime;
}
delete mailViewWindow;
- mailViewWindow = new MailViewWindow(mail);
- mailViewWindow->postInit();
+ CREATEWIDGETV(mailViewWindow, MailViewWindow, mail);
}
void MailWindow::viewNext(const int id)