Previews show again Activities and Desktops text

--merge plasma taskmanager commit, D19257
pull/5/head
Michail Vourlakos 6 years ago
parent f0899bd6a8
commit 18d6a0354b

@ -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
//

@ -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(", ")));

@ -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;

Loading…
Cancel
Save