summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-11 00:03:05 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-11 00:51:29 +0300
commit05c3c78e18253d2a9faaebea16ee4ff0474db446 (patch)
treec043bcc95a2fa917cb4aedf0adb04d33e039a694 /src/gui/widgets
parentbb4b31241a30c16eba2506fff89b4057e4a7c6ee (diff)
downloadplus-05c3c78e18253d2a9faaebea16ee4ff0474db446.tar.gz
plus-05c3c78e18253d2a9faaebea16ee4ff0474db446.tar.bz2
plus-05c3c78e18253d2a9faaebea16ee4ff0474db446.tar.xz
plus-05c3c78e18253d2a9faaebea16ee4ff0474db446.zip
Fix compliation under gcc 4.7 snapshot.
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);