[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:26:47 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=d4632b3

The following commit has been merged in the master branch:
commit d4632b31ccdfabead46687f6cb2d74fe8d016421
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Fri Aug 16 01:01:05 2013 +0200

    Removed KStatusNotifier from telephonyplugin
---
 daemon/plugins/telephony/telephonyplugin.cpp | 47 +---------------------------
 daemon/plugins/telephony/telephonyplugin.h   |  4 ---
 2 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/daemon/plugins/telephony/telephonyplugin.cpp b/daemon/plugins/telephony/telephonyplugin.cpp
index 0a14236..5029d32 100644
--- a/daemon/plugins/telephony/telephonyplugin.cpp
+++ b/daemon/plugins/telephony/telephonyplugin.cpp
@@ -29,17 +29,12 @@ K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_telephony", "kdeconnect_tel
 TelephonyPlugin::TelephonyPlugin(QObject *parent, const QVariantList &args)
     : KdeConnectPlugin(parent, args)
 {
-    trayIcon = new KStatusNotifierItem(parent);
-    trayIcon->setIconByName("pda");
-    trayIcon->setTitle("KdeConnect");
-    connect(trayIcon,SIGNAL(activateRequested(bool,QPoint)),this,SLOT(showPendingNotifications()));
+
 }
 
 KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
 {
 
-    QString id = QString::number(np.id());
-
     QString npType = np.get<QString>("notificationType");
 
     QString title, content, type, icon;
@@ -75,56 +70,16 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
 
     qDebug() << "Creating notification with type:" << type;
 
-
-    if (transient) {
-        trayIcon->setStatus(KStatusNotifierItem::Active);
-
-        KNotification* notification = new KNotification(type);
-        notification->setPixmap(KIcon(icon).pixmap(48, 48));
-        notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
-        notification->setTitle(title);
-        notification->setText(content);
-
-        pendingNotifications.insert(id, notification);
-    }
-
-
     KNotification* notification = new KNotification(type); //, KNotification::Persistent
     notification->setPixmap(KIcon(icon).pixmap(48, 48));
     notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
     notification->setTitle(title);
     notification->setText(content);
-    notification->setProperty("id",id);
-
-    connect(notification,SIGNAL(activated()),this,SLOT(notificationAttended()));
-    connect(notification,SIGNAL(closed()),this,SLOT(notificationAttended()));
 
     return notification;
 
 }
 
-void TelephonyPlugin::notificationAttended()
-{
-    KNotification* normalNotification = (KNotification*)sender();
-    QString id = normalNotification->property("id").toString();
-    if (pendingNotifications.contains(id)) {
-        delete pendingNotifications[id];
-        pendingNotifications.remove(id);
-        if (pendingNotifications.isEmpty()) {
-            trayIcon->setStatus(KStatusNotifierItem::Passive);
-        }
-    }
-}
-
-void TelephonyPlugin::showPendingNotifications()
-{
-    trayIcon->setStatus(KStatusNotifierItem::Passive);
-    Q_FOREACH (KNotification* notification, pendingNotifications) {
-        notification->sendEvent();
-    }
-    pendingNotifications.clear();
-}
-
 bool TelephonyPlugin::receivePackage(const NetworkPackage& np)
 {
 
diff --git a/daemon/plugins/telephony/telephonyplugin.h b/daemon/plugins/telephony/telephonyplugin.h
index d1931e6..6d4db88 100644
--- a/daemon/plugins/telephony/telephonyplugin.h
+++ b/daemon/plugins/telephony/telephonyplugin.h
@@ -37,13 +37,9 @@ public:
 
 public Q_SLOTS:
     virtual bool receivePackage(const NetworkPackage& np);
-    void showPendingNotifications();
-    void notificationAttended();
 
 private:
     KNotification* createNotification(const NetworkPackage& np);
-    KStatusNotifierItem* trayIcon;
-    QHash<QString, KNotification*> pendingNotifications;
 
 };
 

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list