From 8e4cd1ce8897a0d3978ae755dc0e61d6872bca84 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 2 Jan 2017 21:42:53 +0200 Subject: [PATCH] add filters for plasmoid into configuration --- containment/contents/config/main.xml | 9 ++++ containment/contents/ui/main.qml | 4 ++ plasmoid/contents/ui/main.qml | 9 ++-- shell/contents/configuration/TasksConfig.qml | 46 ++++++++++++++++++-- 4 files changed, 61 insertions(+), 7 deletions(-) diff --git a/containment/contents/config/main.xml b/containment/contents/config/main.xml index 28db87edb..8afd9d76b 100644 --- a/containment/contents/config/main.xml +++ b/containment/contents/config/main.xml @@ -87,5 +87,14 @@ false + + false + + + false + + + true + diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index 57ef3668f..aaa38d9b9 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -106,6 +106,10 @@ DragDrop.DropArea { property bool showGlow: plasmoid.configuration.showGlow property bool showToolTips: plasmoid.configuration.showToolTips property bool showWindowActions: plasmoid.configuration.showWindowActions + property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen + property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop + property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity + property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index 85f3594b8..9d102268f 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -98,6 +98,9 @@ Item { property bool reverseLinesPosition: nowDockPanel ? nowDockPanel.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition property bool dotsOnActive: nowDockPanel ? nowDockPanel.dotsOnActive : plasmoid.configuration.dotsOnActive property bool showGlow: nowDockPanel ? nowDockPanel.showGlow : plasmoid.configuration.showGlow + property bool showOnlyCurrentScreen: nowDockPanel ? nowDockPanel.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen + property bool showOnlyCurrentDesktop: nowDockPanel ? nowDockPanel.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop + property bool showOnlyCurrentActivity: nowDockPanel ? nowDockPanel.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity property bool showPreviews: nowDockPanel ? nowDockPanel.showToolTips : plasmoid.configuration.showToolTips property bool showWindowActions: nowDockPanel ? nowDockPanel.showWindowActions : plasmoid.configuration.showWindowActions property bool smartLaunchersEnabled: nowDockPanel ? nowDockPanel.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled @@ -266,9 +269,9 @@ Item { // screen: plasmoid.screen activity: activityInfo.currentActivity - filterByVirtualDesktop: plasmoid.configuration.showOnlyCurrentDesktop - filterByScreen: plasmoid.configuration.showOnlyCurrentScreen - filterByActivity: plasmoid.configuration.showOnlyCurrentActivity + filterByVirtualDesktop: root.showOnlyCurrentDesktop + filterByScreen: root.showOnlyCurrentScreen + filterByActivity: root.showOnlyCurrentActivity launchInPlace: true separateLaunchers: false diff --git a/shell/contents/configuration/TasksConfig.qml b/shell/contents/configuration/TasksConfig.qml index 4a23dd9f2..6a953fabd 100644 --- a/shell/contents/configuration/TasksConfig.qml +++ b/shell/contents/configuration/TasksConfig.qml @@ -26,8 +26,6 @@ PlasmaComponents.Page{ text: i18n("Appearance") } - - PlasmaComponents.CheckBox { id: showGlow text: i18n("Show glow around windows points") @@ -79,10 +77,9 @@ PlasmaComponents.Page{ spacing: 0.8*theme.defaultFont.pointSize Header{ - text: i18n("Behavior") + text: i18n("Interaction") } - PlasmaComponents.CheckBox { id: showPreviewsChk text: i18n("Preview windows on hovering") @@ -127,5 +124,46 @@ PlasmaComponents.Page{ Component.onCompleted: checked = plasmoid.configuration.smartLaunchersEnabled; } } + + /*******Filters*******/ + Column{ + width:parent.width + spacing: 0.8*theme.defaultFont.pointSize + + Header{ + text: i18n("Filters") + } + + PlasmaComponents.CheckBox { + id: showOnlyCurrentScreen + text: i18n("Show only tasks from the current screen") + onCheckedChanged: { + plasmoid.configuration.showOnlyCurrentScreen = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.showOnlyCurrentScreen; + } + + PlasmaComponents.CheckBox { + id: showOnlyCurrentDesktop + text: i18n("Show only tasks from the current desktop") + onCheckedChanged: { + plasmoid.configuration.showOnlyCurrentDesktop = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.showOnlyCurrentDesktop; + } + + PlasmaComponents.CheckBox { + id: showOnlyCurrentActivity + text: i18n("Show only tasks from the current activity") + onCheckedChanged: { + plasmoid.configuration.showOnlyCurrentActivity = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.showOnlyCurrentActivity; + } + + } } }