From a0b5f5fee9809670c2c9cf9b1f63ab2be11fd9fd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 24 May 2011 02:54:01 +0300 Subject: Fix leaks in client, skilldialog and playerinfo classes. --- src/gui/widgets/tabbedarea.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/widgets/tabbedarea.cpp') diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index da6dfb64c..6c2ef5b25 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -428,6 +428,20 @@ void TabbedArea::updateArrowEnableState() } } +Tab *TabbedArea::getTabByIndex(int index) const +{ + if (index < 0 || index >= static_cast(mTabs.size())) + return 0; + return static_cast(mTabs[index].first); +} + +gcn::Widget *TabbedArea::getWidgetByIndex(int index) const +{ + if (index < 0 || index >= static_cast(mTabs.size())) + return 0; + return mTabs[index].second; +} + /* void TabbedArea::moveLeft(gcn::Tab *tab) { -- cgit v1.2.3-70-g09d2