[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:04:48 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=81ae6fd

The following commit has been merged in the master branch:
commit 81ae6fddbd121b3d2f22d8d0be445ccd631bebe6
Author: Daniele Elmo Domenichelli <daniele.domenichelli at gmail.com>
Date:   Fri May 21 10:09:05 2010 +0000

    Enable add contact request only for online accounts
    
    svn path=/trunk/playground/network/telepathy-contactlist/; revision=1129084
---
 main-widget.cpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/main-widget.cpp b/main-widget.cpp
index b5f2ada..b8c14b8 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -29,6 +29,7 @@
 #include "telepathy-bridge.h"
 
 #include <nco.h>
+#include <telepathy.h>
 #include <informationelement.h>
 
 #include <QtGui/QSortFilterProxyModel>
@@ -56,6 +57,8 @@
 #include <pimo.h>
 #include <nao.h>
 
+#include <TelepathyQt4/Constants>
+
 const int SPACING = 4;
 const int AVATAR_SIZE = 32;
 
@@ -610,9 +613,15 @@ void MainWidget::onAddContactRequest(bool )
     // Iterate over all the IMAccounts/PersonContacts found.
     foreach (const Nepomuk::Query::Result &result, results) {
         Nepomuk::IMAccount foundIMAccount(result.resource());
-
-        foreach (const QString &id, foundIMAccount.imIDs()) {
-            account->addItem(id, foundIMAccount.resourceUri());
+        uint statusType = foundIMAccount.statusTypes().first();
+        if( statusType != Tp::ConnectionPresenceTypeUnset   &&
+            statusType != Tp::ConnectionPresenceTypeOffline &&
+            statusType != Tp::ConnectionPresenceTypeUnknown &&
+            statusType != Tp::ConnectionPresenceTypeError)
+        {
+            foreach (const QString &id, foundIMAccount.imIDs()) {
+                account->addItem(id, foundIMAccount.resourceUri());
+            }
         }
     }
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list