summaryrefslogtreecommitdiff
path: root/src/gui/tabbedcontainer.cpp
diff options
context:
space:
mode:
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);