[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:18:30 UTC 2016


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

The following commit has been merged in the master branch:
commit 5f4afdfebbf60b75cbdb9ffaa9a09a75eb96ee81
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Fri Dec 17 00:20:56 2010 +0000

    Use alternative KComponentData for the notifications that tell it we are
    using application "ktelepathy"
---
 lib/chatwindow.cpp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/chatwindow.cpp b/lib/chatwindow.cpp
index 75b6b58..f649bd3 100644
--- a/lib/chatwindow.cpp
+++ b/lib/chatwindow.cpp
@@ -33,6 +33,9 @@
 
 #include <KColorDialog>
 #include <KNotification>
+#include <KAboutData>
+#include <KComponentData>
+
 
 //#include <Sonnet/Highlighter>
 
@@ -49,9 +52,18 @@ public:
     QAction* showFormatToolbarAction;
     bool isGroupChat;
     QString title;
+
+    KComponentData telepathyComponentData();
 };
 
 
+//FIXME I would like this to be part of the main KDE Telepathy library as a static function somewhere.
+KComponentData ChatWindowPrivate::telepathyComponentData()
+{
+    KAboutData telepathySharedAboutData("ktelepathy",0,ki18n(""),0);
+    return KComponentData(telepathySharedAboutData);
+}
+
 //FIXME once TP::Factory stuff is in, remove all of ChatConnection, replace this with
 //ChatWindow::ChatWindow(ConnectionPtr,TextChannelPtr, QWidget* parent) :...
 ChatWindow::ChatWindow(ChatConnection* chat, QWidget *parent) :
@@ -170,7 +182,7 @@ void ChatWindow::handleIncomingMessage(const Tp::ReceivedMessage &message)
 
 
         //send the correct notification:
-        QString notificationType(0);
+        QString notificationType;
         //choose the correct notification type:
         //options are:
         // kde_telepathy_contact_incoming
@@ -187,7 +199,9 @@ void ChatWindow::handleIncomingMessage(const Tp::ReceivedMessage &message)
             notificationType = QLatin1String("kde_telepathy_contact_incoming");
         }
 
+
         KNotification *notification = new KNotification(notificationType, this);
+        notification->setComponentData(d->telepathyComponentData());
         notification->setTitle(i18n("%1 has sent you a message").arg(message.sender()->alias()));
         notification->setText(message.text());
         //allows per contact notifications
@@ -218,6 +232,7 @@ void ChatWindow::handleMessageSent(const Tp::Message &message, Tp::MessageSendin
 
     //send the notification that a message has been sent
     KNotification *notification = new KNotification(QLatin1String("kde_telepathy_outgoing"), this);
+    notification->setComponentData(d->telepathyComponentData());
     notification->setTitle(i18n("You have sent a message"));
     notification->setText(message.text());
     notification->sendEvent();

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list