[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:20:40 UTC 2016


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

The following commit has been merged in the master branch:
commit bb2b9dd77f5695bfdf80f98c138aee044ddeff50
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Mon Jan 16 18:38:42 2012 +0000

    Correctly rejoin chatrooms on reconnect
    
    Reviewed by: Martin Klapetek
    BUG: 288327
---
 app/chat-tab.cpp | 12 +++++++++++-
 app/defines.h    |  7 +++++++
 app/main.cpp     |  4 +++-
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/app/chat-tab.cpp b/app/chat-tab.cpp
index a8f6626..a395263 100644
--- a/app/chat-tab.cpp
+++ b/app/chat-tab.cpp
@@ -21,6 +21,8 @@
 
 #include "chat-widget.h"
 
+#include "defines.h"
+
 #include <KTabWidget>
 #include <KDebug>
 #include <QStackedWidget>
@@ -80,6 +82,14 @@ void ChatTab::onConnectionStatusChanged(Tp::ConnectionStatus status)
 {
     // request a new text channel for the chat
     if (status == Tp::ConnectionStatusConnected) {
-        account()->ensureTextChat(textChannel()->targetId(), QDateTime::currentDateTime(), QLatin1String("org.freedesktop.Telepathy.Client.KTp.TextUi"));
+        if (textChannel()->targetHandleType() == Tp::HandleTypeContact) {
+            account()->ensureTextChat(textChannel()->targetId(),
+                                      QDateTime::currentDateTime(),
+                                      QLatin1String(KTP_TEXTUI_CLIENT_PATH));
+        } else if (textChannel()->targetHandleType() == Tp::HandleTypeRoom) {
+            account()->ensureTextChatroom(textChannel()->targetId(),
+                                                   QDateTime::currentDateTime(),
+                                                   QLatin1String(KTP_TEXTUI_CLIENT_PATH));
+        }
     }
 }
diff --git a/app/defines.h b/app/defines.h
new file mode 100644
index 0000000..2137672
--- /dev/null
+++ b/app/defines.h
@@ -0,0 +1,7 @@
+#ifndef DEFINES_H
+#define DEFINES_H
+
+#define KTP_TEXTUI_CLIENT_NAME "KTp.TextUi"
+#define KTP_TEXTUI_CLIENT_PATH "org.freedesktop.Telepathy.KTp.TextUi"
+
+#endif // DEFINES_H
diff --git a/app/main.cpp b/app/main.cpp
index 5d6e55a..d0a4296 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -19,6 +19,8 @@
 #include "chat-window.h"
 #include "telepathy-chat-ui.h"
 
+#include "defines.h"
+
 #include <TelepathyQt/ClientRegistrar>
 #include <TelepathyQt/AccountFactory>
 #include <TelepathyQt/ConnectionFactory>
@@ -76,7 +78,7 @@ int main(int argc, char *argv[])
 
     Tp::SharedPtr<TelepathyChatUi> app = Tp::SharedPtr<TelepathyChatUi>(new TelepathyChatUi);
     Tp::AbstractClientPtr handler = Tp::AbstractClientPtr(app);
-    registrar->registerClient(handler, QLatin1String("KTp.TextUi"));
+    registrar->registerClient(handler, QLatin1String(KTP_TEXTUI_CLIENT_NAME));
 
     return app->exec();
 }

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list