[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:23:05 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=72a2a40

The following commit has been merged in the master branch:
commit 72a2a40b97a4879fdf8080a4d1d2de6c48f16978
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Dec 29 15:38:27 2012 +0000

    Cycle through tabs with next/prev tabs
    
    BUG: 312339
    FIXED-IN: 0.5.3
    Reviewed-by: Martin Klapetek
---
 app/chat-window.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 92c2741..48d2a04 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -400,19 +400,31 @@ void ChatWindow::onInviteToChatTriggered()
 
 void ChatWindow::onNextTabActionTriggered()
 {
+    if (m_tabWidget->count() == 1) {
+        return;
+    }
+    
     int currIndex = m_tabWidget->currentIndex();
 
-    if (currIndex < m_tabWidget->count() && m_tabWidget->count() != 1) {
+    if (currIndex < m_tabWidget->count()-1) {
         m_tabWidget->setCurrentIndex(++currIndex);
+    } else {
+        m_tabWidget->setCurrentIndex(0);
     }
 }
 
 void ChatWindow::onPreviousTabActionTriggered()
 {
+    if (m_tabWidget->count() == 1) {
+        return;
+    }
+    
     int currIndex = m_tabWidget->currentIndex();
 
     if (currIndex > 0) {
         m_tabWidget->setCurrentIndex(--currIndex);
+    } else {
+        m_tabWidget->setCurrentIndex(m_tabWidget->count()-1);
     }
 }
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list