@@ -23,10 +23,11 @@ import Unity.Indicators 0.1 as Indicators
2323IndicatorBase {
2424 id: indicatorWidget
2525
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
2727 property var action: undefined
2828 property bool started: (busType != 0) && (busName != "") && (deviceMenuObjectPath != "")
2929 property int iconSize: height - units.gu(0.5)
30+ property string rootMenuType: "com.canonical.indicator.root"
3031
3132 signal actionStateChanged()
3233
@@ -34,8 +35,7 @@ IndicatorBase {
3435 if (started) {
3536 proxyModel.start();
3637 actionGroup.start();
37− }
38− else {
38+ } else {
3939 proxyModel.stop();
4040 actionGroup.stop();
4141 }
@@ -55,17 +55,11 @@ IndicatorBase {
5555 return;
5656 }
5757
58− if (parseRootElement(extra.canonical_type)) {
58+ if (extra.canonical_type === rootMenuType) {
5959 action = actionGroup.action(proxyModel.data(0, Indicators.FlatMenuProxyModelRole.Action));
6060 }
6161 }
6262
63− function parseRootElement(type) {
64− if (type == "com.canonical.indicator.root")
65− return true;
66− return false;
67− }
68−
6963 Connections {
7064 target: action == undefined ? null : action
7165 onStateChanged: actionStateChanged()