on xenial help sign in
Fixed the removal of messaging widget due to incompatible action state. Fixes: https://bugs.launchpad.net/bugs/1225017.
6a74c57Nick Dedekind
Panel/Indicators/DefaultIndicatorWidget.qml+1−5
@@ -24,6 +24,7 @@ import Unity.IndicatorsLegacy 0.1 as Indicators
24Indicators.IndicatorWidget {
24Indicators.IndicatorWidget {
25 id: indicatorWidget
25 id: indicatorWidget
26
26
27+ enabled:true
27 width: itemRow.width + units.gu(0.5)
28 width: itemRow.width + units.gu(0.5)
28
29
29 property alias label: itemLabel.text
30 property alias label: itemLabel.text
@@ -63,19 +64,14 @@ Indicators.IndicatorWidget {
63
64
64 onActionStateChanged: {
65 onActionStateChanged: {
65 if (action == undefined || !action.valid) {
66 if (action == undefined || !action.valid) {
66− enabled = false;
67 return;
67 return;
68 }
68 }
69
69
70 if (action.state == undefined) {
70 if (action.state == undefined) {
71− label = "";
72− iconSource = "";
73− enabled = false;
74 return;
71 return;
75 }
72 }
76
73
77 label = action.state[Indicators.ActionState.Label];
74 label = action.state[Indicators.ActionState.Label];
78 iconSource = "image://theme/" + action.state[Indicators.ActionState.IconSource];
75 iconSource = "image://theme/" + action.state[Indicators.ActionState.IconSource];
79− enabled = action.state[Indicators.ActionState.Visible];
80 }
76 }
81}
77}