Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/main.qml
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Line(s) | 423 | if (task) { | |||
---|---|---|---|---|---|
424 | TaskTools.activateTask(task.modelIndex(), task.m, null, task); | 424 | TaskTools.activateTask(task.modelIndex(), task.m, null, task); | ||
425 | } | 425 | } | ||
426 | } | 426 | } | ||
427 | 427 | | |||
428 | function resetDragSource() { | 428 | function resetDragSource() { | ||
429 | dragSource = null; | 429 | dragSource = null; | ||
430 | } | 430 | } | ||
431 | 431 | | |||
432 | function createContextMenu(rootTask, modelIndex) { | 432 | function createContextMenu(rootTask, modelIndex, args) { | ||
433 | return tasks.contextMenuComponent.createObject(rootTask, | 433 | var initialArgs = args || {} | ||
434 | { visualParent: rootTask, | 434 | initialArgs.visualParent = rootTask; | ||
435 | modelIndex: modelIndex, | 435 | initialArgs.modelIndex = modelIndex; | ||
436 | mpris2Source: mpris2Source | 436 | initialArgs.mpris2Source = mpris2Source; | ||
437 | }); | 437 | initialArgs.backend = backend; | ||
438 | | ||||
439 | return tasks.contextMenuComponent.createObject(rootTask, initialArgs); | ||||
438 | } | 440 | } | ||
439 | 441 | | |||
440 | Component.onCompleted: { | 442 | Component.onCompleted: { | ||
441 | tasks.requestLayout.connect(layoutTimer.restart); | 443 | tasks.requestLayout.connect(layoutTimer.restart); | ||
442 | tasks.requestLayout.connect(iconGeometryTimer.restart); | 444 | tasks.requestLayout.connect(iconGeometryTimer.restart); | ||
443 | tasks.windowsHovered.connect(backend.windowsHovered); | 445 | tasks.windowsHovered.connect(backend.windowsHovered); | ||
444 | tasks.presentWindows.connect(backend.presentWindows); | 446 | tasks.presentWindows.connect(backend.presentWindows); | ||
445 | dragHelper.dropped.connect(resetDragSource); | 447 | dragHelper.dropped.connect(resetDragSource); | ||
446 | } | 448 | } | ||
447 | } | 449 | } |