51
51
nextIndex = currentKeymapIndex + 1;
53
53
currentKeymapIndex = nextIndex;
54
if (actionGroup.currentAction.valid) {
55
actionGroup.currentAction.updateState(currentKeymapIndex);
56
59
function previousKeymap() {
60
63
prevIndex = currentKeymapIndex - 1;
62
65
currentKeymapIndex = prevIndex;
66
if (actionGroup.currentAction.valid) {
67
actionGroup.currentAction.updateState(currentKeymapIndex);
65
property Binding surfaceKeymapBinding: Binding {
71
property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
66
72
target: root.focusedSurface
68
74
value: root.currentKeymap
77
property Binding unityKeymapBinding: Binding {
79
property: "currentKeymap"
80
value: root.currentKeymap
72
84
property QDBusActionGroup actionGroup: QDBusActionGroup {
73
85
busType: DBus.SessionBus
74
86
busName: "com.canonical.indicator.keyboard"
75
87
objectPath: "/com/canonical/indicator/keyboard"
77
property variant currentAction: action("current")
78
property variant activeAction: action("active")
89
property variant currentAction: action("current") // the one that's checked by the indicator
90
property variant activeAction: action("active") // the one that we clicked
80
92
Component.onCompleted: actionGroup.start();
83
onCurrentKeymapIndexChanged: {
84
actionGroup.currentAction.updateState(currentKeymapIndex);
87
95
readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
89
97
onActiveActionStateChanged: {