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
pull/15/head
Michail Vourlakos 5 years ago
parent 0da74fb3ce
commit 5fdcef81af

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

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

@ -189,51 +189,9 @@
<choice name="FromAllScreens"/>
</choices>
<default>0</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 name="mouseWheelActions" type="Bool">
<default>true</default>
</entry>
<entry name="scrollAction" type="Enum">
<choices>
@ -245,45 +203,8 @@
</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 name="titleTooltips" type="Bool">
<default>true</default>
</entry>
<!-- Config properties -->
<entry name="configurationSticker" type="Bool">
@ -302,22 +223,39 @@
</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>
<!-- 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="animationWindowAddedInGroup" type="Bool">
<default>true</default>
<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>
<entry name="animationWindowRemovedFromGroup" type="Bool">
<default>true</default>
<!-- 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>
<!-- Tasks properties -->
<!-- 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"/>
@ -346,9 +284,7 @@
<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>
@ -364,9 +300,23 @@
<entry name="infoBadgeProminentColorEnabled" type="Bool">
<default>false</default>
</entry>
<entry name="mouseWheelActions" type="Bool">
<default>true</default>
<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>
@ -381,28 +331,90 @@
</choices>
<default>1</default>
</entry>
<entry name="unifiedGlobalShortcuts" type="Bool">
<default>true</default>
<label>Global Shortcuts are combined between applets and tasks</label>
<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>
<!-- Upgrade Flags -->
<entry name="alignmentUpgraded" type="Bool">
<default>false</default>
<label>flag to check it deprecated panelPosition was changed to "alignment"</label>
<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>
<!-- Deprecated Section -->
<entry name="panelPosition" type="Enum">
<entry name="hoverAction" type="Enum">
<choices>
<choice name="Center"/>
<choice name="Left"/>
<choice name="Right"/>
<choice name="Top"/>
<choice name="Bottom"/>
<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>
<label>DEPRECATED in 0.10 in favour of "alignment"</label>
</entry>
</group>
</kcfg>

@ -26,8 +26,78 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
Item{
Component.onCompleted: {
v010_upgrade();
}
function v010_upgrade() {
//v0.10
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....");
}
}
}

@ -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 taskScrollAction: plasmoid.configuration.taskScrollAction
property bool panelOutline: plasmoid.configuration.panelOutline
property int panelEdgeSpacing: Math.max(panelBoxBackground.lengthMargins, 1.5*appShadowSize)
@ -511,26 +504,9 @@ Item {
property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true
property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0)
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 unifiedGlobalShortcuts: plasmoid.configuration.unifiedGlobalShortcuts
property bool unifiedGlobalShortcuts: true
readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false
@ -545,16 +521,10 @@ Item {
}
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
property int launchersGroup: plasmoid.configuration.launchersGroup
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
//! Animations
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 longDuration: Latte.WindowSystem.longDuration
@ -585,9 +555,9 @@ Item {
return 1;
}
if (latteApplet && (animationLauncherBouncing || animationWindowInAttention || animationWindowAddedInGroup)) {
/* if (latteApplet && (animationLauncherBouncing || animationWindowInAttention || animationWindowAddedInGroup)) {
return 1.65;
}
}*/
return 1;
}

@ -6,15 +6,6 @@
<kcfgfile name=""/>
<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">
<default></default>
</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>
<default></default>
</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">
<default>true</default>
</entry>
@ -88,9 +70,49 @@
<entry name="durationTime" type="Int">
<default>2</default>
</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">
<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>
@ -100,13 +122,127 @@
<entry name="showAudioBadge" type="Bool">
<default>true</default>
</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 name="audioBadgeActionsEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="forceMonochromaticIcons" type="Bool">
<entry name="infoBadgeProminentColorEnabled" 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>
<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>
</group>
</kcfg>

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

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

@ -165,12 +165,7 @@ Item {
var pos = root.dragSource.itemIndex;
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();
ignoreItemTimer.restart();
}

