summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabbedarea.cpp10
-rw-r--r--src/gui/widgets/tabbedarea.h8
2 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index e7dda5067..9702d74f9 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -197,7 +197,7 @@ void TabbedArea::removeTab(gcn::Tab *tab)
}
else
{
- setSelectedTab(tabIndexToBeSelected);
+ setSelectedTabByPos(tabIndexToBeSelected);
}
adjustSize();
@@ -241,7 +241,7 @@ void TabbedArea::setSelectedTab(gcn::Tab *tab)
widgetResized(nullptr);
}
-void TabbedArea::setSelectedTab(const std::string &name)
+void TabbedArea::setSelectedTabByName(const std::string &name)
{
for (TabContainer::const_iterator itr = mTabs.begin(),
itr_end = mTabs.end(); itr != itr_end; ++itr)
@@ -254,6 +254,11 @@ void TabbedArea::setSelectedTab(const std::string &name)
}
}
+void TabbedArea::setSelectedTabByPos(int tab)
+{
+ gcn::TabbedArea::setSelectedTab(tab);
+}
+
void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
int width = getWidth() - 2 * getFrameSize()
@@ -460,7 +465,6 @@ void TabbedArea::removeAll()
if (getSelectedTabIndex() != -1)
{
setSelectedTab(static_cast<unsigned int>(0));
-
}
while (getNumberOfTabs() > 0)
{
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 8e349a4b4..b202dfc9d 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -78,8 +78,6 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
*/
gcn::Widget *getCurrentWidget();
- using gcn::TabbedArea::addTab;
-
/**
* Add a tab. Overridden since it needs to size the widget.
*
@@ -112,11 +110,11 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
int getContainerHeight() const
{ return mWidgetContainer->getHeight(); }
- using gcn::TabbedArea::setSelectedTab;
-
void setSelectedTab(gcn::Tab *tab);
- void setSelectedTab(const std::string &name);
+ void setSelectedTabByPos(int tab);
+
+ void setSelectedTabByName(const std::string &name);
void widgetResized(const gcn::Event &event);