[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: use
From: Marco Martin <notmart () gmail ! com>
Date: 2012-12-04 12:40:13
Message-ID: 20121204124013.BB0BEA6091 () git ! kde ! org
[Download RAW message or body]
Git commit 983c065810cd8d5159a36b77f048faccab657d20 by Marco Martin.
Committed on 04/12/2012 at 13:38.
Pushed by mart into branch 'master'.
use MouseEventListener.onclicked
M +11 -17 plasma/generic/applets/devicenotifier/package/contents/ui/DeviceItem.qml
http://commits.kde.org/kde-workspace/983c065810cd8d5159a36b77f048faccab657d20
diff --git a/plasma/generic/applets/devicenotifier/package/contents/ui/DeviceItem.qml \
b/plasma/generic/applets/devicenotifier/package/contents/ui/DeviceItem.qml index \
3662092..1d39f2f 100644
--- a/plasma/generic/applets/devicenotifier/package/contents/ui/DeviceItem.qml
+++ b/plasma/generic/applets/devicenotifier/package/contents/ui/DeviceItem.qml
@@ -68,22 +68,15 @@ Item {
}
onClicked: {
notifierDialog.itemFocused();
- if (leftAction.visible
- && mouse.x >= leftAction.x
- && mouse.x <= leftAction.x + leftAction.width
- && mouse.y >= leftAction.y
- && mouse.y <= leftAction.y + leftAction.height) {
- leftActionTriggered();
+
+ var actions = hpSource.data[udi]["actions"];
+ if (actions.length == 1) {
+ service = hpSource.serviceForSource(udi);
+ operation = service.operationDescription("invokeAction");
+ operation.predicate = actions[0]["predicate"];
+ service.startOperationCall(operation);
} else {
- var actions = hpSource.data[udi]["actions"];
- if (actions.length == 1) {
- service = hpSource.serviceForSource(udi);
- operation = service.operationDescription("invokeAction");
- operation.predicate = actions[0]["predicate"];
- service.startOperationCall(operation);
- } else {
- notifierDialog.currentExpanded = expanded ? -1 : index;
- }
+ notifierDialog.currentExpanded = expanded ? -1 : index;
}
}
@@ -199,6 +192,9 @@ Item {
right: parent.right
verticalCenter: deviceIcon.verticalCenter
}
+
+ onClicked: leftActionTriggered()
+
PlasmaCore.IconItem {
id: leftAction
anchors.fill: parent
@@ -212,8 +208,6 @@ Item {
running: visible
visible: deviceItem.state != 0
}
-
- // FIXME onClicked: ...
}
PlasmaCore.ToolTip {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic