[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:14:54 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=6ed91fd

The following commit has been merged in the master branch:
commit 6ed91fd966758a28260ae45ff909dd299cf5e1a9
Author: Stefan Eggers <coloncolonone at gmail.com>
Date:   Fri Feb 8 12:49:56 2013 +0000

    When offline, hide the "add contact status notifier item"
    
    REVIEW: 108846
    BUG: 294478
    FIXED-IN: 0.6
    
    DIGEST: Fixes having a notification "a new contact has added you" even when you are offline.
---
 contact-request-handler.cpp | 11 +++++++++++
 contact-request-handler.h   |  1 +
 telepathy-module.cpp        |  3 ++-
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/contact-request-handler.cpp b/contact-request-handler.cpp
index f40f397..4a2d3ad 100644
--- a/contact-request-handler.cpp
+++ b/contact-request-handler.cpp
@@ -21,6 +21,7 @@
 #include "contact-request-handler.h"
 
 #include <TelepathyQt/Connection>
+#include <TelepathyQt/Contact>
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/PendingOperation>
 #include <TelepathyQt/PendingComposite>
@@ -168,6 +169,8 @@ void ContactRequestHandler::onPresencePublicationRequested(const Tp::Contacts& c
                 m_pendingContacts.insert(contact->id(), contact);
             }
 
+            connect(contact.data(), SIGNAL(invalidated()), this, SLOT(onContactInvalidated()));
+
             updateMenus();
 
             if (!m_notifierItem.isNull()) {
@@ -203,6 +206,14 @@ void ContactRequestHandler::onFinalizeSubscriptionFinished(Tp::PendingOperation
     }
 }
 
+void ContactRequestHandler::onContactInvalidated()
+{
+    Tp::Contact *contact = qobject_cast<Tp::Contact*>(sender());
+
+    m_pendingContacts.remove(contact->id());
+    updateMenus();
+}
+
 void ContactRequestHandler::onContactRequestApproved()
 {
     QString contactId = qobject_cast<KAction*>(sender())->data().toString();
diff --git a/contact-request-handler.h b/contact-request-handler.h
index 43456ee..649bd51 100644
--- a/contact-request-handler.h
+++ b/contact-request-handler.h
@@ -47,6 +47,7 @@ private Q_SLOTS:
     void onAuthorizePresencePublicationFinished(Tp::PendingOperation*);
     void onRemovePresencePublicationFinished(Tp::PendingOperation*);
     void onFinalizeSubscriptionFinished(Tp::PendingOperation*);
+    void onContactInvalidated();
 
 private:
     void updateMenus();
diff --git a/telepathy-module.cpp b/telepathy-module.cpp
index 7ab13b2..b52be1f 100644
--- a/telepathy-module.cpp
+++ b/telepathy-module.cpp
@@ -27,6 +27,7 @@
 #include <TelepathyQt/PendingReady>
 #include <TelepathyQt/Debug>
 
+#include <KTp/contact-factory.h>
 #include <KTp/global-presence.h>
 
 #include "telepathy-mpris.h"
@@ -59,7 +60,7 @@ TelepathyModule::TelepathyModule(QObject* parent, const QList<QVariant>& args)
                                                                                Tp::Features() << Tp::Connection::FeatureCore
                                                                                               << Tp::Connection::FeatureRoster);
 
-    Tp::ContactFactoryPtr contactFactory = Tp::ContactFactory::create(Tp::Features()  << Tp::Contact::FeatureAlias
+    Tp::ContactFactoryPtr contactFactory = KTp::ContactFactory::create(Tp::Features() << Tp::Contact::FeatureAlias
                                                                                       << Tp::Contact::FeatureSimplePresence
                                                                                       << Tp::Contact::FeatureCapabilities);
 

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list