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


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

The following commit has been merged in the master branch:
commit 3c00c56b71e9ef422b26f6c69771fcdca7d8089e
Author: Ian Monroe <imonroe at kde.org>
Date:   Sat Apr 27 13:56:56 2013 -0700

    Now playing shouldn't be disabled on pause
    
    requires a corresponding commit in ktp-contact-list
---
 telepathy-module.cpp |  9 ++++++++-
 telepathy-mpris.cpp  | 12 ++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/telepathy-module.cpp b/telepathy-module.cpp
index c7a01b5..d3f223a 100644
--- a/telepathy-module.cpp
+++ b/telepathy-module.cpp
@@ -45,6 +45,13 @@ K_EXPORT_PLUGIN(TelepathyModuleFactory("ktp_integration_module", "kded_ktp_integ
 
 TelepathyModule::TelepathyModule(QObject* parent, const QList<QVariant>& args)
     : KDEDModule(parent)
+    , m_autoAway( 0 )
+    , m_mpris( 0 )
+    , m_autoConnect( 0 )
+    , m_errorHandler( 0 )
+    , m_globalPresence( 0 )
+    , m_contactHandler( 0 )
+    , m_contactNotify( 0 )
 {
     Q_UNUSED(args)
 
@@ -132,7 +139,7 @@ void TelepathyModule::onRequestedPresenceChanged(const KTp::Presence &presence)
         return;
     }
 
-    //user is manually setting the presnece.
+    //user is manually setting the presence.
     m_lastUserPresence = presence;
 
     //save presence (needed for autoconnect)
diff --git a/telepathy-mpris.cpp b/telepathy-mpris.cpp
index 7a06e6b..4236e39 100644
--- a/telepathy-mpris.cpp
+++ b/telepathy-mpris.cpp
@@ -74,6 +74,7 @@ void TelepathyMPRIS::onPlayerSignalReceived(const QString &interface, const QVar
     if (changedProperties.keys().contains(QLatin1String("PlaybackStatus"))) {
         if (changedProperties.value(QLatin1String("PlaybackStatus")) == QLatin1String("Playing")) {
             m_playbackActive = true;
+            setActive(true);
             setTrackToPresence(m_lastReceivedMetadata);
         } else {
             //if the player is stopped or paused, deactivate and return to normal presence
@@ -205,16 +206,23 @@ void TelepathyMPRIS::onActivateNowPlaying()
 {
     kDebug() << "Plugin activated";
     m_presenceActivated = true;
-    detectPlayers();
+    setEnabled(true);
+    if( !m_knownPlayers.isEmpty() )
+        detectPlayers();
 }
 
 void TelepathyMPRIS::onDeactivateNowPlaying()
 {
-    kDebug() << "Plugin deactivated on CL request";
+    kDebug() << "Plugin deactivated on contact list request";
 
     if (m_presenceActivated) {
         m_presenceActivated = false;
         setActive(false);
+        setEnabled(false);
+        KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
+        KConfigGroup kdedConfig = config->group("KDED");
+        kdedConfig.writeEntry("nowPlayingEnabled", false);
+        kdedConfig.sync();
     }
 }
 

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list