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


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

The following commit has been merged in the master branch:
commit 1353e6cea98e78888480903a4f52ab32fffe07da
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue Apr 10 19:57:23 2012 +0100

    Use a better method of checking if the user has changed presence.
    
    Instead of monitoring when the presence changes, we monitor any change in "requestedPresence". If it changes to something not set by us, it must be the user's choice.
    
    REVIEW: 104523
---
 telepathy-module.cpp | 19 ++++++-------------
 telepathy-module.h   |  2 +-
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/telepathy-module.cpp b/telepathy-module.cpp
index 22bd10f..ec27c98 100644
--- a/telepathy-module.cpp
+++ b/telepathy-module.cpp
@@ -91,8 +91,8 @@ void TelepathyModule::onAccountManagerReady(Tp::PendingOperation* op)
 
     m_globalPresence = new KTp::GlobalPresence(this);
     m_globalPresence->setAccountManager(m_accountManager);
-    connect(m_globalPresence, SIGNAL(currentPresenceChanged(KTp::Presence)),
-            this, SLOT(onPresenceChanged(KTp::Presence)));
+    connect(m_globalPresence, SIGNAL(requestedPresenceChanged(KTp::Presence)),
+            this, SLOT(onRequestedPresenceChanged(KTp::Presence)));
 
     m_autoAway = new AutoAway(m_globalPresence, this);
     connect(m_autoAway, SIGNAL(activate(bool)),
@@ -115,20 +115,13 @@ void TelepathyModule::onAccountManagerReady(Tp::PendingOperation* op)
     m_contactHandler = new ContactRequestHandler(m_accountManager, this);
 }
 
-void TelepathyModule::onPresenceChanged(const KTp::Presence &presence)
+void TelepathyModule::onRequestedPresenceChanged(const KTp::Presence &presence)
 {
-    //if it's any plugin - ignore it.
-    Q_FOREACH(TelepathyKDEDModulePlugin* plugin, m_pluginStack) {
-        if (plugin->isActive() && plugin->isEnabled()) {
-            return;
-        }
+    //if it's changed to what we set it to. Ignore it.
+    if (presence == currentPluginPresence()) {
+        return;
     }
 
-    //FUTURE
-    //instead of monitoring presence we monitor requestedPresence
-    // if this changes and presence != currentPluginPresence.. then it means the user has changed it.
-    // this will fix the kded presence bugs
-
     //user is manually setting the presnece.
     m_lastUserPresence = presence;
 
diff --git a/telepathy-module.h b/telepathy-module.h
index b7681d1..02cf37c 100644
--- a/telepathy-module.h
+++ b/telepathy-module.h
@@ -53,7 +53,7 @@ Q_SIGNALS:
 
 private Q_SLOTS:
     void onAccountManagerReady(Tp::PendingOperation*);
-    void onPresenceChanged(const KTp::Presence &presence);
+    void onRequestedPresenceChanged(const KTp::Presence &presence);
     void onPluginActivated(bool);
 
 private:

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list