Commit 43a1a5b0 authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix grouped task visualizations fallback

The indices in the config page were wrong and the last case must of course be
an else to act as an fallback.
BUG: 425032
parent 790f1991
......@@ -80,21 +80,21 @@ Item {
// "You asked for Tooltips but Tooltips are disabled" message
Kirigami.InlineMessage {
Layout.fillWidth: true
visible: groupedTaskVisualization.currentIndex === 0 && !plasmoid.configuration.showToolTips && backend.canPresentWindows()
visible: groupedTaskVisualization.currentIndex === 1 && !plasmoid.configuration.showToolTips && backend.canPresentWindows()
type: Kirigami.MessageType.Warning
text: i18n("Tooltips are disabled, so the 'Present Windows' effect will be displayed instead.")
}
// "You asked for Tooltips but Tooltips are disabled and Present Windows is not available" message
Kirigami.InlineMessage {
Layout.fillWidth: true
visible: groupedTaskVisualization.currentIndex === 0 && !plasmoid.configuration.showToolTips && !backend.canPresentWindows()
visible: groupedTaskVisualization.currentIndex === 1 && !plasmoid.configuration.showToolTips && !backend.canPresentWindows()
type: Kirigami.MessageType.Warning
text: i18n("Tooltips are disabled, and the 'Present Windows' effect is not enabled or otherwise available right now, so a textual list will be displayed instead")
}
// "You asked for Present Windows but Present Windows is not available" message
Kirigami.InlineMessage {
Layout.fillWidth: true
visible: groupedTaskVisualization.currentIndex === 1 && !backend.canPresentWindows()
visible: groupedTaskVisualization.currentIndex === 2 && !backend.canPresentWindows()
type: Kirigami.MessageType.Warning
text: i18n("The 'Present Windows' effect is not enabled or otherwise available right now, so a textual list will be displayed instead.")
}
......
......@@ -153,7 +153,7 @@ function activateTask(index, model, modifiers, task) {
// ===========================================
// Make sure tooltips are actually enabled though; if not, fall through
// to the next option.
if (plasmoid.configuration.showToolTips
else if (plasmoid.configuration.showToolTips
&& plasmoid.configuration.groupedTaskVisualization === 1
) {
task.showToolTip();
......@@ -164,8 +164,8 @@ function activateTask(index, model, modifiers, task) {
// Make sure the Present Windows effect is are actually enabled though;
// if not, fall through to the next option.
else if (backend.canPresentWindows()
&& (plasmoid.configuration.groupedTaskVisualization === 2
|| plasmoid.configuration.groupedTaskVisualization === 1)
&& (plasmoid.configuration.groupedTaskVisualization === 2
|| plasmoid.configuration.groupedTaskVisualization === 1)
) {
task.hideToolTipTemporarily();
tasks.presentWindows(model.WinIdList);
......@@ -175,7 +175,7 @@ function activateTask(index, model, modifiers, task) {
// ========================================
// This is also the final fallback option if Tooltips or Present windows
// are chosen but not actully available
else if (plasmoid.configuration.groupedTaskVisualization === 3) {
else {
if (groupDialog.visible) {
task.hideToolTipTemporarily();
groupDialog.visible = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment