[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:16:08 UTC 2016


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

The following commit has been merged in the master branch:
commit 139dc8da82fe3182f0b1f2da01a54adf13ee5e91
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sun Aug 8 21:22:38 2010 +0000

    Correctly fill in tab text in chat.
    
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1160715
---
 app/mainwindow.cpp | 12 +++++++++++-
 app/mainwindow.h   |  3 +++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index cd86190..ca0b03f 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -49,9 +49,19 @@ void MainWindow::handleChannels(const MethodInvocationContextPtr<> &context,
     ChatConnection* chatConnection = new ChatConnection(this, account, connection, channels);
     ChatWindow* newWindow = new ChatWindow(chatConnection, this);
 
-    addTab(newWindow, "test");
+    connect(newWindow,SIGNAL(titleChanged(QString)),SLOT(updateTabText(QString)));
+    addTab(newWindow, "");
     resize(newWindow->sizeHint());// FUDGE
 
     context->setFinished();
 }
 
+void MainWindow::updateTabText(QString newTitle)
+{
+    //find out which widget made the call, and update the correct tab.
+    QWidget* sender = qobject_cast<QWidget*>(QObject::sender());
+    if (sender) {
+        int tabIndexToChange = indexOf(sender);
+        setTabText(tabIndexToChange, newTitle);
+    }
+}
diff --git a/app/mainwindow.h b/app/mainwindow.h
index e8b364c..cf2e5d6 100644
--- a/app/mainwindow.h
+++ b/app/mainwindow.h
@@ -54,6 +54,9 @@ public:
         return false;
     }
 
+private slots:
+    void updateTabText(QString newTitle);
+
 };
 
 #endif // REALCLIENTHANDLER_H

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list