@@ -23,10 +23,11 @@ import Unity.Indicators 0.1 as Indicators
23IndicatorBase {
23IndicatorBase {
24 id: indicatorWidget
24 id: indicatorWidget
26−// enabled: false // FIXME : should be enabled when we have desktop indicators
26+// enabled: false // FIXME : should be disabled until bus available when we have desktop indicators
27 property var action: undefined
27 property var action: undefined
28 property bool started: (busType != 0) && (busName != "") && (deviceMenuObjectPath != "")
28 property bool started: (busType != 0) && (busName != "") && (deviceMenuObjectPath != "")
29 property int iconSize: height - units.gu(0.5)
29 property int iconSize: height - units.gu(0.5)
30+ property string rootMenuType: "com.canonical.indicator.root"
31 signal actionStateChanged()
32 signal actionStateChanged()
@@ -34,8 +35,7 @@ IndicatorBase {
34 if (started) {
35 if (started) {
35 proxyModel.start();
36 proxyModel.start();
36 actionGroup.start();
37 actionGroup.start();
39 proxyModel.stop();
39 proxyModel.stop();
40 actionGroup.stop();
40 actionGroup.stop();
@@ -55,17 +55,11 @@ IndicatorBase {
58− if (parseRootElement(extra.canonical_type)) {
58+ if (extra.canonical_type === rootMenuType) {
59 action = actionGroup.action(proxyModel.data(0, Indicators.FlatMenuProxyModelRole.Action));
59 action = actionGroup.action(proxyModel.data(0, Indicators.FlatMenuProxyModelRole.Action));
63− function parseRootElement(type) {
64− if (type == "com.canonical.indicator.root")
69 Connections {
63 Connections {
70 target: action == undefined ? null : action
64 target: action == undefined ? null : action
71 onStateChanged: actionStateChanged()
65 onStateChanged: actionStateChanged()