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


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

The following commit has been merged in the master branch:
commit 893387346f59e636c98001a56d2ee36062dad23a
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Thu Oct 27 16:30:31 2011 +0200

    Check if the 'Now playing...' plugin is actually enabled and if not, ask the user for enabling
---
 global-presence-chooser.cpp | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 78383c0..a448846 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -37,6 +37,7 @@
 
 #include <QMouseEvent>
 #include <QtGui/QToolTip>
+#include <KMessageBox>
 
 
 //A sneaky class that adds an extra entry to the end of the presence model
@@ -175,6 +176,29 @@ void GlobalPresenceChooser::onCurrentIndexChanged(int index)
         dialog.exec();
         onPresenceChanged(m_globalPresence->currentPresence());
     } else if (index == count()-2) {
+        KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
+        KConfigGroup kdedConfig = config->group("KDED");
+
+        bool pluginEnabled = kdedConfig.readEntry("nowPlayingEnabled", false);
+
+        if (!pluginEnabled) {
+            if (KMessageBox::questionYesNo(this,
+                i18n("This plugin is currently disabled. Do you want to enable it and use as your presence?"),
+                     i18n("Plugin disabled")) == KMessageBox::Yes) {
+
+                    kdedConfig.writeEntry("nowPlayingEnabled", true);
+                    kdedConfig.sync();
+
+                    QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/Telepathy"),
+                                                                      QLatin1String( "org.kde.Telepathy"),
+                                                                      QLatin1String("settingsChange"));
+                                                                      QDBusConnection::sessionBus().send(message);
+            } else {
+                onPresenceChanged(m_globalPresence->currentPresence());
+                return;
+            }
+        }
+
         QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/Telepathy"),
                                                           QLatin1String( "org.kde.Telepathy"),
                                                           QLatin1String("activateNowPlaying"));

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list