From 54af8ce9c6d972580d2935498e563988450b94f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Feb 2014 16:49:27 +0300 Subject: add actions for select next/previous tab in shortcuts window. --- src/gui/windows/socialwindow.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/gui/windows/socialwindow.cpp') diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 1c6b85153..8b1d0d79c 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -1819,30 +1819,14 @@ void SocialWindow::removePortal(const int x, const int y) void SocialWindow::nextTab() { - if (!mTabs) - return; - - int tab = mTabs->getSelectedTabIndex(); - - tab++; - if (tab == mTabs->getNumberOfTabs()) - tab = 0; - - mTabs->setSelectedTabByIndex(tab); + if (mTabs) + mTabs->selectNextTab(); } void SocialWindow::prevTab() { - if (!mTabs) - return; - - int tab = mTabs->getSelectedTabIndex(); - - if (tab == 0) - tab = mTabs->getNumberOfTabs(); - tab--; - - mTabs->setSelectedTabByIndex(tab); + if (mTabs) + mTabs->selectPrevTab(); } void SocialWindow::updateAttackFilter() -- cgit v1.2.3-60-g2f50