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

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:27:24 UTC 2016


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

The following commit has been merged in the master branch:
commit 5da6cbe4c00062e526c0ad4f0f4b47236a3bcae7
Author: Samoilenko Yuri <kinnalru at gmail.com>
Date:   Sun Feb 16 14:33:18 2014 +0400

    FS mount/unmount notify with default action None
    
    You can enable nototfication popups(or any other action) in systemsettings->notifications dialog.
---
 kded/kdeconnect.notifyrc         | 13 +++++++++++++
 kded/plugins/sftp/sftpplugin.cpp | 16 +++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/kded/kdeconnect.notifyrc b/kded/kdeconnect.notifyrc
index 2f726a8..f844bf3 100644
--- a/kded/kdeconnect.notifyrc
+++ b/kded/kdeconnect.notifyrc
@@ -295,3 +295,16 @@ Comment[tr]=Bilinmeyen bir durum oluştu
 Comment[uk]=Сталося щось невідоме програмі
 Comment[x-test]=xxSomething unknown happenedxx
 Action=Popup
+
+[Event/mounted]
+Name=Mounted
+Name[x-test]=xxMountedxx
+Comment=Filesystem mounted
+Action=None
+
+[Event/unmounted]
+Name=Unmounted
+Name[x-test]=xxUnmountedxx
+Comment=Filesystem unmounted
+Action=None
+
diff --git a/kded/plugins/sftp/sftpplugin.cpp b/kded/plugins/sftp/sftpplugin.cpp
index 32c6168..8106c7b 100644
--- a/kded/plugins/sftp/sftpplugin.cpp
+++ b/kded/plugins/sftp/sftpplugin.cpp
@@ -163,7 +163,14 @@ QString SftpPlugin::mountPoint()
 void SftpPlugin::onMounted()
 {
     kDebug(kdeconnect_kded()) << device()->name() << QString("Remote filesystem mounted at %1").arg(mountPoint());
-    
+
+    KNotification* notification = new KNotification("mounted", KNotification::CloseOnTimeout, this);
+    notification->setPixmap(KIconLoader::global()->loadIcon("drive-removable-media", KIconLoader::Desktop));
+    notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
+    notification->setTitle(i18n("Device %1").arg(device()->name()));
+    notification->setText(i18n("Filesystem mounted at %1").arg(mountPoint()));
+    notification->sendEvent();
+
     Q_EMIT mounted();
 }
 
@@ -177,6 +184,13 @@ void SftpPlugin::onUnmounted(bool idleTimeout)
     {
         kDebug(kdeconnect_kded()) << device()->name() << "Remote filesystem unmounted";
     }
+
+    KNotification* notification = new KNotification("unmounted", KNotification::CloseOnTimeout, this);
+    notification->setPixmap(KIconLoader::global()->loadIcon("dialog-ok", KIconLoader::Desktop));
+    notification->setComponentData(KComponentData("kdeconnect", "kdeconnect"));
+    notification->setTitle(i18n("Device %1").arg(device()->name()));
+    notification->setText(i18n("Filesystem unmounted"));
+    notification->sendEvent();
     
     m_d->mounter->deleteLater();
     m_d->mounter = 0;

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list