support LatteContaiment.ActiveWindowFilterGroup

pull/15/head
Michail Vourlakos 5 years ago
parent 0a4fd31f32
commit a4e9b51b2b

@ -30,6 +30,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents
import org.kde.latte.private.containment 0.1 as LatteContainment
import "abilities" as Ability
import "applet" as Applet
@ -478,9 +479,9 @@ Item {
property QtObject selectedWindowsTracker: {
if (latteView && latteView.windowsTracker) {
switch(plasmoid.configuration.activeWindowFilter) {
case LatteCore.Types.ActiveInCurrentScreen:
case LatteContainment.Types.ActiveInCurrentScreen:
return latteView.windowsTracker.currentScreen;
case LatteCore.Types.ActiveFromAllScreens:
case LatteContainment.Types.ActiveFromAllScreens:
return latteView.windowsTracker.allScreens;
}
}

@ -35,6 +35,13 @@ class Types
public:
Types() = delete;
~Types() {}
enum ActiveWindowFilterGroup
{
ActiveInCurrentScreen = 0,
ActiveFromAllScreens
};
Q_ENUM(ActiveWindowFilterGroup);
};
}

@ -30,6 +30,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents
import org.kde.latte.private.containment 0.1 as LatteContainment
import "../../controls" as LatteExtraControls
@ -574,11 +575,11 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case LatteCore.Types.ActiveInCurrentScreen:
plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveInCurrentScreen;
case LatteContainment.Types.ActiveInCurrentScreen:
plasmoid.configuration.activeWindowFilter = LatteContainment.Types.ActiveInCurrentScreen;
break;
case LatteCore.Types.ActiveFromAllScreens:
plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveFromAllScreens;
case LatteContainment.Types.ActiveFromAllScreens:
plasmoid.configuration.activeWindowFilter = LatteContainment.Types.ActiveFromAllScreens;
break;
}
}

Loading…
Cancel
Save