Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 70 | case Qt.LeftButton: { | |||
---|---|---|---|---|---|
75 | var job = service.startOperationCall(operation); | 75 | var job = service.startOperationCall(operation); | ||
76 | job.finished.connect(function () { | 76 | job.finished.connect(function () { | ||
77 | if (!job.result) { | 77 | if (!job.result) { | ||
78 | // On error try to invoke the context menu. | 78 | // On error try to invoke the context menu. | ||
79 | // Workaround primarily for apps using libappindicator. | 79 | // Workaround primarily for apps using libappindicator. | ||
80 | openContextMenu(pos); | 80 | openContextMenu(pos); | ||
81 | } | 81 | } | ||
82 | }); | 82 | }); | ||
83 | taskIcon.activated() | ||||
83 | break; | 84 | break; | ||
84 | } | 85 | } | ||
85 | case Qt.RightButton: | 86 | case Qt.RightButton: | ||
86 | openContextMenu(pos); | 87 | openContextMenu(pos); | ||
87 | break; | 88 | break; | ||
88 | 89 | | |||
89 | case Qt.MiddleButton: | 90 | case Qt.MiddleButton: | ||
90 | var service = statusNotifierSource.serviceForSource(DataEngineSource); | 91 | var service = statusNotifierSource.serviceForSource(DataEngineSource); | ||
91 | var operation = service.operationDescription("SecondaryActivate"); | 92 | var operation = service.operationDescription("SecondaryActivate"); | ||
92 | operation.x = pos.x; | 93 | operation.x = pos.x; | ||
93 | 94 | | |||
94 | operation.y = pos.y; | 95 | operation.y = pos.y; | ||
95 | service.startOperationCall(operation); | 96 | service.startOperationCall(operation); | ||
97 | taskIcon.activated() | ||||
96 | break; | 98 | break; | ||
97 | } | 99 | } | ||
98 | } | 100 | } | ||
99 | 101 | | |||
100 | function openContextMenu(pos) { | 102 | function openContextMenu(pos) { | ||
101 | var service = statusNotifierSource.serviceForSource(DataEngineSource); | 103 | var service = statusNotifierSource.serviceForSource(DataEngineSource); | ||
102 | var operation = service.operationDescription("ContextMenu"); | 104 | var operation = service.operationDescription("ContextMenu"); | ||
103 | operation.x = pos.x; | 105 | operation.x = pos.x; | ||
Show All 26 Lines |