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


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

The following commit has been merged in the master branch:
commit a539428f0fc2c5c3955beecd0fd32375dafeb43e
Author: Weng Xuetian <wengxt at gmail.com>
Date:   Sat Sep 21 17:51:04 2013 -0400

    set plugin requested presence if there's no error
    
    REVIEW: 112704
---
 telepathy-module.cpp | 20 ++++----------------
 telepathy-module.h   |  1 -
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/telepathy-module.cpp b/telepathy-module.cpp
index 57904b2..19604bb 100644
--- a/telepathy-module.cpp
+++ b/telepathy-module.cpp
@@ -107,9 +107,6 @@ void TelepathyModule::onAccountManagerReady(Tp::PendingOperation* op)
     connect(m_globalPresence, SIGNAL(requestedPresenceChanged(KTp::Presence)),
             this, SLOT(onRequestedPresenceChanged(KTp::Presence)));
 
-    connect(m_globalPresence, SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)),
-            this, SLOT(onConnectionStatusChanged(Tp::ConnectionStatus)));
-
     m_autoAway = new AutoAway(m_globalPresence, this);
     connect(m_autoAway, SIGNAL(activate(bool)),
             this, SLOT(onPluginActivated(bool)));
@@ -169,24 +166,15 @@ void TelepathyModule::onPluginActivated(bool active)
 {
     Q_UNUSED(active);
     //a plugin has changed state, set presence to whatever a plugin thinks it should be (or restore users setting)
-    //only do this if we are connected, otherwise this actually doesn't work since all account are offline
-    if (m_globalPresence->connectionStatus() == Tp::ConnectionStatusConnected) {
-        setPresence(currentPluginPresence());
-    }
-}
-
-void TelepathyModule::onConnectionStatusChanged(const Tp::ConnectionStatus status)
-{
-    if (status == Tp::ConnectionStatusConnected) {
-        setPresence(currentPluginPresence());
-    }
+    setPresence(currentPluginPresence());
 }
 
 void TelepathyModule::setPresence(const KTp::Presence &presence)
 {
     Q_FOREACH(const Tp::AccountPtr &account, m_accountManager->allAccounts()) {
-        //change the state of any online account.
-        if (account->isEnabled() && account->isOnline()) {
+        if (account->isEnabled() &&
+            (account->connectionStatusReason() == Tp::ConnectionStatusReasonNoneSpecified ||
+             account->connectionStatusReason() == Tp::ConnectionStatusReasonRequested)) {
             account->setRequestedPresence(presence);
         }
     }
diff --git a/telepathy-module.h b/telepathy-module.h
index f39e006..ec08c6e 100644
--- a/telepathy-module.h
+++ b/telepathy-module.h
@@ -58,7 +58,6 @@ private Q_SLOTS:
     void onAccountManagerReady(Tp::PendingOperation*);
     void onRequestedPresenceChanged(const KTp::Presence &presence);
     void onPluginActivated(bool);
-    void onConnectionStatusChanged(const Tp::ConnectionStatus status);
 
 private:
     /** Returns the presence we think we should be in. Either from the highest priority plugin, or if none are active, the last user set.*/

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list