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

List:       kde-commits
Subject:    [kde-workspace] plasma/generic/applets/devicenotifier/package/contents/ui: Fix warning in
From:       David Edmundson <kde () davidedmundson ! co ! uk>
Date:       2014-02-13 19:13:21
Message-ID: E1WE1ir-00074U-Mt () scm ! kde ! org
[Download RAW message or body]

Git commit 65a0a9da5fe0a3827ba4dbc2a6b91f1d86ac4ae7 by David Edmundson.
Committed on 13/02/2014 at 19:06.
Pushed by davidedmundson into branch 'master'.

Fix warning in device notifier

Handle onExpanded change inside full represntation

M  +16   -14   plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml


http://commits.kde.org/kde-workspace/65a0a9da5fe0a3827ba4dbc2a6b91f1d86ac4ae7

diff --git a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml \
b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml index \
                77e9879..bb475a2 100644
--- a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
+++ b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
@@ -35,24 +35,11 @@ Item {
 
     Plasmoid.switchWidth: units.gridUnit * 10
     Plasmoid.switchHeight: units.gridUnit * 15
-    Plasmoid.onExpandedChanged: {
-        popupEventSlot(plasmoid.expanded);
-    }
-
     Plasmoid.icon: !sdSource.last ? "device-notifier" : \
                sdSource.data[sdSource.last]["Icon"]
     Plasmoid.toolTipMainText: !sdSource.last ? i18n("No devices available") : \
                i18n("Most recent device")
     Plasmoid.toolTipSubText: !sdSource.last ? "" : \
sdSource.data[sdSource.last]["Description"]  
-    function popupEventSlot(popped) {
-        if (!popped) {
-            // reset the property that lets us remember if an item was clicked
-            // (versus only hovered) for autohide purposes
-            notifierDialog.itemClicked = true;
-            expandedDevice = "";
-            notifierDialog.currentExpanded = -1;
-            notifierDialog.currentIndex = -1;
-        }
-    }
+
 
     PlasmaCore.DataSource {
         id: hpSource
@@ -288,6 +275,21 @@ Item {
 
         }
 
+        Plasmoid.onExpandedChanged: {
+            popupEventSlot(plasmoid.expanded);
+        }
+
+        function popupEventSlot(popped) {
+            if (!popped) {
+                // reset the property that lets us remember if an item was clicked
+                // (versus only hovered) for autohide purposes
+                notifierDialog.itemClicked = true;
+                expandedDevice = "";
+                notifierDialog.currentExpanded = -1;
+                notifierDialog.currentIndex = -1;
+            }
+        }
+
         Component {
             id: deviceItem
 


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

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