diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-19 12:25:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:22 +0300 |
commit | 15c19f19e86f94bc28cd0f2b80f0c5be394479fa (patch) | |
tree | 10339ba090fb0d35790d963e74b0526959daab31 | |
parent | 589e377f6159268bb3a3ec072ffce30ce4ad5422 (diff) | |
download | manaverse-15c19f19e86f94bc28cd0f2b80f0c5be394479fa.tar.gz manaverse-15c19f19e86f94bc28cd0f2b80f0c5be394479fa.tar.bz2 manaverse-15c19f19e86f94bc28cd0f2b80f0c5be394479fa.tar.xz manaverse-15c19f19e86f94bc28cd0f2b80f0c5be394479fa.zip |
move virtual member calls from tabbedarea constuctor into postInit.
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/tabbedarea.h | 2 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/debugwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/emotewindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/setup.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/shortcutwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 1 |
9 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 721e0b653..5044d2758 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -68,7 +68,10 @@ TabbedArea::TabbedArea(const Widget2 *const widget) : mArrowButton[0] = new Button(this, "<", "shift_left", this); mArrowButton[1] = new Button(this, ">", "shift_right", this); +} +void TabbedArea::postInit() +{ widgetResized(gcn::Event(nullptr)); } @@ -77,6 +80,7 @@ TabbedArea::~TabbedArea() if (gui) gui->removeDragged(this); + // +++ virtual method calls remove(mTabContainer); remove(mWidgetContainer); diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 6b20d59f4..115d41095 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -55,6 +55,8 @@ class TabbedArea final : public Widget2, ~TabbedArea(); + void postInit(); + /** * Draw the tabbed area. */ diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index de47813ef..f50ea6876 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -222,6 +222,8 @@ ChatWindow::ChatWindow(): mShowAllLang(serverConfig.getValue("showAllLang", 0)), mTmpVisible(false) { + mChatTabs->postInit(); + listen(CHANNEL_ATTRIBUTES); setWindowName("Chat"); diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index cc9003b9a..7fec86369 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -54,6 +54,7 @@ DebugWindow::DebugWindow() : mTargetWidget(new TargetDebugTab(this)), mNetWidget(new NetDebugTab(this)) { + mTabs->postInit(); setWindowName("Debug"); if (setupWindow) setupWindow->registerWindowForReset(this); diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp index c9f5f927c..b2b702e4b 100644 --- a/src/gui/windows/emotewindow.cpp +++ b/src/gui/windows/emotewindow.cpp @@ -57,6 +57,7 @@ EmoteWindow::EmoteWindow() : mScrollFontPage(new ScrollArea(mFontPage, false, "fontpage.xml")), mImageSet(Theme::getImageSetFromThemeXml("emotetabs.xml", "", 17, 16)) { + mTabs->postInit(); mColorPage->postInit(); mFontPage->postInit(); setShowTitle(false); diff --git a/src/gui/windows/setup.cpp b/src/gui/windows/setup.cpp index 1151bb30f..8b7605374 100644 --- a/src/gui/windows/setup.cpp +++ b/src/gui/windows/setup.cpp @@ -64,6 +64,7 @@ Setup::Setup() : mPanel(new TabbedArea(this)), mVersion(new Label(this, FULL_VERSION)) { + mPanel->postInit(); setCloseButton(true); setResizable(true); setStickyButtonLock(true); diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp index b905d982d..189145ca7 100644 --- a/src/gui/windows/shortcutwindow.cpp +++ b/src/gui/windows/shortcutwindow.cpp @@ -113,6 +113,7 @@ ShortcutWindow::ShortcutWindow(const std::string &title, mTabs(new TabbedArea(this)), mPages() { + mTabs->postInit(); setWindowName(title); setTitleBarHeight(getPadding() + getTitlePadding()); setShowTitle(false); diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 61227d275..e379ea425 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -290,6 +290,7 @@ SkillDialog::SkillDialog() : mIncreaseButton(new Button(this, _("Up"), "inc", this)), mDefaultModel(nullptr) { + mTabs->postInit(); setWindowName("Skills"); setCloseButton(true); setResizable(true); diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 49cba826f..3e00ee4ff 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -1307,6 +1307,7 @@ SocialWindow::SocialWindow() : mProcessedPortals(false) { mCreatePopup->postInit(); + mTabs->postInit(); } void SocialWindow::postInit() |