[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: Show icon
From:       Jacopo De Simoi <wilderkde () gmail ! com>
Date:       2012-08-25 18:45:36
Message-ID: 20120825184536.1E04AA6094 () git ! kde ! org
[Download RAW message or body]

Git commit 333aabf0b89303d746d73b39c1ab44dcd5556785 by Jacopo De Simoi.
Committed on 25/08/2012 at 20:09.
Pushed by jacopods into branch 'master'.

Show icon tooltips in systray

At last, re-add icon tooltips to the QML version of the
device notifier.
This fixes a long overdue regression introduced in 4.8
We should consider backporting to 4.9. Unfortunately we had to introduce
a new string so I have to think if it is really worth it.

CCMAIL:notmart@gmail.com
BUG:301490

M  +17   -0    plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml


http://commits.kde.org/kde-workspace/333aabf0b89303d746d73b39c1ab44dcd5556785

diff --git a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml \
b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml index \
                bf07b10..ab07d5b 100644
--- a/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
+++ b/plasma/generic/applets/devicenotifier/package/contents/ui/devicenotifier.qml
@@ -66,6 +66,7 @@ Item {
                 if (devicesType == "all" ||
                     (devicesType == "removable" && data[last]["Removable"] == true) \
                ||
                     (devicesType == "nonRemovable" && data[last]["Removable"] == \
false)) { +                    updateTooltip();
                     expandDevice(last)
                     last = "";
                 }
@@ -106,6 +107,7 @@ Item {
         if (notifierDialog.count == 0) {
             plasmoid.status = "PassiveStatus"
         }
+        updateTooltip()
     }
 
     function configChanged() {
@@ -135,6 +137,20 @@ Item {
         popupIconTimer.restart()
     }
 
+    function updateTooltip()
+    {
+        var tooltip = new Object
+        if (notifierDialog.count == 0) {
+            tooltip["image"] = "device-notifier"
+            tooltip["mainText"] = i18n("No devices available")
+        } else if (sdSource.last !="") {
+            tooltip["image"] = hpSource.data[sdSource.last]["icon"]
+            tooltip["mainText"] = i18n("Most recent device")
+            tooltip["subText"] = hpSource.data[sdSource.last]["text"]
+        }
+        plasmoid.popupIconToolTip = tooltip
+    }
+
     Timer {
         id: popupIconTimer
         interval: 2500
@@ -193,6 +209,7 @@ Item {
         }
         onCountChanged: {
             if (count == 0) {
+                updateTooltip();
                 passiveTimer.restart()
             } else {
                 passiveTimer.stop()


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

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