@@ -16,11 +16,22 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import Unity.Indicators 0.1 as Indicators
18import Unity.Indicators 0.1 as Indicators
19+import Unity.InputInfo 0.1
20+import AccountsService 0.1
20Indicators.FakeIndicatorsModel {
22Indicators.FakeIndicatorsModel {
23 property var originalModelData: [
25 property var originalModelData: [
27+ "identifier": "indicator-keyboard",
28+ "indicatorProperties": {
30+ "busName": "com.canonical.indicators.fake0",
31+ "menuObjectPath": "/com/canonical/indicators/fake0",
32+ "actionsObjectPath": "/com/canonical/indicators/fake0"
25 "identifier": "fake-indicator-bluetooth",
36 "identifier": "fake-indicator-bluetooth",
26 "indicatorProperties": {
37 "indicatorProperties": {
@@ -74,13 +85,38 @@ Indicators.FakeIndicatorsModel {
74 "menuObjectPath": "/com/canonical/indicators/fake6",
85 "menuObjectPath": "/com/canonical/indicators/fake6",
75 "actionsObjectPath": "/com/canonical/indicators/fake6"
86 "actionsObjectPath": "/com/canonical/indicators/fake6"
90+ "identifier": "fake-indicator-session",
91+ "indicatorProperties": {
93+ "busName": "com.canonical.indicators.fake7",
94+ "menuObjectPath": "/com/canonical/indicators/fake7",
95+ "actionsObjectPath": "/com/canonical/indicators/fake7"
100+ Component.onCompleted: {
101+ // init data for the fake indicator-keyboard
102+ MockInputDeviceBackend.addMockDevice("/indicator_kbd0", InputInfo.Keyboard);
103+ AccountsService.keymaps = ["us", "cs"];
106+ Component.onDestruction: {
107+ MockInputDeviceBackend.removeDevice("/indicator_kbd0");
108+ AccountsService.keymaps = ["us"];
80 function load(profile) {
111 function load(profile) {
81 unload();
112 unload();
82 root.modelData = originalModelData;
113 root.modelData = originalModelData;
115+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake0",
116+ getUnityMenuModelData("indicator-keyboard",
119+ [ "image://theme/input-keyboard-symbolic" ]));
84 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake1",
120 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake1",
85 getUnityMenuModelData("fake-indicator-bluetooth",
121 getUnityMenuModelData("fake-indicator-bluetooth",
86 "Bluetooth (F)",
122 "Bluetooth (F)",
@@ -111,6 +147,11 @@ Indicators.FakeIndicatorsModel {
111 "Upcoming Events (F)",
147 "Upcoming Events (F)",
150+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake7",
151+ getUnityMenuModelData("fake-indicator-session",
154+ ["image://theme/system-devices-panel"]));
116 function getUnityMenuModelData(identifier, title, label, icons) {
157 function getUnityMenuModelData(identifier, title, label, icons) {
@@ -173,6 +214,5 @@ Indicators.FakeIndicatorsModel {