@ -424,12 +424,13 @@ FocusScope {
visible: dialog.highLevel
}
Repeater {
id: tasksTabButtonRepeater
model: latteView.extendedInterface.tasksModel
PlasmaComponents.TabButton {
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 {
id: effectsPage
}
}
}
Repeater {
id: tasksRepeater
//! 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
Repeater {
id: tasksRepeater
model: latteView.extendedInterface.tasksModel
//! 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 {
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;
}
}
}
}

@ -34,7 +34,7 @@ PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 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
ColumnLayout {
@ -63,57 +63,57 @@ PlasmaComponents.Page {
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Notifications from tasks")
checked: plasmoid.configuration.showInfoBadge
checked: tasks.configuration.showInfoBadge
tooltip: i18n("Show unread messages or notifications from tasks")
onClicked: {
plasmoid.configuration.showInfoBadge = checked
tasks.configuration.showInfoBadge = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
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")
onClicked: {
plasmoid.configuration.showProgressBadge = checked
tasks.configuration.showProgressBadge = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Audio playing from tasks")
checked: plasmoid.configuration.showAudioBadge
checked: tasks.configuration.showAudioBadge
tooltip: i18n("Show audio playing from tasks")
onClicked: {
plasmoid.configuration.showAudioBadge = checked
tasks.configuration.showAudioBadge = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Prominent color for notification badge")
checked: plasmoid.configuration.infoBadgeProminentColorEnabled
enabled: plasmoid.configuration.showInfoBadge
checked: tasks.configuration.infoBadgeProminentColorEnabled
enabled: tasks.configuration.showInfoBadge
tooltip: i18n("Notification badge uses a more prominent background which is usually red")
onClicked: {
plasmoid.configuration.infoBadgeProminentColorEnabled = !plasmoid.configuration.infoBadgeProminentColorEnabled;
tasks.configuration.infoBadgeProminentColorEnabled = !tasks.configuration.infoBadgeProminentColorEnabled;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Change volume when scrolling audio badge")
checked: plasmoid.configuration.audioBadgeActionsEnabled
enabled: plasmoid.configuration.showAudioBadge
checked: tasks.configuration.audioBadgeActionsEnabled
enabled: tasks.configuration.showAudioBadge
tooltip: i18n("The user is able to mute/unmute with click or change the volume with mouse wheel")
onClicked: {
plasmoid.configuration.audioBadgeActionsEnabled = checked
tasks.configuration.audioBadgeActionsEnabled = checked
}
}
}
@ -148,12 +148,12 @@ PlasmaComponents.Page {
id: windowActionsChk
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Window actions in the context menu")
checked: plasmoid.configuration.showWindowActions
checked: tasks.configuration.showWindowActions
visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality
onClicked: {
plasmoid.configuration.showWindowActions = checked
tasks.configuration.showWindowActions = checked
}
}
@ -190,53 +190,53 @@ PlasmaComponents.Page {
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
checked: tasks.configuration.showOnlyCurrentScreen
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
tasks.configuration.showOnlyCurrentScreen = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
checked: tasks.configuration.showOnlyCurrentDesktop
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
tasks.configuration.showOnlyCurrentDesktop = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
checked: tasks.configuration.showOnlyCurrentActivity
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
tasks.configuration.showOnlyCurrentActivity = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
checked: tasks.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
tasks.configuration.showWindowsOnlyFromLaunchers = checked
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
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")
visible: dialog.highLevel
onClicked: {
plasmoid.configuration.groupTasksByDefault = checked
tasks.configuration.groupTasksByDefault = checked
}
}
}
@ -261,50 +261,50 @@ PlasmaComponents.Page {
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Bounce launchers when triggered")
checked: plasmoid.configuration.animationLauncherBouncing
checked: tasks.configuration.animationLauncherBouncing
onClicked: {
plasmoid.configuration.animationLauncherBouncing = !plasmoid.configuration.animationLauncherBouncing;
tasks.configuration.animationLauncherBouncing = !tasks.configuration.animationLauncherBouncing;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Bounce tasks that need attention")
checked: plasmoid.configuration.animationWindowInAttention
checked: tasks.configuration.animationWindowInAttention
onClicked: {
plasmoid.configuration.animationWindowInAttention = !plasmoid.configuration.animationWindowInAttention;
tasks.configuration.animationWindowInAttention = !tasks.configuration.animationWindowInAttention;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Slide in and out single windows")
checked: plasmoid.configuration.animationNewWindowSliding
checked: tasks.configuration.animationNewWindowSliding
onClicked: {
plasmoid.configuration.animationNewWindowSliding = !plasmoid.configuration.animationNewWindowSliding;
tasks.configuration.animationNewWindowSliding = !tasks.configuration.animationNewWindowSliding;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Grouped tasks bounce their new windows")
checked: plasmoid.configuration.animationWindowAddedInGroup
checked: tasks.configuration.animationWindowAddedInGroup
onClicked: {
plasmoid.configuration.animationWindowAddedInGroup = !plasmoid.configuration.animationWindowAddedInGroup;
tasks.configuration.animationWindowAddedInGroup = !tasks.configuration.animationWindowAddedInGroup;
}
}
LatteComponents.CheckBox {
Layout.maximumWidth: dialog.optionsWidth
text: i18n("Grouped tasks slide out their closed windows")
checked: plasmoid.configuration.animationWindowRemovedFromGroup
checked: tasks.configuration.animationWindowRemovedFromGroup
onClicked: {
plasmoid.configuration.animationWindowRemovedFromGroup = !plasmoid.configuration.animationWindowRemovedFromGroup;
tasks.configuration.animationWindowRemovedFromGroup = !tasks.configuration.animationWindowRemovedFromGroup;
}
}
}
@ -336,7 +336,7 @@ PlasmaComponents.Page {
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 buttonSize: (dialog.optionsWidth - (spacing * buttonsCount-1)) / buttonsCount
@ -346,7 +346,7 @@ PlasmaComponents.Page {
onCurrentChanged: {
if (current.checked) {
viewConfig.updateLaunchersForGroup(current.group);
plasmoid.configuration.launchersGroup = current.group;
tasks.configuration.launchersGroup = current.group;
}
}
}
@ -373,7 +373,7 @@ PlasmaComponents.Page {
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>")
//! 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
}
@ -407,12 +407,12 @@ PlasmaComponents.Page {
Layout.bottomMargin: units.smallSpacing
enabled: Latte.WindowSystem.compositingActive
checked: plasmoid.configuration.scrollTasksEnabled
checked: tasks.configuration.scrollTasksEnabled
text: i18n("Scrolling")
tooltip: i18n("Enable tasks scrolling when they overflow and exceed the available space");
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"),
i18n("Horizontal and vertical scrolling")]
currentIndex: plasmoid.configuration.manualScrollTasksType
onCurrentIndexChanged: plasmoid.configuration.manualScrollTasksType = currentIndex;
currentIndex: tasks.configuration.manualScrollTasksType
onCurrentIndexChanged: tasks.configuration.manualScrollTasksType = currentIndex;
}
PlasmaComponents.Label {
@ -461,12 +461,12 @@ PlasmaComponents.Page {
i18n("Enabled")
]
currentIndex: plasmoid.configuration.autoScrollTasksEnabled
currentIndex: tasks.configuration.autoScrollTasksEnabled
onCurrentIndexChanged: {
if (currentIndex === 0) {
plasmoid.configuration.autoScrollTasksEnabled = false;
tasks.configuration.autoScrollTasksEnabled = false;
} else {
plasmoid.configuration.autoScrollTasksEnabled = true;
tasks.configuration.autoScrollTasksEnabled = true;
}
}
}
@ -511,7 +511,7 @@ PlasmaComponents.Page {
i18n("Preview Windows")]
currentIndex: {
switch(plasmoid.configuration.leftClickAction) {
switch(tasks.configuration.leftClickAction) {
case Latte.Types.PresentWindows:
return 0;
case Latte.Types.CycleThroughTasks:
@ -526,13 +526,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.leftClickAction = Latte.Types.PresentWindows;
tasks.configuration.leftClickAction = Latte.Types.PresentWindows;
break;
case 1:
plasmoid.configuration.leftClickAction = Latte.Types.CycleThroughTasks;
tasks.configuration.leftClickAction = Latte.Types.CycleThroughTasks;
break;
case 2:
plasmoid.configuration.leftClickAction = Latte.Types.PreviewWindows;
tasks.configuration.leftClickAction = Latte.Types.PreviewWindows;
break;
}
}
@ -555,8 +555,8 @@ PlasmaComponents.Page {
i18n("Toggle Task Grouping")
]
currentIndex: plasmoid.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex
currentIndex: tasks.configuration.middleClickAction
onCurrentIndexChanged: tasks.configuration.middleClickAction = currentIndex
}
PlasmaComponents.Label {
@ -574,7 +574,7 @@ PlasmaComponents.Page {
]
currentIndex: {
switch(plasmoid.configuration.hoverAction) {
switch(tasks.configuration.hoverAction) {
case Latte.Types.NoneAction:
return 0;
case Latte.Types.PreviewWindows:
@ -591,16 +591,16 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.hoverAction = Latte.Types.NoneAction;
tasks.configuration.hoverAction = Latte.Types.NoneAction;
break;
case 1:
plasmoid.configuration.hoverAction = Latte.Types.PreviewWindows;
tasks.configuration.hoverAction = Latte.Types.PreviewWindows;
break;
case 2:
plasmoid.configuration.hoverAction = Latte.Types.HighlightWindows;
tasks.configuration.hoverAction = Latte.Types.HighlightWindows;
break;
case 3:
plasmoid.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows;
tasks.configuration.hoverAction = Latte.Types.PreviewAndHighlightWindows;
break;
}
}
@ -620,7 +620,7 @@ PlasmaComponents.Page {
]
currentIndex: {
switch(plasmoid.configuration.taskScrollAction) {
switch(tasks.configuration.taskScrollAction) {
case Latte.Types.NoneAction:
return 0;
case Latte.Types.ScrollTasks:
@ -635,13 +635,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
plasmoid.configuration.taskScrollAction = Latte.Types.NoneAction;
tasks.configuration.taskScrollAction = Latte.Types.NoneAction;
break;
case 1:
plasmoid.configuration.taskScrollAction = Latte.Types.ScrollTasks;
tasks.configuration.taskScrollAction = Latte.Types.ScrollTasks;
break;
case 2:
plasmoid.configuration.taskScrollAction = Latte.Types.ScrollToggleMinimized;
tasks.configuration.taskScrollAction = Latte.Types.ScrollToggleMinimized;
break;
}
}
@ -659,8 +659,8 @@ PlasmaComponents.Page {
Layout.fillWidth: true
model: ["Shift", "Ctrl", "Alt", "Meta"]
currentIndex: plasmoid.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex
currentIndex: tasks.configuration.modifier
onCurrentIndexChanged: tasks.configuration.modifier = currentIndex
}
PlasmaComponents.Label {
@ -680,8 +680,8 @@ PlasmaComponents.Page {
Layout.maximumWidth: parent.maxSize
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
currentIndex: plasmoid.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex
currentIndex: tasks.configuration.modifierClick
onCurrentIndexChanged: tasks.configuration.modifierClick = currentIndex
}
PlasmaComponents.Label {
@ -694,8 +694,8 @@ PlasmaComponents.Page {
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")]
currentIndex: plasmoid.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex
currentIndex: tasks.configuration.modifierClickAction
onCurrentIndexChanged: tasks.configuration.modifierClickAction = currentIndex
}
}
}

Loading…
Cancel
Save