on xenial help sign in
more review fixes
c025230Nick Dedekind
Panel/Indicators/DefaultIndicatorWidget.qml+1
@@ -39,6 +39,7 @@ Indicators.IndicatorWidget {
39 }
39 }
40 spacing: units.gu(0.5)
40 spacing: units.gu(0.5)
41
41
42+ // FIXME : Should us Ubuntu.Icon . results in low res images
42 Image {
43 Image {
43 id: itemImage
44 id: itemImage
44 objectName: "itemImage"
45 objectName: "itemImage"
Panel/Indicators/NetworkIndicatorWidget.qml+9−10
@@ -27,8 +27,9 @@ Indicators.IndicatorWidget {
27 width: networkIcon.width + units.gu(1)
27 width: networkIcon.width + units.gu(1)
28
28
29 property int signalStrength: 0
29 property int signalStrength: 0
30− property int connectionState: 0
30+ property int connectionState: Indicators.ConnectionState.Initial
31
31
32+ // FIXME : Should us Ubuntu.Icon . results in low res images
32 Image {
33 Image {
33 id: networkIcon
34 id: networkIcon
34 objectName: "itemImage"
35 objectName: "itemImage"
@@ -36,15 +37,13 @@ Indicators.IndicatorWidget {
36 visible: source != ""
37 visible: source != ""
37 height: indicatorWidget.iconSize
38 height: indicatorWidget.iconSize
38 width: indicatorWidget.iconSize
39 width: indicatorWidget.iconSize
39− anchors {
40+ anchors.centerIn: parent
40− verticalCenter: parent.verticalCenter
41− horizontalCenter: parent.horizontalCenter
42− }
43 }
41 }
44
42
45 function parseRootElement(type, data) {
43 function parseRootElement(type, data) {
46− if (type == "com.canonical.indicator.root.network")
44+ if (type == "com.canonical.indicator.root.network") {
47 return true;
45 return true;
46+ }
48 return false;
47 return false;
49 }
48 }
50
49
@@ -77,22 +76,22 @@ Indicators.IndicatorWidget {
77 states: [
76 states: [
78 State {
77 State {
79 name: "unknown"
78 name: "unknown"
80− when: connectionState > 3 || connectionState < 1
79+ when: connectionState > Indicators.ConnectionState.Deactivating || connectionState < Indicators.ConnectionState.Activating
81 PropertyChanges { target: activation_animation; running: false }
80 PropertyChanges { target: activation_animation; running: false }
82 },
81 },
83 State {
82 State {
84 name: "activating"
83 name: "activating"
85− when: connectionState == 1
84+ when: connectionState == Indicators.ConnectionState.Activating
86 PropertyChanges { target: activation_animation; running: true }
85 PropertyChanges { target: activation_animation; running: true }
87 },
86 },
88 State {
87 State {
89 name: "activated"
88 name: "activated"
90− when: connectionState == 2
89+ when: connectionState == Indicators.ConnectionState.Activated
91 PropertyChanges { target: activation_animation; running: false }
90 PropertyChanges { target: activation_animation; running: false }
92 },
91 },
93 State {
92 State {
94 name: "deactivating"
93 name: "deactivating"
95− when: connectionState == 3
94+ when: connectionState == Indicators.ConnectionState.Deactivating
96 PropertyChanges { target: activation_animation; running: true }
95 PropertyChanges { target: activation_animation; running: true }
97 }
96 }
98 ]
97 ]
Panel/Indicators/client/IndicatorsList.qml+2−3
@@ -41,7 +41,6 @@ Page {
41 delegate: Indicators.Menu {
41 delegate: Indicators.Menu {
42 anchors.left: parent.left
42 anchors.left: parent.left
43 anchors.right: parent.right
43 anchors.right: parent.right
44− height: implicitHeight
45 progression: isValid
44 progression: isValid
46 objectName: identifier
45 objectName: identifier
47
46
@@ -54,8 +53,8 @@ Page {
54
53
55 onClicked: {
54 onClicked: {
56 if (progression) {
55 if (progression) {
57− var page = Qt.createComponent("IndicatorsPage.qml");
56+ var new_page = Qt.createComponent("IndicatorsPage.qml");
58− pages.push(page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource});
57+ page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource});
59 }
58 }
60 }
59 }
61 }
60 }
Panel/MenuContent.qml+7−14
@@ -104,22 +104,15 @@ Rectangle {
104 }
104 }
105 asynchronous: true
105 asynchronous: true
106
106
107− onStatusChanged: {
107+ onLoaded: {
108− if (status == Loader.Ready) {
109− for(var pName in indicatorProperties) {
108+ for(var pName in indicatorProperties) {
110− if (item.hasOwnProperty(pName)) {
109+ if (item.hasOwnProperty(pName)) {
111− item[pName] = indicatorProperties[pName]
110+ item[pName] = indicatorProperties[pName]
112− }
113− }
114− if (contentActive && menus.visible) {
115− item.start()
116 }
111 }
117 }
112 }
113+ if (contentActive && menus.visible) {
114+ item.start()
118− }
115+ }
119−
120− // FIXME: QTBUG-30632 - asynchronous loader crashes when changing index quickly.
121− Component.onDestruction: {
122− active = false;
123 }
116 }
124
117
125 // Need to use a binding because the handle height changes.
118 // Need to use a binding because the handle height changes.
Panel/Menus/Overview/OverviewGrid.qml+9−12
@@ -65,18 +65,15 @@ Item {
65 id: loader
65 id: loader
66 source: widgetSource
66 source: widgetSource
67
67
68− onStatusChanged: {
69− item.width = units.gu(5)
68+ width: units.gu(5)
70− item.height = units.gu(5)
69+ height: units.gu(5)
71−
70+ anchors.centerIn: parent
72− item.x = Qt.binding(function() { return indicatorButton.width/2 - item.width/2; })
71+ anchors.verticalCenterOffset: -units.gu(1)
73− item.y = Qt.binding(function() { return indicatorButton.height/2 - item.height/2 - units.gu(1); })
72+
74−
73+ onLoaded: {
75− if (status == Loader.Ready) {
76− for(var pName in indicatorProperties) {
74+ for(var pName in indicatorProperties) {
77− if (item.hasOwnProperty(pName)) {
75+ if (item.hasOwnProperty(pName)) {
78− item[pName] = indicatorProperties[pName]
76+ item[pName] = indicatorProperties[pName]
79− }
80 }
77 }
81 }
78 }
82 }
79 }
debian/control+3−3
@@ -58,11 +58,11 @@ Description: transitional dummy package
58
58
59Package: indicators-client
59Package: indicators-client
60Architecture: amd64 armhf i386
60Architecture: amd64 armhf i386
61−Depends: ${shlibs:Depends},
61+Depends: qmenumodel-qml,
62− ${misc:Depends},
63 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
62 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
64− qmenumodel-qml,
65 unity8 (= ${source:Version}),
63 unity8 (= ${source:Version}),
64+ ${misc:Depends},
65+ ${shlibs:Depends},
66Description: Indicators and system settings client application
66Description: Indicators and system settings client application
67 This package contains the client application for indicators and system
67 This package contains the client application for indicators and system
68 settings.
68 settings.
modules/Unity/Indicators/indicators.h+15
@@ -34,4 +34,19 @@ public:
34 ActionState(QObject*parent=0):QObject(parent) {}
34 ActionState(QObject*parent=0):QObject(parent) {}
35};
35};
36
36
37+class ConnectionState : public QObject
38+{
39+ Q_OBJECT
40+public:
41+ Q_ENUMS(ConnectionStates)
42+ enum ConnectionStates {
43+ Initial = 0x00,
44+ Activating = 0x01,
45+ Activated = 0x02,
46+ Deactivating = 0x03,
47+ };
48+
49+ ConnectionState(QObject*parent=0):QObject(parent) {}
50+};
51+
37#endif // INDICATORS_H
52#endif // INDICATORS_H
modules/Unity/Indicators/plugin.cpp+1
@@ -36,4 +36,5 @@ void IndicatorsPlugin::registerTypes(const char *uri)
36 qmlRegisterType<FlatMenuProxyModel>(uri, 0, 1, "FlatMenuProxyModel");
36 qmlRegisterType<FlatMenuProxyModel>(uri, 0, 1, "FlatMenuProxyModel");
37 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
37 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
38 qmlRegisterUncreatableType<ActionState>(uri, 0, 1, "ActionState", "Can't create ActionState class");
38 qmlRegisterUncreatableType<ActionState>(uri, 0, 1, "ActionState", "Can't create ActionState class");
39+ qmlRegisterUncreatableType<ConnectionState>(uri, 0, 1, "ConnectionState", "Can't create ConnectionState class");
39}
40}
modules/Unity/Indicators/qml/IndicatorWidget.qml+2
@@ -25,6 +25,8 @@ import Unity.Indicators 0.1 as Indicators
25
25
26IndicatorBase {
26IndicatorBase {
27 id: indicatorWidget
27 id: indicatorWidget
28+
29+// enabled: false // FIXME : should be enabled when we have desktop indicators
28 property var action: undefined
30 property var action: undefined
29 property bool started: (busType != 0) && (busName != "") && (deviceMenuObjectPath != "")
31 property bool started: (busType != 0) && (busName != "") && (deviceMenuObjectPath != "")
30 property int iconSize: height - units.gu(0.5)
32 property int iconSize: height - units.gu(0.5)