summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 940dad12a..47b02c925 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -241,6 +241,19 @@ void TabbedArea::setSelectedTab(gcn::Tab *tab)
widgetResized(NULL);
}
+void TabbedArea::setSelectedTab(const std::string &name)
+{
+ for (TabContainer::const_iterator itr = mTabs.begin(),
+ itr_end = mTabs.end(); itr != itr_end; ++itr)
+ {
+ if ((*itr).first && (*itr).first->getCaption() == name)
+ {
+ setSelectedTab((*itr).first);
+ return;
+ }
+ }
+}
+
void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
int width = getWidth() - 2 * getFrameSize()