[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:24:21 UTC 2016


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

The following commit has been merged in the master branch:
commit 07fdf03fbf3576beef54601ecd595493e8215100
Author: Leon Handreke <leonh at ndreke.de>
Date:   Fri Nov 8 13:18:11 2013 +0100

    Introduce new notification types for messages received in group chats
    
    Removed highlight notification type for 1-to-1 chats. There are now the
    following 6 notification types for received messages:
    * 1-to-1 chat message received (active/inactive window)
    * Group chat highlight received (active/inactive window)
    * Group chat message received (active/inactive window)
    
    BUG: 289348
    REVIEW: 113134
---
 lib/notify-filter.cpp | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/notify-filter.cpp b/lib/notify-filter.cpp
index a5c8ba0..8055f3f 100644
--- a/lib/notify-filter.cpp
+++ b/lib/notify-filter.cpp
@@ -54,16 +54,22 @@ void NotifyFilter::filterMessage(KTp::Message &message, const KTp::MessageContex
 
     // choose correct notification type
     QString notificationType;
-    if(message.property("highlight").toBool()) {
-        notificationType = QLatin1String("kde_telepathy_contact_highlight");
-    } else if(message.type() == Tp::ChannelTextMessageTypeNotice) {
+    if(message.type() == Tp::ChannelTextMessageTypeNotice) {
         notificationType = QLatin1String("kde_telepathy_info_event");
     } else {
-        if (m_widget->isOnTop()) {
-            notificationType = QLatin1String("kde_telepathy_contact_incoming_active_window");
+        if (m_widget->isGroupChat()) {
+            if(message.property("highlight").toBool()) {
+                notificationType = QLatin1String("kde_telepathy_group_chat_highlight");
+            } else {
+                notificationType = QLatin1String("kde_telepathy_group_chat_incoming");
+            }
         } else {
             notificationType = QLatin1String("kde_telepathy_contact_incoming");
         }
+
+        if (m_widget->isOnTop()) {
+            notificationType += QLatin1String("_active_window");
+        }
     }
 
     KNotification *notification = new KNotification(

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list