summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-18 16:13:40 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:20 +0300
commit49965a6282c0f8273ba30ddc48d877334c39bd2a (patch)
treebb65a6d5394dda9d87a6694876b18fb586427184 /src/gui/widgets
parent0e316e6ce75b3dca91a824b050410804441f593e (diff)
downloadplus-49965a6282c0f8273ba30ddc48d877334c39bd2a.tar.gz
plus-49965a6282c0f8273ba30ddc48d877334c39bd2a.tar.bz2
plus-49965a6282c0f8273ba30ddc48d877334c39bd2a.tar.xz
plus-49965a6282c0f8273ba30ddc48d877334c39bd2a.zip
move virtual member calls from listbox constuctor into postInit.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/listbox.cpp3
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/popuplist.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp1
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp2
6 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index b6d31c239..ba6b47e22 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -73,7 +73,10 @@ ListBox::ListBox(const Widget2 *const widget,
mRowHeight = font->getHeight() + 2 * mItemPadding;
else
mRowHeight = 13;
+}
+void ListBox::postInit()
+{
adjustSize();
}
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index fa5906077..3f4637e73 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -53,6 +53,8 @@ class ListBox : public gcn::ListBox,
virtual ~ListBox();
+ void postInit();
+
/**
* Draws the list box.
*/
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp
index 5fd38a785..346539348 100644
--- a/src/gui/widgets/popuplist.cpp
+++ b/src/gui/widgets/popuplist.cpp
@@ -42,6 +42,8 @@ PopupList::PopupList(DropDown *const widget,
mPressedIndex(-2),
mModal(modal)
{
+ mListBox->postInit();
+
setFocusable(true);
mListBox->setDistributeMousePressed(true);
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index c29da4a8a..db4b2faae 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -77,6 +77,8 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
mBlueSlider(new Slider(0, 255)),
mBlueText(new TextField(this))
{
+ mColorBox->postInit();
+
// TRANSLATORS: settings colors tab name
setName(_("Colors"));
mColorBox->addSelectionListener(this);
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 35fa4204a..3d4203244 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -107,6 +107,7 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
mKeySetting(false),
mActionDataSize(new int [9])
{
+ mKeyList->postInit();
inputManager.setSetupInput(this);
// TRANSLATORS: setting tab name
setName(_("Input"));
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index bd53763cc..647274125 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -215,6 +215,8 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
// TRANSLATORS: video settings checkbox
mNoFrameCheckBox(new CheckBox(this, _("No frame"), mNoFrame))
{
+ mModeList->postInit();
+
// TRANSLATORS: video settings tab name
setName(_("Video"));