Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/ContextMenu.qml
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 42 | placement: { | |||
---|---|---|---|---|---|
49 | } else { | 49 | } else { | ||
50 | return PlasmaCore.Types.TopPosedLeftAlignedPopup; | 50 | return PlasmaCore.Types.TopPosedLeftAlignedPopup; | ||
51 | } | 51 | } | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | minimumWidth: visualParent.width | 54 | minimumWidth: visualParent.width | ||
55 | 55 | | |||
56 | onStatusChanged: { | 56 | onStatusChanged: { | ||
57 | if (visualParent && get(atm.LauncherUrlWithoutIcon) !== "" && status == PlasmaComponents.DialogStatus.Open) { | 57 | if (visualParent && get(atm.LauncherUrlWithoutIcon) != "" && status == PlasmaComponents.DialogStatus.Open) { | ||
58 | launcherToggleAction.checked = (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) !== -1); | 58 | launcherToggleAction.checked = (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) !== -1); | ||
59 | activitiesDesktopsMenu.refresh(); | 59 | activitiesDesktopsMenu.refresh(); | ||
60 | 60 | | |||
61 | } else if (status == PlasmaComponents.DialogStatus.Closed) { | 61 | } else if (status == PlasmaComponents.DialogStatus.Closed) { | ||
62 | menu.destroy(); | 62 | menu.destroy(); | ||
63 | backend.ungrabMouse(visualParent); | 63 | backend.ungrabMouse(visualParent); | ||
64 | } | 64 | } | ||
65 | } | 65 | } | ||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | 258 | if (menu.visualParent.hasAudioStream) { | |||
271 | menu.addMenuItem(newSeparator(menu), startNewInstanceItem); | 271 | menu.addMenuItem(newSeparator(menu), startNewInstanceItem); | ||
272 | } | 272 | } | ||
273 | } | 273 | } | ||
274 | 274 | | |||
275 | PlasmaComponents.MenuItem { | 275 | PlasmaComponents.MenuItem { | ||
276 | id: startNewInstanceItem | 276 | id: startNewInstanceItem | ||
277 | visible: (visualParent && get(atm.IsLauncher) !== true && get(atm.IsStartup) !== true) | 277 | visible: (visualParent && get(atm.IsLauncher) !== true && get(atm.IsStartup) !== true) | ||
278 | 278 | | |||
279 | enabled: visualParent && get(atm.LauncherUrlWithoutIcon) !== "" | 279 | enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != "" | ||
apol: how about `enabled: visualParent && get(atm.LauncherUrlWithoutIcon)`? | |||||
280 | 280 | | |||
281 | text: i18n("Start New Instance") | 281 | text: i18n("Start New Instance") | ||
282 | icon: "list-add-symbolic" | 282 | icon: "list-add-symbolic" | ||
283 | 283 | | |||
284 | onClicked: tasksModel.requestNewInstance(modelIndex) | 284 | onClicked: tasksModel.requestNewInstance(modelIndex) | ||
285 | } | 285 | } | ||
286 | 286 | | |||
287 | PlasmaComponents.MenuItem { | 287 | PlasmaComponents.MenuItem { | ||
▲ Show 20 Lines • Show All 324 Lines • ▼ Show 20 Line(s) | 611 | PlasmaComponents.MenuItem { | |||
612 | id: launcherToggleAction | 612 | id: launcherToggleAction | ||
613 | 613 | | |||
614 | visible: visualParent | 614 | visible: visualParent | ||
615 | && get(atm.IsLauncher) !== true | 615 | && get(atm.IsLauncher) !== true | ||
616 | && get(atm.IsStartup) !== true | 616 | && get(atm.IsStartup) !== true | ||
617 | && plasmoid.immutability !== PlasmaCore.Types.SystemImmutable | 617 | && plasmoid.immutability !== PlasmaCore.Types.SystemImmutable | ||
618 | && (activityInfo.numberOfRunningActivities < 2) | 618 | && (activityInfo.numberOfRunningActivities < 2) | ||
619 | 619 | | |||
620 | enabled: visualParent && get(atm.LauncherUrlWithoutIcon) !== "" | 620 | enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != "" | ||
621 | 621 | | |||
622 | checkable: true | 622 | checkable: true | ||
623 | 623 | | |||
624 | text: i18n("&Pin to Task Manager") | 624 | text: i18n("&Pin to Task Manager") | ||
625 | icon: "window-pin" | 625 | icon: "window-pin" | ||
626 | 626 | | |||
627 | onClicked: { | 627 | onClicked: { | ||
628 | if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) !== -1) { | 628 | if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) !== -1) { | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
how about enabled: visualParent && get(atm.LauncherUrlWithoutIcon)?