1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-09 00:58:15 +03:00

TASKS:Migrate to multiple Tasks architecture

--First steps in order to support mulitple Tasks
applets in the same dock and panel.
--Step1: migrate values from Containment to Task
applet.
--Step2: deprecate Task applet options that are
found in containment
--Step3: provide multiple dynamic Tasks tabs in
settings
This commit is contained in:
Michail Vourlakos 2020-04-17 17:05:35 +03:00
parent 0da74fb3ce
commit 5fdcef81af
11 changed files with 574 additions and 346 deletions

View File

@ -540,11 +540,16 @@ void ContainmentInterface::updateAppletsTracking()
} }
} else { } else {
PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>(); PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
if (!ai) {
continue;
}
KPluginMetaData meta = applet->kPackage().metadata(); KPluginMetaData meta = applet->kPackage().metadata();
if (meta.pluginId() == "org.kde.latte.plasmoid" && ai) { if (meta.pluginId() == "org.kde.latte.plasmoid") {
m_tasksModel->addTask(ai); m_tasksModel->addTask(ai);
} else if (ai && !m_appletsExpandedConnections.contains(ai)) { } else if (!m_appletsExpandedConnections.contains(ai)) {
m_appletsExpandedConnections[ai] = connect(ai, &PlasmaQuick::AppletQuickItem::expandedChanged, this, &ContainmentInterface::on_appletExpandedChanged); m_appletsExpandedConnections[ai] = connect(ai, &PlasmaQuick::AppletQuickItem::expandedChanged, this, &ContainmentInterface::on_appletExpandedChanged);
connect(ai, &QObject::destroyed, this, [&, ai](){ connect(ai, &QObject::destroyed, this, [&, ai](){

View File

@ -19,6 +19,9 @@
#include "tasksmodel.h" #include "tasksmodel.h"
// Qt
#include <QDebug>
namespace Latte { namespace Latte {
namespace ViewPart { namespace ViewPart {

View File

@ -189,7 +189,148 @@
<choice name="FromAllScreens"/> <choice name="FromAllScreens"/>
</choices> </choices>
<default>0</default> <default>0</default>
</entry> </entry>
<entry name="mouseWheelActions" type="Bool">
<default>true</default>
</entry>
<entry name="scrollAction" type="Enum">
<choices>
<choice name="ScrollNone"/>
<choice name="ScrollDesktops"/>
<choice name="ScrollActivities"/>
<choice name="ScrollTasks"/>
<choice name="ScrollToggleMinimized"/>
</choices>
<default>0</default>
</entry>
<entry name="titleTooltips" type="Bool">
<default>true</default>
</entry>
<!-- Config properties -->
<entry name="configurationSticker" type="Bool">
<default>false</default>
</entry>
<!-- Animations -->
<entry name="animationsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="durationTime" type="Enum">
<choices>
<choice name="None"/>
<choice name="x1"/>
<choice name="x2"/>
<choice name="x3"/>
</choices>
<default>2</default>
</entry>
<!-- Upgrade Flags -->
<!-- _____________ -->
<entry name="alignmentUpgraded" type="Bool">
<default>false</default>
<label>flag to check it deprecated panelPosition was changed to "alignment"</label>
</entry>
<entry name="tasksUpgraded" type="Bool">
<default>false</default>
<label>flag to check if Tasks properties were moved to Tasks plasmoid configuration. Since Latte v0.10 we can have multiple Tasks applets in the same dock</label>
</entry>
<!-- Deprecated Section Containment -->
<!-- ______________________________ -->
<entry name="panelPosition" type="Enum">
<choices>
<choice name="Center"/>
<choice name="Left"/>
<choice name="Right"/>
<choice name="Top"/>
<choice name="Bottom"/>
</choices>
<default>0</default>
<label>DEPRECATED in 0.10 in favour of "alignment"</label>
</entry>
<!-- Deprecated Section Tasks -->
<!-- ________________________ -->
<!-- All Tasks properties are DEPRECATED and scheduled to be removed in v0.11 or v0.12 -->
<!-- This is happening because these values can now be properly provided from each Tasks applet -->
<!-- BE CAREFUL: Until these values are removed totally and their UPGRADE procedures also, -->
<!-- their default values should be updated both <here> and at their plasmoid configuration file counterpart -->
<entry name="launchersGroup" type="Enum">
<choices>
<choice name="Unique"/>
<choice name="Layout"/>
<choice name="Global"/>
</choices>
<default>0</default>
</entry>
<entry name="showWindowActions" type="Bool">
<default>false</default>
</entry>
<entry name="showWindowsOnlyFromLaunchers" type="Bool">
<default>false</default>
<label>show only windows that there is a launcher for them</label>
</entry>
<entry name="groupTasksByDefault" type="Bool">
<default>true</default>
<label>by default group same tasks</label>
</entry>
<entry name="showOnlyCurrentScreen" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentDesktop" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentActivity" type="Bool">
<default>true</default>
</entry>
<entry name="showInfoBadge" type="Bool">
<default>true</default>
</entry>
<entry name="showProgressBadge" type="Bool">
<default>true</default>
</entry>
<entry name="showAudioBadge" type="Bool">
<default>true</default>
</entry>
<entry name="audioBadgeActionsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="infoBadgeProminentColorEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="animationLauncherBouncing" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowInAttention" type="Bool">
<default>true</default>
</entry>
<entry name="animationNewWindowSliding" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowAddedInGroup" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowRemovedFromGroup" type="Bool">
<default>true</default>
</entry>
<entry name="scrollTasksEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="autoScrollTasksEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="manualScrollTasksType" type="Enum">
<choices>
<choice name="Disabled"/>
<choice name="Parallel"/>
<choice name="VerticalHorizontal"/>
</choices>
<default>1</default>
</entry>
<entry name="leftClickAction" type="Enum"> <entry name="leftClickAction" type="Enum">
<choices> <choices>
<choice name="None"/> <choice name="None"/>
@ -235,16 +376,6 @@
</choices> </choices>
<default>0</default> <default>0</default>
</entry> </entry>
<entry name="scrollAction" type="Enum">
<choices>
<choice name="ScrollNone"/>
<choice name="ScrollDesktops"/>
<choice name="ScrollActivities"/>
<choice name="ScrollTasks"/>
<choice name="ScrollToggleMinimized"/>
</choices>
<default>0</default>
</entry>
<entry name="taskScrollAction" type="Enum"> <entry name="taskScrollAction" type="Enum">
<choices> <choices>
<choice name="ScrollNone"/> <choice name="ScrollNone"/>
@ -285,124 +416,5 @@
</choices> </choices>
<default>0</default> <default>0</default>
</entry> </entry>
<!-- Config properties -->
<entry name="configurationSticker" type="Bool">
<default>false</default>
</entry>
<!-- Animations -->
<entry name="animationsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="durationTime" type="Enum">
<choices>
<choice name="None"/>
<choice name="x1"/>
<choice name="x2"/>
<choice name="x3"/>
</choices>
<default>2</default>
</entry>
<entry name="animationLauncherBouncing" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowInAttention" type="Bool">
<default>true</default>
</entry>
<entry name="animationNewWindowSliding" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowAddedInGroup" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowRemovedFromGroup" type="Bool">
<default>true</default>
</entry>
<!-- Tasks properties -->
<entry name="launchersGroup" type="Enum">
<choices>
<choice name="Unique"/>
<choice name="Layout"/>
<choice name="Global"/>
</choices>
<default>0</default>
</entry>
<entry name="showWindowActions" type="Bool">
<default>false</default>
</entry>
<entry name="showWindowsOnlyFromLaunchers" type="Bool">
<default>false</default>
<label>show only windows that there is a launcher for them</label>
</entry>
<entry name="groupTasksByDefault" type="Bool">
<default>true</default>
<label>by default group same tasks</label>
</entry>
<entry name="showOnlyCurrentScreen" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentDesktop" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentActivity" type="Bool">
<default>true</default>
</entry>
<entry name="titleTooltips" type="Bool">
<default>true</default>
</entry>
<entry name="showInfoBadge" type="Bool">
<default>true</default>
</entry>
<entry name="showProgressBadge" type="Bool">
<default>true</default>
</entry>
<entry name="showAudioBadge" type="Bool">
<default>true</default>
</entry>
<entry name="audioBadgeActionsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="infoBadgeProminentColorEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="mouseWheelActions" type="Bool">
<default>true</default>
</entry>
<entry name="scrollTasksEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="autoScrollTasksEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="manualScrollTasksType" type="Enum">
<choices>
<choice name="Disabled"/>
<choice name="Parallel"/>
<choice name="VerticalHorizontal"/>
</choices>
<default>1</default>
</entry>
<entry name="unifiedGlobalShortcuts" type="Bool">
<default>true</default>
<label>Global Shortcuts are combined between applets and tasks</label>
</entry>
<!-- Upgrade Flags -->
<entry name="alignmentUpgraded" type="Bool">
<default>false</default>
<label>flag to check it deprecated panelPosition was changed to "alignment"</label>
</entry>
<!-- Deprecated Section -->
<entry name="panelPosition" type="Enum">
<choices>
<choice name="Center"/>
<choice name="Left"/>
<choice name="Right"/>
<choice name="Top"/>
<choice name="Bottom"/>
</choices>
<default>0</default>
<label>DEPRECATED in 0.10 in favour of "alignment"</label>
</entry>
</group> </group>
</kcfg> </kcfg>

View File

@ -26,8 +26,78 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte import org.kde.latte 0.2 as Latte
Item{ Item{
Component.onCompleted: {
v010_upgrade();
}
function v010_upgrade() { function v010_upgrade() {
//v0.10
root.upgrader_v010_alignment(); root.upgrader_v010_alignment();
if (!plasmoid.configuration.tasksUpgraded) {
v010_tasksMigrateTimer.start();
}
}
Item {
id: v010_tasksUpgrader
Repeater {
id: v010_tasksRepeater
model: latteView && !plasmoid.configuration.tasksUpgraded ? latteView.extendedInterface.tasksModel : null
Item {
id: tasksApplet
Component.onCompleted: {
if (index === 0) {
console.log(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!");
console.log(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!");
console.log(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!");
console.log(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!");
console.log(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!");
console.log(" Migrating Tasks Applet for v0.10...");
tasks.configuration.launchersGroup = plasmoid.configuration.launchersGroup;
tasks.configuration.showWindowActions = plasmoid.configuration.showWindowActions;
tasks.configuration.showWindowsOnlyFromLaunchers = plasmoid.configuration.showWindowsOnlyFromLaunchers;
tasks.configuration.groupTasksByDefault = plasmoid.configuration.groupTasksByDefault;
tasks.configuration.showOnlyCurrentScreen = plasmoid.configuration.showOnlyCurrentScreen;
tasks.configuration.showOnlyCurrentDesktop = plasmoid.configuration.showOnlyCurrentDesktop;
tasks.configuration.showOnlyCurrentActivity = plasmoid.configuration.showOnlyCurrentActivity;
tasks.configuration.showInfoBadge = plasmoid.configuration.showInfoBadge;
tasks.configuration.showProgressBadge = plasmoid.configuration.showProgressBadge;
tasks.configuration.showAudioBadge = plasmoid.configuration.showAudioBadge;
tasks.configuration.audioBadgeActionsEnabled = plasmoid.configuration.audioBadgeActionsEnabled;
tasks.configuration.infoBadgeProminentColorEnabled = plasmoid.configuration.infoBadgeProminentColorEnabled;
tasks.configuration.animationLauncherBouncing = plasmoid.configuration.animationLauncherBouncing;
tasks.configuration.animationWindowInAttention = plasmoid.configuration.animationWindowInAttention;
tasks.configuration.animationNewWindowSliding = plasmoid.configuration.animationNewWindowSliding;
tasks.configuration.animationWindowAddedInGroup = plasmoid.configuration.animationWindowAddedInGroup;
tasks.configuration.animationWindowRemovedFromGroup = plasmoid.configuration.animationWindowRemovedFromGroup;
tasks.configuration.scrollTasksEnabled = plasmoid.configuration.scrollTasksEnabled;
tasks.configuration.autoScrollTasksEnabled = plasmoid.configuration.autoScrollTasksEnabled;
tasks.configuration.manualScrollTasksType = plasmoid.configuration.manualScrollTasksType;
tasks.configuration.leftClickAction = plasmoid.configuration.leftClickAction;
tasks.configuration.middleClickAction = plasmoid.configuration.middleClickAction;
tasks.configuration.hoverAction = plasmoid.configuration.hoverAction;
tasks.configuration.taskScrollAction = plasmoid.configuration.taskScrollAction;
tasks.configuration.modifierClickAction = plasmoid.configuration.modifierClickAction;
tasks.configuration.modifier = plasmoid.configuration.modifier;
tasks.configuration.modifierClick = plasmoid.configuration.modifierClick;
console.log("Migrating Tasks Applet for v0.10 succeeded ...");
plasmoid.configuration.tasksUpgraded = true;
}
}
}
}
}
//! v0.10 Timer to check that first-upgrade process ended
//! when View does not have any Tasks plasmoid
Timer {
id: v010_tasksMigrateTimer
interval: 10000
onTriggered: {
plasmoid.configuration.tasksUpgraded = true;
console.log("Tasks Migration ended....");
}
} }
} }

View File

@ -292,14 +292,7 @@ Item {
} }
} }
property int leftClickAction: plasmoid.configuration.leftClickAction
property int middleClickAction: plasmoid.configuration.middleClickAction
property int hoverAction: plasmoid.configuration.hoverAction
property int modifier: plasmoid.configuration.modifier
property int modifierClickAction: plasmoid.configuration.modifierClickAction
property int modifierClick: plasmoid.configuration.modifierClick
property int scrollAction: plasmoid.configuration.scrollAction property int scrollAction: plasmoid.configuration.scrollAction
property int taskScrollAction: plasmoid.configuration.taskScrollAction
property bool panelOutline: plasmoid.configuration.panelOutline property bool panelOutline: plasmoid.configuration.panelOutline
property int panelEdgeSpacing: Math.max(panelBoxBackground.lengthMargins, 1.5*appShadowSize) property int panelEdgeSpacing: Math.max(panelBoxBackground.lengthMargins, 1.5*appShadowSize)
@ -511,26 +504,9 @@ Item {
property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true
property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0) property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0)
property bool dockIsHidden: latteView ? latteView.visibility.isHidden : true property bool dockIsHidden: latteView ? latteView.visibility.isHidden : true
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool showInfoBadge: plasmoid.configuration.showInfoBadge
property bool showProgressBadge: plasmoid.configuration.showProgressBadge
property bool showAudioBadge: plasmoid.configuration.showAudioBadge
property bool audioBadgeActionsEnabled: plasmoid.configuration.audioBadgeActionsEnabled
property bool infoBadgeProminentColorEnabled: plasmoid.configuration.infoBadgeProminentColorEnabled
property bool scrollTasksEnabled: plasmoid.configuration.scrollTasksEnabled
property bool autoScrollTasksEnabled: plasmoid.configuration.autoScrollTasksEnabled
property int manualScrollTasksType: plasmoid.configuration.manualScrollTasksType
property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity
property bool titleTooltips: plasmoid.configuration.titleTooltips property bool titleTooltips: plasmoid.configuration.titleTooltips
property bool unifiedGlobalShortcuts: plasmoid.configuration.unifiedGlobalShortcuts property bool unifiedGlobalShortcuts: true
readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false
@ -545,16 +521,10 @@ Item {
} }
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1 property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
property int launchersGroup: plasmoid.configuration.launchersGroup
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0 property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
//! Animations //! Animations
property bool animationsEnabled: plasmoid.configuration.animationsEnabled && Latte.WindowSystem.compositingActive property bool animationsEnabled: plasmoid.configuration.animationsEnabled && Latte.WindowSystem.compositingActive
property bool animationLauncherBouncing: animationsEnabled && latteApplet && plasmoid.configuration.animationLauncherBouncing
property bool animationWindowInAttention: animationsEnabled && latteApplet && plasmoid.configuration.animationWindowInAttention
property bool animationNewWindowSliding: animationsEnabled && latteApplet && plasmoid.configuration.animationNewWindowSliding
property bool animationWindowAddedInGroup: animationsEnabled && latteApplet && plasmoid.configuration.animationWindowAddedInGroup
property bool animationWindowRemovedFromGroup: animationsEnabled && latteApplet && plasmoid.configuration.animationWindowRemovedFromGroup
readonly property int shortDuration: Latte.WindowSystem.shortDuration readonly property int shortDuration: Latte.WindowSystem.shortDuration
readonly property int longDuration: Latte.WindowSystem.longDuration readonly property int longDuration: Latte.WindowSystem.longDuration
@ -585,9 +555,9 @@ Item {
return 1; return 1;
} }
if (latteApplet && (animationLauncherBouncing || animationWindowInAttention || animationWindowAddedInGroup)) { /* if (latteApplet && (animationLauncherBouncing || animationWindowInAttention || animationWindowAddedInGroup)) {
return 1.65; return 1.65;
} }*/
return 1; return 1;
} }

View File

@ -6,15 +6,6 @@
<kcfgfile name=""/> <kcfgfile name=""/>
<group name="General"> <group name="General">
<entry name="showOnlyCurrentScreen" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentDesktop" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentActivity" type="Bool">
<default>true</default>
</entry>
<entry name="groupingAppIdBlacklist" type="StringList"> <entry name="groupingAppIdBlacklist" type="StringList">
<default></default> <default></default>
</entry> </entry>
@ -34,15 +25,6 @@
<label>New launchers mechanism. The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label> <label>New launchers mechanism. The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label>
<default></default> <default></default>
</entry> </entry>
<entry name="middleClickAction" type="Enum">
<choices>
<choice name="None"/>
<choice name="Close"/>
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
</choices>
<default>2</default>
</entry>
<entry name="showBarLine" type="Bool"> <entry name="showBarLine" type="Bool">
<default>true</default> <default>true</default>
</entry> </entry>
@ -88,9 +70,49 @@
<entry name="durationTime" type="Int"> <entry name="durationTime" type="Int">
<default>2</default> <default>2</default>
</entry> </entry>
<entry name="previewsDelay" type="Int">
<label>Delay in order to show previews or highlight windows. Values lower than 150ms are ignored because previews do not work correctly</label>
<default>600</default>
</entry>
<entry name="forceMonochromaticIcons" type="Bool">
<default>false</default>
<label>When "true" Latte color palette is used in order to provide monochromatic icons at all times. It is not needed in general and can be used only with specific icon themes</label>
</entry>
<!-- MERGED FROM CONTAINMENT -->
<!-- _______________________ -->
<!-- BE CAREFUL: Until these values are removed from CONTAINMENT totally and their UPGRADE procedures also, -->
<!-- their default values should be updated both <here> and at their containment configuration file counterpart -->
<entry name="launchersGroup" type="Enum">
<choices>
<choice name="Unique"/>
<choice name="Layout"/>
<choice name="Global"/>
</choices>
<default>0</default>
</entry>
<entry name="showWindowActions" type="Bool"> <entry name="showWindowActions" type="Bool">
<default>false</default> <default>false</default>
</entry> </entry>
<entry name="showWindowsOnlyFromLaunchers" type="Bool">
<default>false</default>
<label>show only windows that there is a launcher for them</label>
</entry>
<entry name="groupTasksByDefault" type="Bool">
<default>true</default>
<label>by default group same tasks</label>
</entry>
<entry name="showOnlyCurrentScreen" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentDesktop" type="Bool">
<default>false</default>
</entry>
<entry name="showOnlyCurrentActivity" type="Bool">
<default>true</default>
</entry>
<entry name="showInfoBadge" type="Bool"> <entry name="showInfoBadge" type="Bool">
<default>true</default> <default>true</default>
</entry> </entry>
@ -100,13 +122,127 @@
<entry name="showAudioBadge" type="Bool"> <entry name="showAudioBadge" type="Bool">
<default>true</default> <default>true</default>
</entry> </entry>
<entry name="previewsDelay" type="Int"> <entry name="audioBadgeActionsEnabled" type="Bool">
<label>Delay in order to show previews or highlight windows. Values lower than 150ms are ignored because previews do not work correctly</label> <default>true</default>
<default>600</default>
</entry> </entry>
<entry name="forceMonochromaticIcons" type="Bool"> <entry name="infoBadgeProminentColorEnabled" type="Bool">
<default>false</default> <default>false</default>
<label>When "true" Latte color palette is used in order to provide monochromatic icons at all times. It is not needed in general and can be used only with specific icon themes</label> </entry>
<entry name="animationLauncherBouncing" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowInAttention" type="Bool">
<default>true</default>
</entry>
<entry name="animationNewWindowSliding" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowAddedInGroup" type="Bool">
<default>true</default>
</entry>
<entry name="animationWindowRemovedFromGroup" type="Bool">
<default>true</default>
</entry>
<entry name="scrollTasksEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="autoScrollTasksEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="manualScrollTasksType" type="Enum">
<choices>
<choice name="Disabled"/>
<choice name="Parallel"/>
<choice name="VerticalHorizontal"/>
</choices>
<default>1</default>
</entry>
<entry name="leftClickAction" type="Enum">
<choices>
<choice name="None"/>
<choice name="Close"/>
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
<choice name="CycleThroughTasks"/>
<choice name="ToggleGrouping"/>
<choice name="PresentWindows"/>
<choice name="PreviewWindows"/>
<choice name="HighlightWindows"/>
<choice name="PreviewAndHighlightWindows"/>
</choices>
<default>6</default>
</entry>
<entry name="middleClickAction" type="Enum">
<choices>
<choice name="None"/>
<choice name="Close"/>
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
<choice name="CycleThroughTasks"/>
<choice name="ToggleGrouping"/>
<choice name="PresentWindows"/>
<choice name="PreviewWindows"/>
<choice name="HighlightWindows"/>
<choice name="PreviewAndHighlightWindows"/>
</choices>
<default>2</default>
</entry>
<entry name="hoverAction" type="Enum">
<choices>
<choice name="None"/>
<choice name="Close"/>
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
<choice name="CycleThroughTasks"/>
<choice name="ToggleGrouping"/>
<choice name="PresentWindows"/>
<choice name="PreviewWindows"/>
<choice name="HighlightWindows"/>
<choice name="PreviewAndHighlightWindows"/>
</choices>
<default>0</default>
</entry>
<entry name="taskScrollAction" type="Enum">
<choices>
<choice name="ScrollNone"/>
<choice name="ScrollTasks"/>
<choice name="ScrollToggleMinimized"/>
</choices>
<default>1</default>
</entry>
<entry name="modifierClickAction" type="Enum">
<choices>
<choice name="None"/>
<choice name="Close"/>
<choice name="NewInstance"/>
<choice name="ToggleMinimized"/>
<choice name="CycleThroughTasks"/>
<choice name="ToggleGrouping"/>
<choice name="PresentWindows"/>
<choice name="PreviewWindows"/>
<choice name="HighlightWindows"/>
<choice name="PreviewAndHighlightWindows"/>
</choices>
<default>0</default>
</entry>
<entry name="modifier" type="Enum">
<choices>
<choice name="Shift"/>
<choice name="Control"/>
<choice name="Alt"/>
<choice name="Meta"/>
</choices>
<default>1</default>
</entry>
<entry name="modifierClick" type="Enum">
<choices>
<choice name="LeftClick"/>
<choice name="MiddleClick"/>
<choice name="RightClick"/>
</choices>
<default>0</default>
</entry> </entry>
</group> </group>
</kcfg> </kcfg>

View File

@ -729,9 +729,9 @@ PlasmaComponents.ContextMenu {
if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1) { if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1) {
var launcher = get(atm.LauncherUrl); var launcher = get(atm.LauncherUrl);
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
latteView.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
@ -740,9 +740,9 @@ PlasmaComponents.ContextMenu {
} else { } else {
var launcher = get(atm.LauncherUrl); var launcher = get(atm.LauncherUrl);
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName,
latteView.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
tasksModel.requestAddLauncher(launcher); tasksModel.requestAddLauncher(launcher);
root.launchersUpdatedFor(launcher); root.launchersUpdatedFor(launcher);
@ -789,9 +789,9 @@ PlasmaComponents.ContextMenu {
result.clicked.connect( result.clicked.connect(
function() { function() {
if (result.checked) { if (result.checked) {
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncherToActivity(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncherToActivity(root.viewLayoutName,
latteView.launchersGroup, url, id); root.launchersGroup, url, id);
} else { } else {
if (id !== tasksModel.activity && (activities[0] === "00000000-0000-0000-0000-000000000000")) { if (id !== tasksModel.activity && (activities[0] === "00000000-0000-0000-0000-000000000000")) {
root.launcherForRemoval = url; root.launcherForRemoval = url;
@ -801,9 +801,9 @@ PlasmaComponents.ContextMenu {
root.launchersUpdatedFor(url); root.launchersUpdatedFor(url);
} }
} else { } else {
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName,
latteView.launchersGroup, url, id); root.launchersGroup, url, id);
} else { } else {
if (id === tasksModel.activity) { if (id === tasksModel.activity) {
root.launcherForRemoval = url; root.launcherForRemoval = url;
@ -860,9 +860,9 @@ PlasmaComponents.ContextMenu {
onClicked: { onClicked: {
var launcher = get(atm.LauncherUrlWithoutIcon); var launcher = get(atm.LauncherUrlWithoutIcon);
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
latteView.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
root.launcherForRemoval = launcher root.launcherForRemoval = launcher
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
@ -904,9 +904,9 @@ PlasmaComponents.ContextMenu {
//root.removeLastSeparator(); //root.removeLastSeparator();
var launcher = get(atm.LauncherUrlWithoutIcon); var launcher = get(atm.LauncherUrlWithoutIcon);
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
latteView.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);

View File

@ -154,28 +154,28 @@ Item {
property bool disableLeftSpacer: false property bool disableLeftSpacer: false
property bool disableRightSpacer: false property bool disableRightSpacer: false
property bool dockIsHidden: latteView ? latteView.dockIsHidden : false property bool dockIsHidden: latteView ? latteView.dockIsHidden : false
property bool groupTasksByDefault: latteView ? latteView.groupTasksByDefault: true property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool highlightWindows: latteView ? latteView.hoverAction === Latte.Types.HighlightWindows || latteView.hoverAction === Latte.Types.PreviewAndHighlightWindows : property bool highlightWindows: latteView ? latteView.hoverAction === Latte.Types.HighlightWindows || latteView.hoverAction === Latte.Types.PreviewAndHighlightWindows :
plasmoid.configuration.highlightWindows plasmoid.configuration.highlightWindows
property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode
property bool scrollingEnabled: latteView ? latteView.scrollTasksEnabled : false property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled
property bool autoScrollTasksEnabled: latteView ? (scrollingEnabled && latteView.autoScrollTasksEnabled) : false property bool autoScrollTasksEnabled: scrollingEnabled && plasmoid.configuration.autoScrollTasksEnabled
property bool manualScrollTasksEnabled: latteView ? (scrollingEnabled && manualScrollTasksType !== Latte.Types.ManualScrollDisabled) : Latte.Types.ManualScrollDisabled property bool manualScrollTasksEnabled: scrollingEnabled && manualScrollTasksType !== Latte.Types.ManualScrollDisabled
property int manualScrollTasksType: latteView ? latteView.manualScrollTasksType : 0 property int manualScrollTasksType: plasmoid.configuration.manualScrollTasksType
property bool showInfoBadge: latteView ? latteView.showInfoBadge : plasmoid.configuration.showInfoBadge property bool showInfoBadge: plasmoid.configuration.showInfoBadge
property bool showProgressBadge: latteView ? latteView.showProgressBadge : plasmoid.configuration.showInfoBadge property bool showProgressBadge: plasmoid.configuration.showInfoBadge
property bool showAudioBadge: latteView ? latteView.showAudioBadge : plasmoid.configuration.showAudioBadge property bool showAudioBadge: plasmoid.configuration.showAudioBadge
property bool infoBadgeProminentColorEnabled: latteView ? latteView.infoBadgeProminentColorEnabled : false property bool infoBadgeProminentColorEnabled: plasmoid.configuration.infoBadgeProminentColorEnabled
property bool audioBadgeActionsEnabled: latteView ? latteView.audioBadgeActionsEnabled : true property bool audioBadgeActionsEnabled: plasmoid.configuration.audioBadgeActionsEnabled
property bool showOnlyCurrentScreen: latteView ? latteView.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: latteView ? latteView.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
property bool showOnlyCurrentActivity: latteView ? latteView.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity
property bool showPreviews: latteView ? latteView.hoverAction === Latte.Types.PreviewWindows || latteView.hoverAction === Latte.Types.PreviewAndHighlightWindows : property bool showPreviews: latteView ? latteView.hoverAction === Latte.Types.PreviewWindows || latteView.hoverAction === Latte.Types.PreviewAndHighlightWindows :
plasmoid.configuration.showToolTips plasmoid.configuration.showToolTips
property bool showWindowActions: latteView ? latteView.showWindowActions : plasmoid.configuration.showWindowActions property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: latteView ? latteView.showWindowsOnlyFromLaunchers : false property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
property bool titleTooltips: latteView ? latteView.titleTooltips : false property bool titleTooltips: latteView ? latteView.titleTooltips : false
property alias windowPreviewIsShown: windowsPreviewDlg.visible property alias windowPreviewIsShown: windowsPreviewDlg.visible
@ -185,14 +185,15 @@ Item {
property int dockHoveredIndex : latteView ? latteView.hoveredIndex : -1 property int dockHoveredIndex : latteView ? latteView.hoveredIndex : -1
property int iconSize: latteView ? latteView.iconSize : Math.max(plasmoid.configuration.iconSize, 16) property int iconSize: latteView ? latteView.iconSize : Math.max(plasmoid.configuration.iconSize, 16)
property int launchersGroup: plasmoid.configuration.launchersGroup
property int maxIconSize: latteView ? latteView.maxIconSize : iconSize property int maxIconSize: latteView ? latteView.maxIconSize : iconSize
property int leftClickAction: latteView ? latteView.leftClickAction : Latte.Types.PresentWindows property int leftClickAction: plasmoid.configuration.leftClickAction
property int middleClickAction: latteView ? latteView.middleClickAction : plasmoid.configuration.middleClickAction property int middleClickAction: plasmoid.configuration.middleClickAction
property int hoverAction: latteView ? latteView.hoverAction : Latte.Types.NoneAction property int hoverAction: plasmoid.configuration.hoverAction
property int modifier: latteView ? latteView.modifier : -1 property int modifier: plasmoid.configuration.modifier
property int modifierClickAction: latteView ? latteView.modifierClickAction : -1 property int modifierClickAction: plasmoid.configuration.modifierClickAction
property int modifierClick: latteView ? latteView.modifierClick : -1 property int modifierClick: plasmoid.configuration.modifierClick
property int modifierQt:{ property int modifierQt:{
if (modifier === Latte.Types.Shift) if (modifier === Latte.Types.Shift)
return Qt.ShiftModifier; return Qt.ShiftModifier;
@ -204,7 +205,7 @@ Item {
return Qt.MetaModifier; return Qt.MetaModifier;
else return -1; else return -1;
} }
property int taskScrollAction: latteView ? latteView.taskScrollAction : Latte.Types.ScrollNone property int taskScrollAction: plasmoid.configuration.taskScrollAction
property int thickMargin: latteView ? latteView.thickMargin : 0.16*iconSize property int thickMargin: latteView ? latteView.thickMargin : 0.16*iconSize
property int thickMargins: 2 * thickMargin property int thickMargins: 2 * thickMargin
@ -222,11 +223,11 @@ Item {
//! Animations //! Animations
property bool animationsEnabled: latteView ? latteView.animationsEnabled : durationTime !== 0 property bool animationsEnabled: latteView ? latteView.animationsEnabled : durationTime !== 0
property bool animationLauncherBouncing: latteView ? latteView.animationLauncherBouncing : durationTime !== 0 property bool animationLauncherBouncing: animationsEnabled && plasmoid.configuration.animationLauncherBouncing
property bool animationWindowInAttention: latteView ? latteView.animationWindowInAttention : durationTime !== 0 property bool animationWindowInAttention: animationsEnabled && plasmoid.configuration.animationWindowInAttention
property bool animationNewWindowSliding: latteView ? latteView.animationNewWindowSliding : durationTime !== 0 property bool animationNewWindowSliding: animationsEnabled && plasmoid.configuration.animationNewWindowSliding
property bool animationWindowAddedInGroup: latteView ? latteView.animationWindowAddedInGroup : durationTime !== 0 property bool animationWindowAddedInGroup: animationsEnabled && plasmoid.configuration.animationWindowAddedInGroup
property bool animationWindowRemovedFromGroup: latteView ? latteView.animationWindowRemovedFromGroup : durationTime !== 0 property bool animationWindowRemovedFromGroup: animationsEnabled && plasmoid.configuration.animationWindowRemovedFromGroup
property real animationsZoomFactor: latteView ? latteView.animationsZoomFactor : durationTime === 0 ? 1 : 1.65 property real animationsZoomFactor: latteView ? latteView.animationsZoomFactor : durationTime === 0 ? 1 : 1.65
property real maxZoomFactor: latteView ? latteView.maxZoomFactor : Math.max(zoomFactor, animationsZoomFactor) property real maxZoomFactor: latteView ? latteView.maxZoomFactor : Math.max(zoomFactor, animationsZoomFactor)
@ -311,11 +312,21 @@ Item {
if (latteView) { if (latteView) {
plasmoid.action("configure").visible = false; plasmoid.action("configure").visible = false;
plasmoid.configuration.isInLatteDock = true; plasmoid.configuration.isInLatteDock = true;
if (root.launchersGroup === Latte.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Types.GlobalLaunchers) {
tasksModel.updateLaunchersList();
}
} else { } else {
plasmoid.configuration.isInLatteDock = false; plasmoid.configuration.isInLatteDock = false;
} }
} }
onLaunchersGroupChanged:{
if(latteView) {
tasksModel.updateLaunchersList();
}
}
Connections { Connections {
target: plasmoid target: plasmoid
@ -340,12 +351,6 @@ Item {
windowsPreviewDlg.hide("3.3"); windowsPreviewDlg.hide("3.3");
} }
} }
onLaunchersGroupChanged:{
if( latteView && latteView.editMode) {
tasksModel.updateLaunchersList();
}
}
} }
@ -467,12 +472,12 @@ Item {
if (viewLayout) { if (viewLayout) {
if (latteView && latteView.layoutsManager if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings && latteView.viewLayout && latteView.universalSettings
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (root.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || root.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (root.launchersGroup === Latte.Types.LayoutLaunchers) {
launchersList = latteView.viewLayout.launchers; launchersList = latteView.viewLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (root.launchersGroup === Latte.Types.GlobalLaunchers) {
launchersList = latteView.universalSettings.launchers; launchersList = latteView.universalSettings.launchers;
} }
} }
@ -694,15 +699,18 @@ Item {
property bool anyTaskDemandsAttentionInValidTime: false property bool anyTaskDemandsAttentionInValidTime: false
function updateLaunchersList(){ function updateLaunchersList(){
if (latteView.universalSettings if (latteView
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (root.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || root.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (root.launchersGroup === Latte.Types.LayoutLaunchers) {
console.log("Tasks: Applying LAYOUT Launchers List...");
tasksModel.launcherList = latteView.viewLayout.launchers; tasksModel.launcherList = latteView.viewLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (root.launchersGroup === Latte.Types.GlobalLaunchers) {
console.log("Tasks: Applying GLOBAL Launchers List...");
tasksModel.launcherList = latteView.universalSettings.launchers; tasksModel.launcherList = latteView.universalSettings.launchers;
} }
} else { } else {
console.log("Tasks: Applying UNIQUE Launchers List...");
tasksModel.launcherList = plasmoid.configuration.launchers59; tasksModel.launcherList = plasmoid.configuration.launchers59;
} }
} }
@ -726,20 +734,20 @@ Item {
if (viewLayout) { if (viewLayout) {
if (latteView && latteView.layoutsManager if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings && latteView.viewLayout && latteView.universalSettings
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (root.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || root.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (root.launchersGroup === Latte.Types.LayoutLaunchers) {
latteView.viewLayout.launchers = launcherList; latteView.viewLayout.launchers = launcherList;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (root.launchersGroup === Latte.Types.GlobalLaunchers) {
latteView.universalSettings.launchers = launcherList; latteView.universalSettings.launchers = launcherList;
} }
if (inDraggingPhase) { if (inDraggingPhase) {
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName, latteView.layoutsManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName,
plasmoid.id, plasmoid.id,
latteView.launchersGroup, root.launchersGroup,
currentLauncherList()); currentLauncherList());
} }
} }
@ -776,12 +784,12 @@ Item {
ActivitiesTools.importLaunchersToNewArchitecture(); ActivitiesTools.importLaunchersToNewArchitecture();
if (viewLayout && latteView.universalSettings if (viewLayout && latteView.universalSettings
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (root.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || root.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (root.launchersGroup === Latte.Types.LayoutLaunchers) {
launcherList = latteView.viewLayout.launchers; launcherList = latteView.viewLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (root.launchersGroup === Latte.Types.GlobalLaunchers) {
launcherList = latteView.universalSettings.launchers; launcherList = latteView.universalSettings.launchers;
} }
} else { } else {
@ -1192,9 +1200,9 @@ Item {
onUrlsDropped: { onUrlsDropped: {
//! inform synced docks for new dropped launchers //! inform synced docks for new dropped launchers
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers && onlyLaunchersInList(urls)) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers && onlyLaunchersInList(urls)) {
latteView.layoutsManager.launchersSignals.urlsDropped(root.viewLayoutName, latteView.layoutsManager.launchersSignals.urlsDropped(root.viewLayoutName,
latteView.launchersGroup, urls); root.launchersGroup, urls);
return; return;
} }
@ -1550,9 +1558,9 @@ Item {
if (separatorName !== "") { if (separatorName !== "") {
tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos)); tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName,
latteView.launchersGroup, separatorName); root.launchersGroup, separatorName);
} else { } else {
tasksModel.requestAddLauncher(separatorName); tasksModel.requestAddLauncher(separatorName);
} }
@ -1647,7 +1655,7 @@ Item {
//! BEGIN ::: external launchers signals in order to update the tasks model //! BEGIN ::: external launchers signals in order to update the tasks model
function extSignalAddLauncher(group, launcher) { function extSignalAddLauncher(group, launcher) {
if (group === latteView.launchersGroup) { if (group === root.launchersGroup) {
tasksModel.requestAddLauncher(launcher); tasksModel.requestAddLauncher(launcher);
launchersUpdatedFor(launcher); launchersUpdatedFor(launcher);
tasksModel.syncLaunchers(); tasksModel.syncLaunchers();
@ -1655,7 +1663,7 @@ Item {
} }
function extSignalRemoveLauncher(group, launcher) { function extSignalRemoveLauncher(group, launcher) {
if (group === latteView.launchersGroup) { if (group === root.launchersGroup) {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
tasksModel.requestRemoveLauncher(launcher); tasksModel.requestRemoveLauncher(launcher);
launchersUpdatedFor(launcher); launchersUpdatedFor(launcher);
@ -1664,7 +1672,7 @@ Item {
} }
function extSignalAddLauncherToActivity(group, launcher, activity) { function extSignalAddLauncherToActivity(group, launcher, activity) {
if (group === latteView.launchersGroup) { if (group === root.launchersGroup) {
var launcherActivities = tasksModel.launcherActivities(launcher); var launcherActivities = tasksModel.launcherActivities(launcher);
if (activity !== tasksModel.activity && (launcherActivities[0] === "00000000-0000-0000-0000-000000000000")) { if (activity !== tasksModel.activity && (launcherActivities[0] === "00000000-0000-0000-0000-000000000000")) {
@ -1678,7 +1686,7 @@ Item {
} }
function extSignalRemoveLauncherFromActivity(group, launcher, activity) { function extSignalRemoveLauncherFromActivity(group, launcher, activity) {
if (group === latteView.launchersGroup) { if (group === root.launchersGroup) {
if (activity === tasksModel.activity) { if (activity === tasksModel.activity) {
root.launcherForRemoval = launcher; root.launcherForRemoval = launcher;
} }
@ -1690,13 +1698,13 @@ Item {
} }
function extSignalUrlsDropped(group, urls) { function extSignalUrlsDropped(group, urls) {
if (group === latteView.launchersGroup) { if (group === root.launchersGroup) {
mouseHandler.urlsDroppedOnArea(urls); mouseHandler.urlsDroppedOnArea(urls);
} }
} }
function extSignalMoveTask(group, from, to) { function extSignalMoveTask(group, from, to) {
if (group === latteView.launchersGroup && !root.dragSource) { if (group === root.launchersGroup && !root.dragSource) {
tasksModel.move(from, to); tasksModel.move(from, to);
parabolicManager.updateTasksEdgesIndexes(); parabolicManager.updateTasksEdgesIndexes();
root.separatorsUpdated(); root.separatorsUpdated();
@ -1705,7 +1713,7 @@ Item {
} }
function extSignalValidateLaunchersOrder(group, launchers) { function extSignalValidateLaunchersOrder(group, launchers) {
if (group === latteView.launchersGroup && !root.dragSource) { if (group === root.launchersGroup && !root.dragSource) {
launchersOrderValidatorTimer.stop(); launchersOrderValidatorTimer.stop();
launchersOrderValidatorTimer.launchers = launchers; launchersOrderValidatorTimer.launchers = launchers;
launchersOrderValidatorTimer.start(); launchersOrderValidatorTimer.start();
@ -1723,8 +1731,8 @@ Item {
if (separatorName !== "") { if (separatorName !== "") {
tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos)); tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(latteView.launchersGroup, separatorName); latteView.layoutsManager.launchersSignals.addLauncher(root.launchersGroup, separatorName);
} else { } else {
tasksModel.requestAddLauncher(separatorName); tasksModel.requestAddLauncher(separatorName);
} }
@ -1735,9 +1743,9 @@ Item {
var separatorName = parabolicManager.lastPresentSeparatorName(); var separatorName = parabolicManager.lastPresentSeparatorName();
if (separatorName !== "") { if (separatorName !== "") {
if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) { if (latteView && root.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
latteView.launchersGroup, separatorName); root.launchersGroup, separatorName);
} else { } else {
root.launcherForRemoval = separatorName; root.launcherForRemoval = separatorName;
tasksModel.requestRemoveLauncher(separatorName); tasksModel.requestRemoveLauncher(separatorName);

View File

@ -165,12 +165,7 @@ Item {
var pos = root.dragSource.itemIndex; var pos = root.dragSource.itemIndex;
tasksModel.move(pos, insertAt); tasksModel.move(pos, insertAt);
//! disable syncing for moving launchers action in favor of validatorOrder launchersSignal
/* if (latteView && latteView.launchersGroup >= Latte.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.moveTask(root.viewLayoutName,
plasmoid.id,
latteView.launchersGroup, pos, insertAt);
}*/
root.separatorsUpdated(); root.separatorsUpdated();
ignoreItemTimer.restart(); ignoreItemTimer.restart();
} }

View File

@ -424,12 +424,13 @@ FocusScope {
visible: dialog.highLevel visible: dialog.highLevel
} }
Repeater { Repeater {
id: tasksTabButtonRepeater
model: latteView.extendedInterface.tasksModel model: latteView.extendedInterface.tasksModel
PlasmaComponents.TabButton { PlasmaComponents.TabButton {
text: index >= 1 ? i18nc("tasks header and index","Tasks <%0>").arg(index+1) : i18n("Tasks") text: index >= 1 ? i18nc("tasks header and index","Tasks <%0>").arg(index+1) : i18n("Tasks")
tab: tasksRepeater.count > 0 ? tasksRepeater.itemAt(index) : null tab: tasksRepeater.itemAt(index)
} }
} }
} }
@ -478,15 +479,43 @@ FocusScope {
Pages.EffectsConfig { Pages.EffectsConfig {
id: effectsPage id: effectsPage
} }
}
}
Repeater { Repeater {
id: tasksRepeater id: tasksRepeater
model: latteView.extendedInterface.tasksModel //! needs to be out of TabGroup otherwise the Repeater is consider as TabGroup direct children
//! and thus only the first Tasks tab is shown
model: latteView.extendedInterface.tasksModel
Pages.TasksConfig { //! Reparent TasksPages when all of them are loaded
//! this way we avoid warnings from ::stackAfter
//! After startup any new TasksPages can be added directly
property bool isReady: false
property int pages: 0
Pages.TasksConfig {
id: tasksPage
Component.onCompleted: {
if (tasksRepeater.isReady) {
parent = tabGroup;
} else {
tasksRepeater.pages = tasksRepeater.pages + 1;
} }
} }
} }
onPagesChanged: {
if (pages === latteView.extendedInterface.tasksModel.rowCount()) {
//! Reparent TasksPages when all of them are loaded
//! this way we avoid warnings from ::stackAfter
for(var i=0; i<pages; ++i) {
itemAt(i).parent = tabGroup;
}
isReady = true;
}
}
} }
} }

View File

@ -34,7 +34,7 @@ PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2 Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2 Layout.maximumHeight: content.height + units.smallSpacing * 2
property bool disableAllWindowsFunctionality: plasmoid.configuration.showWindowsOnlyFromLaunchers property bool disableAllWindowsFunctionality: tasks.configuration.showWindowsOnlyFromLaunchers
&& plasmoid.configuration.activeIndicator === Latte.Types.NoneIndicator && plasmoid.configuration.activeIndicator === Latte.Types.NoneIndicator
ColumnLayout { ColumnLayout {
@ -63,57 +63,57 @@ PlasmaComponents.Page {
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Notifications from tasks") text: i18n("Notifications from tasks")
checked: plasmoid.configuration.showInfoBadge checked: tasks.configuration.showInfoBadge
tooltip: i18n("Show unread messages or notifications from tasks") tooltip: i18n("Show unread messages or notifications from tasks")
onClicked: { onClicked: {
plasmoid.configuration.showInfoBadge = checked tasks.configuration.showInfoBadge = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Progress information for tasks") text: i18n("Progress information for tasks")
checked: plasmoid.configuration.showProgressBadge checked: tasks.configuration.showProgressBadge
tooltip: i18n("Show a progress animation for tasks e.g. when copying files with Dolphin") tooltip: i18n("Show a progress animation for tasks e.g. when copying files with Dolphin")
onClicked: { onClicked: {
plasmoid.configuration.showProgressBadge = checked tasks.configuration.showProgressBadge = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Audio playing from tasks") text: i18n("Audio playing from tasks")
checked: plasmoid.configuration.showAudioBadge checked: tasks.configuration.showAudioBadge
tooltip: i18n("Show audio playing from tasks") tooltip: i18n("Show audio playing from tasks")
onClicked: { onClicked: {
plasmoid.configuration.showAudioBadge = checked tasks.configuration.showAudioBadge = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Prominent color for notification badge") text: i18n("Prominent color for notification badge")
checked: plasmoid.configuration.infoBadgeProminentColorEnabled checked: tasks.configuration.infoBadgeProminentColorEnabled
enabled: plasmoid.configuration.showInfoBadge enabled: tasks.configuration.showInfoBadge
tooltip: i18n("Notification badge uses a more prominent background which is usually red") tooltip: i18n("Notification badge uses a more prominent background which is usually red")
onClicked: { onClicked: {
plasmoid.configuration.infoBadgeProminentColorEnabled = !plasmoid.configuration.infoBadgeProminentColorEnabled; tasks.configuration.infoBadgeProminentColorEnabled = !tasks.configuration.infoBadgeProminentColorEnabled;
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Change volume when scrolling audio badge") text: i18n("Change volume when scrolling audio badge")
checked: plasmoid.configuration.audioBadgeActionsEnabled checked: tasks.configuration.audioBadgeActionsEnabled
enabled: plasmoid.configuration.showAudioBadge enabled: tasks.configuration.showAudioBadge
tooltip: i18n("The user is able to mute/unmute with click or change the volume with mouse wheel") tooltip: i18n("The user is able to mute/unmute with click or change the volume with mouse wheel")
onClicked: { onClicked: {
plasmoid.configuration.audioBadgeActionsEnabled = checked tasks.configuration.audioBadgeActionsEnabled = checked
} }
} }
} }
@ -148,12 +148,12 @@ PlasmaComponents.Page {
id: windowActionsChk id: windowActionsChk
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Window actions in the context menu") text: i18n("Window actions in the context menu")
checked: plasmoid.configuration.showWindowActions checked: tasks.configuration.showWindowActions
visible: dialog.highLevel visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality enabled: !disableAllWindowsFunctionality
onClicked: { onClicked: {
plasmoid.configuration.showWindowActions = checked tasks.configuration.showWindowActions = checked
} }
} }
@ -190,53 +190,53 @@ PlasmaComponents.Page {
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current screen") text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen checked: tasks.configuration.showOnlyCurrentScreen
onClicked: { onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked tasks.configuration.showOnlyCurrentScreen = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current desktop") text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop checked: tasks.configuration.showOnlyCurrentDesktop
onClicked: { onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked tasks.configuration.showOnlyCurrentDesktop = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current activity") text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity checked: tasks.configuration.showOnlyCurrentActivity
onClicked: { onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked tasks.configuration.showOnlyCurrentActivity = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from launchers") text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers checked: tasks.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel visible: dialog.highLevel
onClicked: { onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked tasks.configuration.showWindowsOnlyFromLaunchers = checked
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Group tasks of the same application") text: i18n("Group tasks of the same application")
checked: plasmoid.configuration.groupTasksByDefault checked: tasks.configuration.groupTasksByDefault
tooltip: i18n("By default group tasks of the same application") tooltip: i18n("By default group tasks of the same application")
visible: dialog.highLevel visible: dialog.highLevel
onClicked: { onClicked: {
plasmoid.configuration.groupTasksByDefault = checked tasks.configuration.groupTasksByDefault = checked
} }
} }
} }
@ -261,50 +261,50 @@ PlasmaComponents.Page {
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Bounce launchers when triggered") text: i18n("Bounce launchers when triggered")
checked: plasmoid.configuration.animationLauncherBouncing checked: tasks.configuration.animationLauncherBouncing
onClicked: { onClicked: {
plasmoid.configuration.animationLauncherBouncing = !plasmoid.configuration.animationLauncherBouncing; tasks.configuration.animationLauncherBouncing = !tasks.configuration.animationLauncherBouncing;
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Bounce tasks that need attention") text: i18n("Bounce tasks that need attention")
checked: plasmoid.configuration.animationWindowInAttention checked: tasks.configuration.animationWindowInAttention
onClicked: { onClicked: {
plasmoid.configuration.animationWindowInAttention = !plasmoid.configuration.animationWindowInAttention; tasks.configuration.animationWindowInAttention = !tasks.configuration.animationWindowInAttention;
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Slide in and out single windows") text: i18n("Slide in and out single windows")
checked: plasmoid.configuration.animationNewWindowSliding checked: tasks.configuration.animationNewWindowSliding
onClicked: { onClicked: {
plasmoid.configuration.animationNewWindowSliding = !plasmoid.configuration.animationNewWindowSliding; tasks.configuration.animationNewWindowSliding = !tasks.configuration.animationNewWindowSliding;
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Grouped tasks bounce their new windows") text: i18n("Grouped tasks bounce their new windows")
checked: plasmoid.configuration.animationWindowAddedInGroup checked: tasks.configuration.animationWindowAddedInGroup
onClicked: { onClicked: {
plasmoid.configuration.animationWindowAddedInGroup = !plasmoid.configuration.animationWindowAddedInGroup; tasks.configuration.animationWindowAddedInGroup = !tasks.configuration.animationWindowAddedInGroup;
} }
} }
LatteComponents.CheckBox { LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth Layout.maximumWidth: dialog.optionsWidth
text: i18n("Grouped tasks slide out their closed windows") text: i18n("Grouped tasks slide out their closed windows")
checked: plasmoid.configuration.animationWindowRemovedFromGroup checked: tasks.configuration.animationWindowRemovedFromGroup
onClicked: { onClicked: {
plasmoid.configuration.animationWindowRemovedFromGroup = !plasmoid.configuration.animationWindowRemovedFromGroup; tasks.configuration.animationWindowRemovedFromGroup = !tasks.configuration.animationWindowRemovedFromGroup;
} }
} }
} }
@ -336,7 +336,7 @@ PlasmaComponents.Page {
spacing: 2 spacing: 2
property int group: plasmoid.configuration.launchersGroup property int group: tasks.configuration.launchersGroup
readonly property int buttonsCount: layoutGroupButton.visible ? 3 : 2 readonly property int buttonsCount: layoutGroupButton.visible ? 3 : 2
readonly property int buttonSize: (dialog.optionsWidth - (spacing * buttonsCount-1)) / buttonsCount readonly property int buttonSize: (dialog.optionsWidth - (spacing * buttonsCount-1)) / buttonsCount
@ -346,7 +346,7 @@ PlasmaComponents.Page {
onCurrentChanged: { onCurrentChanged: {
if (current.checked) { if (current.checked) {
viewConfig.updateLaunchersForGroup(current.group); viewConfig.updateLaunchersForGroup(current.group);
plasmoid.configuration.launchersGroup = current.group; tasks.configuration.launchersGroup = current.group;
} }
} }
} }
@ -373,7 +373,7 @@ PlasmaComponents.Page {
exclusiveGroup: launchersGroup exclusiveGroup: launchersGroup
tooltip: i18n("Use the current layout set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views in the <b>same layout</b>") tooltip: i18n("Use the current layout set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views in the <b>same layout</b>")
//! it is shown only when the user has activated that option manually from the text layout file //! it is shown only when the user has activated that option manually from the text layout file
visible: plasmoid.configuration.launchersGroup === group visible: tasks.configuration.launchersGroup === group
readonly property int group: Latte.Types.LayoutLaunchers readonly property int group: Latte.Types.LayoutLaunchers
} }
@ -407,12 +407,12 @@ PlasmaComponents.Page {
Layout.bottomMargin: units.smallSpacing Layout.bottomMargin: units.smallSpacing
enabled: Latte.WindowSystem.compositingActive enabled: Latte.WindowSystem.compositingActive
checked: plasmoid.configuration.scrollTasksEnabled checked: tasks.configuration.scrollTasksEnabled
text: i18n("Scrolling") text: i18n("Scrolling")
tooltip: i18n("Enable tasks scrolling when they overflow and exceed the available space"); tooltip: i18n("Enable tasks scrolling when they overflow and exceed the available space");
onPressed: { onPressed: {
plasmoid.configuration.scrollTasksEnabled = !plasmoid.configuration.scrollTasksEnabled;; tasks.configuration.scrollTasksEnabled = !tasks.configuration.scrollTasksEnabled;;
} }
} }
@ -442,8 +442,8 @@ PlasmaComponents.Page {
dialog.panelIsVertical ? i18n("Only vertical scrolling") : i18n("Only horizontal scrolling"), dialog.panelIsVertical ? i18n("Only vertical scrolling") : i18n("Only horizontal scrolling"),
i18n("Horizontal and vertical scrolling")] i18n("Horizontal and vertical scrolling")]
currentIndex: plasmoid.configuration.manualScrollTasksType currentIndex: tasks.configuration.manualScrollTasksType
onCurrentIndexChanged: plasmoid.configuration.manualScrollTasksType = currentIndex; onCurrentIndexChanged: tasks.configuration.manualScrollTasksType = currentIndex;
} }
PlasmaComponents.Label { PlasmaComponents.Label {
@ -461,12 +461,12 @@ PlasmaComponents.Page {
i18n("Enabled") i18n("Enabled")
] ]
currentIndex: plasmoid.configuration.autoScrollTasksEnabled currentIndex: tasks.configuration.autoScrollTasksEnabled
onCurrentIndexChanged: { onCurrentIndexChanged: {
if (currentIndex === 0) { if (currentIndex === 0) {
plasmoid.configuration.autoScrollTasksEnabled = false; tasks.configuration.autoScrollTasksEnabled = false;
} else { } else {
plasmoid.configuration.autoScrollTasksEnabled = true; tasks.configuration.autoScrollTasksEnabled = true;
} }
} }
} }
@ -511,7 +511,7 @@ PlasmaComponents.Page {
i18n("Preview Windows")] i18n("Preview Windows")]
currentIndex: { currentIndex: {
switch(plasmoid.configuration.leftClickAction) { switch(tasks.configuration.leftClickAction) {
case Latte.Types.PresentWindows: case Latte.Types.PresentWindows:
return 0; return 0;
case Latte.Types.CycleThroughTasks: case Latte.Types.CycleThroughTasks:
@ -526,13 +526,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case 0: case 0:
plasmoid.configuration.leftClickAction = Latte.Types.PresentWindows; tasks.configuration.leftClickAction = Latte.Types.PresentWindows;
break; break;
case 1: case 1:
plasmoid.configuration.leftClickAction = Latte.Types.CycleThroughTasks; tasks.configuration.leftClickAction = Latte.Types.CycleThroughTasks;
break; break;
case 2: case 2:
plasmoid.configuration.leftClickAction = Latte.Types.PreviewWindows; tasks.configuration.leftClickAction = Latte.Types.PreviewWindows;
break; break;
} }
} }
@ -555,8 +555,8 @@ PlasmaComponents.Page {
i18n("Toggle Task Grouping") i18n("Toggle Task Grouping")
] ]
currentIndex: plasmoid.configuration.middleClickAction currentIndex: tasks.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex onCurrentIndexChanged: tasks.configuration.middleClickAction = currentIndex
} }
PlasmaComponents.Label { PlasmaComponents.Label {
@ -574,7 +574,7 @@ PlasmaComponents.Page {
] ]
currentIndex: { currentIndex: {
switch(plasmoid.configuration.hoverAction) { switch(tasks.configuration.hoverAction) {
case Latte.Types.NoneAction: case Latte.Types.NoneAction:
return 0; return 0;
case Latte.Types.PreviewWindows: case Latte.Types.PreviewWindows:
@ -591,16 +591,16 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case 0: case 0:
plasmoid.configuration.hoverAction = Latte.Types.NoneAction; tasks.configuration.hoverAction = Latte.Types.NoneAction;
break; break;
case 1: case 1:
plasmoid.configuration.hoverAction = Latte.Types.PreviewWindows; tasks.configuration.hoverAction = Latte.Types.PreviewWindows;
break; break;
case 2: case 2:
plasmoid.configuration.hoverAction = Latte.Types.HighlightWindows; tasks.configuration.hoverAction = Latte.Types.HighlightWindows;
break; break;
case 3: case 3:
plasmoid.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows; tasks.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows;
break; break;
} }
} }
@ -620,7 +620,7 @@ PlasmaComponents.Page {
] ]
currentIndex: { currentIndex: {
switch(plasmoid.configuration.taskScrollAction) { switch(tasks.configuration.taskScrollAction) {
case Latte.Types.NoneAction: case Latte.Types.NoneAction:
return 0; return 0;
case Latte.Types.ScrollTasks: case Latte.Types.ScrollTasks:
@ -635,13 +635,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case 0: case 0:
plasmoid.configuration.taskScrollAction = Latte.Types.NoneAction; tasks.configuration.taskScrollAction = Latte.Types.NoneAction;
break; break;
case 1: case 1:
plasmoid.configuration.taskScrollAction = Latte.Types.ScrollTasks; tasks.configuration.taskScrollAction = Latte.Types.ScrollTasks;
break; break;
case 2: case 2:
plasmoid.configuration.taskScrollAction = Latte.Types.ScrollToggleMinimized; tasks.configuration.taskScrollAction = Latte.Types.ScrollToggleMinimized;
break; break;
} }
} }
@ -659,8 +659,8 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
model: ["Shift", "Ctrl", "Alt", "Meta"] model: ["Shift", "Ctrl", "Alt", "Meta"]
currentIndex: plasmoid.configuration.modifier currentIndex: tasks.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex onCurrentIndexChanged: tasks.configuration.modifier = currentIndex
} }
PlasmaComponents.Label { PlasmaComponents.Label {
@ -680,8 +680,8 @@ PlasmaComponents.Page {
Layout.maximumWidth: parent.maxSize Layout.maximumWidth: parent.maxSize
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")] model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
currentIndex: plasmoid.configuration.modifierClick currentIndex: tasks.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex onCurrentIndexChanged: tasks.configuration.modifierClick = currentIndex
} }
PlasmaComponents.Label { PlasmaComponents.Label {
@ -694,8 +694,8 @@ PlasmaComponents.Page {
model: [i18nc("The click action", "None"), i18n("Close Window or Group"), model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")] i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
currentIndex: plasmoid.configuration.modifierClickAction currentIndex: tasks.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex onCurrentIndexChanged: tasks.configuration.modifierClickAction = currentIndex
} }
} }
} }