plasmoid:show separator actions only for launchers

work/spdx
Michail Vourlakos 4 years ago
parent 1812f1ed36
commit f771100e87

@ -827,6 +827,7 @@ PlasmaComponents.ContextMenu {
PlasmaComponents.MenuItem {
id: addInternalSeparatorItem
enabled: !visualParent.tailItemIsSeparator || !visualParent.headItemIsSeparator
visible: visualParent.hasShownLauncher
icon: "add"
text: !visualParent.tailItemIsSeparator ? i18n("Add Tail Separator") : i18n("Add Head Separator")

@ -203,7 +203,7 @@ Item {
function inCurrentActivity(launcherUrl) {
var activities = _launchers.tasksModel.launcherActivities(launcherUrl);
if (activities.length === 0 || activities.indexOf(_NULLACTIVITYID_) !== -1 || activities.indexOf(activityInfo.currentActivity) !== -1) {
if (activities.indexOf(_NULLACTIVITYID_) !== -1 || activities.indexOf(activityInfo.currentActivity) !== -1) {
return true;
}

@ -136,6 +136,9 @@ Item {
readonly property bool isHidden: !visible || isForcedHidden
property bool isForcedHidden: false
property bool isLauncher: (IsLauncher === true) ? true : false
property bool hasShownLauncher: (launchers.inCurrentActivity(taskItem.launcherUrl)
|| launchers.inCurrentActivity(taskItem.launcherUrlWithIcon))
&& !root.inActivityChange /*update trigger when changing current activity*/
property bool isMinimized: (IsMinimized === true) ? true : false
property bool isSeparator: false
property bool isStartup: (IsStartup === true) ? true : false
@ -1234,9 +1237,6 @@ Item {
launchers.launcherRemoved.connect(onLauncherChanged);
parabolic.sglClearZoom.connect(sltClearZoom);
var hasShownLauncher = ((tasksModel.launcherPosition(taskItem.launcherUrl) !== -1)
|| (tasksModel.launcherPosition(taskItem.launcherUrlWithIcon) !== -1) );
//startup without launcher
var hideStartup = ((!hasShownLauncher || !taskItem.launchers.inCurrentActivity(taskItem.launcherUrl))
&& taskItem.isStartup);

Loading…
Cancel
Save