[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-workspace/KDE/4.9] plasma/generic/applets/devicenotifier/package/contents/ui: Delay setting
From:       Jacopo De Simoi <wilderkde () gmail ! com>
Date:       2012-08-22 18:13:15
Message-ID: 20120822181315.69F4BA60C4 () git ! kde ! org
[Download RAW message or body]

Git commit c5cec1406accd774cc862e5d6a9dcb91040ceaaf by Jacopo De Simoi.
Committed on 22/08/2012 at 19:51.
Pushed by jacopods into branch 'KDE/4.9'.

Delay setting passive status

Set passive status after some delay
to allow users to be notified that it is safe to
remove the device before the applet becomes hidden

BUG:304941
FIXED-IN:4.9.1

M  +7    -1    plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml


http://commits.kde.org/kde-workspace/c5cec1406accd774cc862e5d6a9dcb91040ceaaf

diff --git a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml \
b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml index \
                cfadbf6..bf07b10 100644
--- a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
+++ b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
@@ -141,6 +141,11 @@ Item {
         onTriggered: plasmoid.setPopupIconByName("device-notifier");
     }
 
+    Timer {
+        id: passiveTimer
+        interval: 2500
+        onTriggered: plasmoid.status = "PassiveStatus"
+    }
 
     PlasmaComponents.Label {
         id: header
@@ -188,8 +193,9 @@ Item {
         }
         onCountChanged: {
             if (count == 0) {
-                plasmoid.status = "PassiveStatus"
+                passiveTimer.restart()
             } else {
+                passiveTimer.stop()
                 plasmoid.status = "ActiveStatus"
             }
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic