From 8dcb524443a82506b522344f3d4353769f51883c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Oct 2013 17:12:54 +0300 Subject: bit cleanup tabbedarea. --- src/gui/widgets/tabbedarea.cpp | 11 +++-------- src/gui/widgets/tabbedarea.h | 4 +--- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 44b2ea8d8..721e0b653 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -235,7 +235,7 @@ bool TabbedArea::isTabSelected(const Tab *const tab) const return mSelectedTab == tab; } -void TabbedArea::setSelectedTab(const unsigned int index) +void TabbedArea::setSelectedTabByIndex(const unsigned int index) { if (index >= mTabs.size()) return; @@ -292,7 +292,7 @@ void TabbedArea::removeTab(Tab *const tab) } else { - setSelectedTabByPos(tabIndexToBeSelected); + setSelectedTabByIndex(tabIndexToBeSelected); } adjustSize(); @@ -376,11 +376,6 @@ void TabbedArea::setSelectedTabByName(const std::string &name) } } -void TabbedArea::setSelectedTabByPos(const int tab) -{ - setSelectedTab(tab); -} - void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED) { adjustSize(); @@ -631,7 +626,7 @@ void TabbedArea::removeAll(const bool del) { if (getSelectedTabIndex() != -1) { - setSelectedTabByPos(static_cast(0)); + setSelectedTabByIndex(static_cast(0)); } while (getNumberOfTabs() > 0) { diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index dd74405fc..6b20d59f4 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -119,7 +119,7 @@ class TabbedArea final : public Widget2, void setSelectedTab(Tab *const tab); - void setSelectedTab(const unsigned int index); + void setSelectedTabByIndex(const unsigned int index); int getSelectedTabIndex() const A_WARN_UNUSED; @@ -134,8 +134,6 @@ class TabbedArea final : public Widget2, void adjustSize(); - void setSelectedTabByPos(const int tab); - void setSelectedTabByName(const std::string &name); void widgetResized(const gcn::Event &event) override; -- cgit v1.2.3-70-g09d2