diff --git a/plasmoid/package/contents/ui/ToolTipDelegate2.qml b/plasmoid/package/contents/ui/ToolTipDelegate2.qml index 20b90a37e..ad0244130 100644 --- a/plasmoid/package/contents/ui/ToolTipDelegate2.qml +++ b/plasmoid/package/contents/ui/ToolTipDelegate2.qml @@ -58,7 +58,7 @@ PlasmaExtras.ScrollArea { // Needed for generateSubtext() property string displayParent property string genericName - property int virtualDesktopParent + property var virtualDesktopParent property bool isOnAllVirtualDesktopsParent property var activitiesParent // diff --git a/plasmoid/package/contents/ui/ToolTipInstance.qml b/plasmoid/package/contents/ui/ToolTipInstance.qml index cdd8fe0d7..57e603101 100644 --- a/plasmoid/package/contents/ui/ToolTipInstance.qml +++ b/plasmoid/package/contents/ui/ToolTipInstance.qml @@ -494,15 +494,18 @@ Column { var subTextEntries = []; - var vd = isGroup ? virtualDesktop : virtualDesktopParent; - - if (!plasmoid.configuration.showOnlyCurrentDesktop - && virtualDesktopInfo.numberOfDesktops > 1 - && (isGroup ? IsOnAllVirtualDesktops : isOnAllVirtualDesktopsParent) !== true - && vd !== -1 - && vd !== undefined - && virtualDesktopInfo.desktopNames[vd - 1] !== undefined) { - subTextEntries.push(i18n("On %1", virtualDesktopInfo.desktopNames[vd - 1])); + var virtualDesktops = isGroup ? VirtualDesktops : virtualDesktopParent; + var virtualDesktopNameList = []; + + for (var i = 0; i < virtualDesktops.length; ++i) { + virtualDesktopNameList.push(virtualDesktopInfo.desktopNames[virtualDesktops[i] - 1]); + } + + if (!root.showOnlyCurrentDesktop + && virtualDesktopInfo.numberOfDesktops > 1 + && (isGroup ? IsOnAllVirtualDesktops : isOnAllVirtualDesktopsParent) !== true + && virtualDesktops.length > 0) { + subTextEntries.push(i18nc("Comma-separated list of desktops", "On %1", virtualDesktopNameList.join())); } var act = isGroup ? activities : activitiesParent; @@ -523,7 +526,7 @@ Column { if (activityName === "") { continue; } - if (plasmoid.configuration.showOnlyCurrentActivity) { + if (root.showOnlyCurrentActivity) { if (activity !== activityInfo.currentActivity) { activityNames.push(activityName); } @@ -532,7 +535,7 @@ Column { } } - if (plasmoid.configuration.showOnlyCurrentActivity) { + if (root.showOnlyCurrentActivity) { if (activityNames.length > 0) { subTextEntries.push(i18nc("Activities a window is currently on (apart from the current one)", "Also available on %1", activityNames.join(", "))); diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index b74c65f15..a796debe9 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -1046,7 +1046,7 @@ MouseArea{ return model.GenericName; }); toolTipDelegate.virtualDesktopParent = Qt.binding(function() { - return model.VirtualDesktop != undefined ? model.VirtualDesktop : 0; + return (model.VirtualDesktops !== undefined || model.VirtualDesktops.length === 0) ? model.VirtualDesktops : [0]; }); toolTipDelegate.isOnAllVirtualDesktopsParent = Qt.binding(function() { return model.IsOnAllVirtualDesktops == true;