summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-01-25 22:05:36 +0100
committerReid <reidyaro@gmail.com>2012-01-25 22:05:36 +0100
commit8b612abb42853a22c1a9545e2c9280d154646543 (patch)
treef466167087c2b2de4b8aa9e6d1d1986f72f84147 /src/gui/widgets/tabbedarea.cpp
parenta913dd41df61760de6ece552f941e002251ff54c (diff)
parentd340b5a27a8f3b05d1764da9c114f5f59bd0cd46 (diff)
downloadmanaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.gz
manaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.bz2
manaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.xz
manaverse-8b612abb42853a22c1a9545e2c9280d154646543.zip
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index fb9279343..fc6526a13 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2008-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -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()
@@ -459,8 +464,7 @@ void TabbedArea::removeAll()
{
if (getSelectedTabIndex() != -1)
{
- setSelectedTab(static_cast<unsigned int>(0));
-
+ setSelectedTabByPos(static_cast<unsigned int>(0));
}
while (getNumberOfTabs() > 0)
{