summaryrefslogtreecommitdiff
path: root/src/gui/tabbedcontainer.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 02:02:57 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 02:02:57 +0000
commit81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (patch)
tree585415bbb85c48fc8fb83cd5f54e1cfe8e988ee7 /src/gui/tabbedcontainer.cpp
parent78ab0ec914d3c5a97f162905afb3dede53f8b9ed (diff)
downloadmana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.gz
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.bz2
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.xz
mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.zip
Made the Button ctor accept eventId and action listener.
Diffstat (limited to 'src/gui/tabbedcontainer.cpp')
-rw-r--r--src/gui/tabbedcontainer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/tabbedcontainer.cpp b/src/gui/tabbedcontainer.cpp
index 3d08b390..f19524e1 100644
--- a/src/gui/tabbedcontainer.cpp
+++ b/src/gui/tabbedcontainer.cpp
@@ -49,15 +49,13 @@ TabbedContainer::~TabbedContainer()
void TabbedContainer::addTab(gcn::Widget *widget, const std::string &caption)
{
std::stringstream ss;
-
- Button *tab = new Button(caption);
-
int tabNumber = mTabs.size();
ss << tabNumber;
- tab->setEventId(ss.str());
+
+ Button *tab = new Button(caption, ss.str(), this);
+
tab->setSize(TABWIDTH, TABHEIGHT);
- tab->addActionListener(this);
add(tab, TABWIDTH * tabNumber, 0);
mTabs.push_back(tab);