|
|
|
|
@ -73,22 +73,13 @@ AbstractItem { |
|
|
|
|
if (!job.result) { |
|
|
|
|
// On error try to invoke the context menu. |
|
|
|
|
// Workaround primarily for apps using libappindicator. |
|
|
|
|
contextMenu(mouse); |
|
|
|
|
openContextMenu(pos); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
case Qt.RightButton: |
|
|
|
|
var service = statusNotifierSource.serviceForSource(DataEngineSource); |
|
|
|
|
var operation = service.operationDescription("ContextMenu"); |
|
|
|
|
operation.x = pos.x; |
|
|
|
|
operation.y = pos.y; |
|
|
|
|
|
|
|
|
|
var job = service.startOperationCall(operation); |
|
|
|
|
job.finished.connect(function () { |
|
|
|
|
plasmoid.nativeInterface.showStatusNotifierContextMenu(job, taskIcon); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
openContextMenu(pos); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case Qt.MiddleButton: |
|
|
|
|
@ -102,6 +93,18 @@ AbstractItem { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function openContextMenu(pos) { |
|
|
|
|
var service = statusNotifierSource.serviceForSource(DataEngineSource); |
|
|
|
|
var operation = service.operationDescription("ContextMenu"); |
|
|
|
|
operation.x = pos.x; |
|
|
|
|
operation.y = pos.y; |
|
|
|
|
|
|
|
|
|
var job = service.startOperationCall(operation); |
|
|
|
|
job.finished.connect(function () { |
|
|
|
|
plasmoid.nativeInterface.showStatusNotifierContextMenu(job, taskIcon); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onWheel: { |
|
|
|
|
//don't send activateVertScroll with a delta of 0, some clients seem to break (kmix) |
|
|
|
|
if (wheel.angleDelta.y !== 0) { |
|
|
|
|
|