on xenial help sign in
merged with trunk
22208dfNick Dedekind
.bzrignore+1−4
@@ -3,8 +3,5 @@
3# QtCreator project files
3# QtCreator project files
4/*.user
4/*.user
5# Eclipse project files
5# Eclipse project files
6−/.project
7−/.cproject
8−/.settings
6+.settings
9−/.pydevproject
10message.txt
7message.txt
CMakeLists.txt+2−10
@@ -108,11 +108,7 @@ declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
108
108
109set(SHELL_APP unity8)
109set(SHELL_APP unity8)
110
110
111−set(shell_app_HDRS
112− )
113−
114add_executable(${SHELL_APP}
111add_executable(${SHELL_APP}
115− ${shellapplication_MOC_SRCS}
116 ApplicationArguments.h
112 ApplicationArguments.h
117 main.cpp
113 main.cpp
118 MouseTouchAdaptor.cpp
114 MouseTouchAdaptor.cpp
@@ -123,14 +119,10 @@ pkg_check_modules(XCB REQUIRED xcb)
123
119
124if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
120if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
125 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
121 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
122+
123+ target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
126endif()
124endif()
127
125
128−target_link_libraries(${SHELL_APP}
129− ${Qt5Qml_LIBRARIES}
130− ${Qt5Quick_LIBRARIES}
131− ${XCB_LDFLAGS}
132− ${CMAKE_DL_LIBS}
133− )
134
126
135# install binaries
127# install binaries
136install(TARGETS ${SHELL_APP}
128install(TARGETS ${SHELL_APP}
Notifications/Notification.qml+211−181
@@ -20,7 +20,7 @@ import Unity.Notifications 1.0
20import QMenuModel 0.1
20import QMenuModel 0.1
21import Utils 0.1
21import Utils 0.1
22
22
23−UbuntuShape {
23+Item {
24 id: notification
24 id: notification
25
25
26 property alias iconSource: icon.fileSource
26 property alias iconSource: icon.fileSource
@@ -32,262 +32,292 @@ UbuntuShape {
32 property var type
32 property var type
33 property var hints
33 property var hints
34 property var notification
34 property var notification
35+ property color color
36+ property bool fullscreen
35
37
38+ fullscreen: false
36 objectName: "background"
39 objectName: "background"
37− implicitHeight: type != Notification.PlaceHolder ? contentColumn.height + contentColumn.spacing * 2 : 0
40+ implicitHeight: type != Notification.PlaceHolder ? (fullscreen ? notificationList.fullHeight : contentColumn.height + contentColumn.spacing * 4) : 0
41+
38 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
42 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
39 opacity: 0
43 opacity: 0
40− radius: "medium"
41
44
42− clip: true
45+ clip: fullscreen ? false : true
43 visible: type != Notification.PlaceHolder
46 visible: type != Notification.PlaceHolder
44
47
45− UnityMenuModelPaths {
48+ UbuntuShape {
46− id: paths
49+ id: shapedBack
47−
48− source: hints["x-canonical-private-menu-model"]
49
50
50− busNameHint: "busName"
51+ visible: !fullscreen
51− actionsHint: "actions"
52+ anchors.fill: parent
52− menuObjectPathHint: "menuPath"
53+ anchors.margins: notificationList.margin
54+ color: parent.color
55+ opacity: parent.opacity
56+ radius: "medium"
53 }
57 }
54
58
55− UnityMenuModel {
59+ Rectangle {
56− id: unityMenuModel
60+ id: nonShapedBack
57
61
58− busName: paths.busName
62+ visible: fullscreen
59− actions: paths.actions
63+ anchors.fill: parent
60− menuObjectPath: paths.menuObjectPath
64+ color: parent.color
65+ opacity: parent.opacity
61 }
66 }
62
67
63− Behavior on implicitHeight {
68+ Item {
64− id: heightBehavior
69+ id: contents
70+ anchors.fill: fullscreen ? nonShapedBack : shapedBack
65
71
66− enabled: false
72+ UnityMenuModelPaths {
67− UbuntuNumberAnimation {
73+ id: paths
68− duration: UbuntuAnimation.SnapDuration
69− }
70− }
71
74
72− // delay enabling height behavior until the add transition is complete
75+ source: hints["x-canonical-private-menu-model"]
73− onOpacityChanged: if (opacity == 1) heightBehavior.enabled = true
74
76
75− MouseArea {
77+ busNameHint: "busName"
76− id: interactiveArea
78+ actionsHint: "actions"
79+ menuObjectPathHint: "menuPath"
80+ }
77
81
78− anchors.fill: contentColumn
82+ UnityMenuModel {
79− objectName: "interactiveArea"
83+ id: unityMenuModel
80− enabled: notification.type == Notification.Interactive
84+
81− onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
85+ busName: paths.busName
86+ actions: paths.actions
87+ menuObjectPath: paths.menuObjectPath
82− }
88+ }
83
89
84− Column {
90+ Behavior on implicitHeight {
85− id: contentColumn
91+ id: heightBehavior
86
92
87− anchors {
93+ enabled: false
88− left: parent.left
94+ UbuntuNumberAnimation {
89− right: parent.right
95+ duration: UbuntuAnimation.SnapDuration
90− top: parent.top
96+ }
91− margins: spacing
92 }
97 }
93
98
94− spacing: units.gu(1)
99+ // delay enabling height behavior until the add transition is complete
100+ onOpacityChanged: if (opacity == 1) heightBehavior.enabled = true
95
101
96− Row {
102+ MouseArea {
97− id: topRow
103+ id: interactiveArea
104+
105+ anchors.fill: contentColumn
106+ objectName: "interactiveArea"
107+ enabled: notification.type == Notification.Interactive
108+ onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
109+ }
110+
111+ Column {
112+ id: contentColumn
98
113
99− spacing: contentColumn.spacing
100 anchors {
114 anchors {
101 left: parent.left
115 left: parent.left
102 right: parent.right
116 right: parent.right
117+ top: parent.top
118+ margins: fullscreen ? 0 : spacing
103 }
119 }
104
120
105− ShapedIcon {
121+ spacing: units.gu(1)
106− id: icon
107
122
108− objectName: "icon"
123+ Row {
109− width: units.gu(6)
124+ id: topRow
110− height: units.gu(6)
111− shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
112− visible: iconSource !== undefined && iconSource != ""
113− }
114
125
115− Image {
126+ spacing: contentColumn.spacing
116− id: secondaryIcon
127+ anchors {
128+ left: parent.left
129+ right: parent.right
130+ }
117
131
118− objectName: "secondaryIcon"
132+ ShapedIcon {
119− width: units.gu(2)
133+ id: icon
120− height: units.gu(2)
121− visible: source !== undefined && source != ""
122− fillMode: Image.PreserveAspectCrop
123− }
124
134
125− Column {
135+ objectName: "icon"
126− id: labelColumn
136+ width: units.gu(6)
127− width: parent.width - x
137+ height: units.gu(6)
138+ shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
139+ visible: iconSource !== undefined && iconSource != ""
140+ }
128
141
129− anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
142+ Image {
143+ id: secondaryIcon
130
144
131− Label {
145+ objectName: "secondaryIcon"
132− id: summaryLabel
146+ width: units.gu(2)
147+ height: units.gu(2)
148+ visible: source !== undefined && source != ""
149+ fillMode: Image.PreserveAspectCrop
150+ }
133
151
152+ Column {
153+ id: labelColumn
154+ width: parent.width - x
155+
156+ anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
157+
158+ Label {
159+ id: summaryLabel
160+
134− objectName: "summaryLabel"
161+ objectName: "summaryLabel"
135− anchors {
162+ anchors {
136− left: parent.left
163+ left: parent.left
137− right: parent.right
164+ right: parent.right
165+ }
166+ fontSize: "medium"
167+ font.bold: true
168+ color: Theme.palette.selected.backgroundText
169+ elide: Text.ElideRight
138 }
170 }
139− fontSize: "medium"
140− font.bold: true
141− color: Theme.palette.selected.backgroundText
142− elide: Text.ElideRight
143− }
144
171
145− Label {
172+ Label {
146− id: bodyLabel
173+ id: bodyLabel
147
174
148− objectName: "bodyLabel"
175+ objectName: "bodyLabel"
149− anchors {
176+ anchors {
150− left: parent.left
177+ left: parent.left
151− right: parent.right
178+ right: parent.right
179+ }
180+ visible: body != ""
181+ fontSize: "small"
182+ color: Theme.palette.selected.backgroundText
183+ opacity: 0.6
184+ wrapMode: Text.WordWrap
185+ maximumLineCount: 10
186+ elide: Text.ElideRight
152 }
187 }
153− visible: body != ""
154− fontSize: "small"
155− color: Theme.palette.selected.backgroundText
156− opacity: 0.6
157− wrapMode: Text.WordWrap
158− maximumLineCount: 10
159− elide: Text.ElideRight
160 }
188 }
161 }
189 }
162− }
163
190
164− Column {
191+ Column {
165− objectName: "dialogListView"
192+ objectName: "dialogListView"
166− spacing: units.gu(2)
193+ spacing: units.gu(2)
167
194
168− visible: count > 0
195+ visible: count > 0
169
196
170− anchors.left: parent.left; anchors.right: parent.right
197+ anchors.left: parent.left; anchors.right: parent.right
198+ anchors.top: fullscreen ? parent.top : undefined
199+ anchors.bottom: fullscreen ? parent.bottom : undefined
171
200
172− Repeater {
201+ Repeater {
173− model: unityMenuModel
202+ model: unityMenuModel
174
203
175− NotificationMenuItemFactory {
204+ NotificationMenuItemFactory {
176− anchors.left: parent.left; anchors.right: parent.right
205+ anchors.left: parent.left; anchors.right: parent.right
177
206
178− menuModel: unityMenuModel
207+ menuModel: unityMenuModel
179− menuData: model
208+ menuData: model
180− menuIndex: index
209+ menuIndex: index
210+ }
181 }
211 }
182 }
212 }
183− }
184
213
185− Item {
214+ Item {
186− id: buttonRow
215+ id: buttonRow
187
216
188− objectName: "buttonRow"
217+ objectName: "buttonRow"
189− anchors {
218+ anchors {
190− left: parent.left
219+ left: parent.left
191− right: parent.right
220+ right: parent.right
192− }
221+ }
193− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
222+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
194− height: units.gu(5)
223+ height: units.gu(5)
195
224
196− property real buttonWidth: (width - contentColumn.spacing) / 2
225+ property real buttonWidth: (width - contentColumn.spacing) / 2
197− property bool expanded
226+ property bool expanded
198
227
199− Button {
228+ Button {
200− id: leftButton
229+ id: leftButton
201
230
202− objectName: "button1"
231+ objectName: "button1"
203− width: parent.expanded ? parent.width : parent.buttonWidth
232+ width: parent.expanded ? parent.width : parent.buttonWidth
204− anchors {
233+ anchors {
205− top: parent.top
234+ top: parent.top
206− bottom: parent.bottom
235+ bottom: parent.bottom
207− }
236+ }
208− text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
237+ text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
209− gradient: UbuntuColors.greyGradient
238+ gradient: UbuntuColors.greyGradient
210− onClicked: {
239+ onClicked: {
211− if (actionRepeater.count > 2) {
240+ if (actionRepeater.count > 2) {
212− buttonRow.expanded = !buttonRow.expanded
241+ buttonRow.expanded = !buttonRow.expanded
213− } else {
242+ } else {
214− notification.notification.invokeAction(actionRepeater.itemAt(1).actionId)
243+ notification.notification.invokeAction(actionRepeater.itemAt(1).actionId)
244+ }
245+ }
246+
247+ Behavior on width {
248+ UbuntuNumberAnimation {
249+ duration: UbuntuAnimation.SnapDuration
250+ }
215 }
251 }
216 }
252 }
217
253
218− Behavior on width {
254+ Button {
219− UbuntuNumberAnimation {
255+ id: rightButton
220− duration: UbuntuAnimation.SnapDuration
256+
257+ objectName: "button0"
258+ anchors {
259+ left: leftButton.right
260+ leftMargin: contentColumn.spacing
261+ right: parent.right
221 }
262 }
263+ text: notification.type == Notification.SnapDecision && actionRepeater.count >= 1 ? actionRepeater.itemAt(0).actionLabel : ""
264+ anchors {
265+ top: parent.top
266+ bottom: parent.bottom
267+ }
268+ gradient: notification.hints["x-canonical-private-button-tint"] == "true" ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
269+ visible: width > 0
270+ onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
222 }
271 }
223 }
272 }
224
273
225− Button {
274+ Column {
226− id: rightButton
227−
228− objectName: "button0"
275+ objectName: "buttonColumn"
276+ spacing: contentColumn.spacing
229 anchors {
277 anchors {
230− left: leftButton.right
278+ left: parent.left
231− leftMargin: contentColumn.spacing
232 right: parent.right
279 right: parent.right
233 }
280 }
234− text: notification.type == Notification.SnapDecision && actionRepeater.count >= 1 ? actionRepeater.itemAt(0).actionLabel : ""
235− anchors {
236− top: parent.top
237− bottom: parent.bottom
238− }
239− gradient: notification.hints["x-canonical-private-button-tint"] == "true" ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
240− visible: width > 0
241− onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
242− }
243− }
244
281
245− Column {
282+ // calculate initial position before Column takes over
246− objectName: "buttonColumn"
247− spacing: contentColumn.spacing
283+ y: buttonRow.y + buttonRow.height + contentColumn.spacing
248− anchors {
249− left: parent.left
250− right: parent.right
251− }
252
284
253− // calculate initial position before Column takes over
285+ visible: notification.type == Notification.SnapDecision && buttonRow.expanded
254− y: buttonRow.y + buttonRow.height + contentColumn.spacing
286+ height: buttonRow.expanded ? implicitHeight : 0
255
287
256− visible: notification.type == Notification.SnapDecision
288+ Repeater {
257− height: buttonRow.expanded ? implicitHeight : 0
289+ id: actionRepeater
258
290
259− Repeater {
291+ model: notification.actions
260− id: actionRepeater
292+ delegate: Loader {
293+ id: loader
261
294
262− model: notification.actions
295+ property string actionId: id
263− delegate: Loader {
296+ property string actionLabel: label
264− id: loader
265
297
266− property string actionId: id
298+ anchors {
267− property string actionLabel: label
299+ left: parent.left
300+ right: parent.right
301+ }
268
302
269− anchors {
303+ Component {
270− left: parent.left
304+ id: actionButton
271− right: parent.right
272− }
273
305
274− Component {
306+ Button {
275− id: actionButton
307+ objectName: "button" + index
308+ anchors {
309+ left: parent.left
310+ right: parent.right
311+ }
276
312
277− Button {
313+ text: loader.actionLabel
278− objectName: "button" + index
314+ height: units.gu(5)
279− anchors {
315+ gradient: UbuntuColors.greyGradient
280− left: parent.left
316+ onClicked: notification.notification.invokeAction(loader.actionId)
281− right: parent.right
282 }
317 }
283−
284− text: loader.actionLabel
285− height: units.gu(5)
286− gradient: UbuntuColors.greyGradient
287− onClicked: notification.notification.invokeAction(loader.actionId)
288 }
318 }
319+ sourceComponent: (index == 0 || index == 1) ? undefined : actionButton
289 }
320 }
290− sourceComponent: (index == 0 || index == 1) ? undefined : actionButton
291 }
321 }
292 }
322 }
293 }
323 }
Notifications/NotificationMenuItemFactory.qml+9−2
@@ -28,7 +28,6 @@ Loader {
28 property QtObject menuModel: null
28 property QtObject menuModel: null
29 property QtObject menuData: null
29 property QtObject menuData: null
30 property int menuIndex
30 property int menuIndex
31− property var notification
32
31
33 property var _map: {
32 property var _map: {
34 "com.canonical.snapdecision.textfield": textfield,
33 "com.canonical.snapdecision.textfield": textfield,
@@ -44,6 +43,10 @@ Loader {
44 }
43 }
45 }
44 }
46
45
46+ Component.onCompleted: {
47+ notification.fullscreen = menuData.type == "com.canonical.snapdecision.pinlock"
48+ }
49+
47 Component {
50 Component {
48 id: textfield
51 id: textfield
49
52
@@ -94,8 +97,12 @@ Loader {
94
97
95 Component {
98 Component {
96 id: pinLock
99 id: pinLock
97− PinLockscreen {
100+
101+ Lockscreen {
98 anchors.left: parent.left; anchors.right: parent.right
102 anchors.left: parent.left; anchors.right: parent.right
103+ height: notificationList.fullHeight
104+ placeholderText: i18n.tr("Please enter SIM PIN")
105+ background: shell.background
99
106
100 onEntered: {
107 onEntered: {
101 menuModel.changeState(menuIndex, passphrase);
108 menuModel.changeState(menuIndex, passphrase);
Notifications/Notifications.qml+3−1
@@ -24,7 +24,9 @@ ListView {
24 objectName: "notificationList"
24 objectName: "notificationList"
25 interactive: false
25 interactive: false
26
26
27− spacing: units.gu(.5)
27+ property real margin
28+ property real fullHeight
29+
28 delegate: Notification {
30 delegate: Notification {
29 objectName: "notification" + index
31 objectName: "notification" + index
30 anchors {
32 anchors {
Panel/Indicators/DefaultIndicatorPage.qml+1−1
@@ -172,7 +172,7 @@ Indicators.IndicatorBase {
172
172
173 Indicators.MenuItemFactory {
173 Indicators.MenuItemFactory {
174 id: factory
174 id: factory
175− menuModel: mainMenu.model
175+ menuModel: mainMenu.model ? mainMenu.model : null
176 }
176 }
177
177
178 Components.Label {
178 Components.Label {
Shell.qml+4−3
@@ -704,13 +704,14 @@ FocusScope {
704 id: notifications
704 id: notifications
705
705
706 model: NotificationBackend.Model
706 model: NotificationBackend.Model
707+ margin: units.gu(1)
708+ fullHeight: parent.height - panel.panelHeight
709+
707 anchors {
710 anchors {
708 top: parent.top
711 top: parent.top
709 right: parent.right
712 right: parent.right
710 bottom: parent.bottom
713 bottom: parent.bottom
711− leftMargin: units.gu(1)
712− rightMargin: units.gu(1)
713− topMargin: panel.panelHeight + units.gu(1)
714+ topMargin: panel.panelHeight
714 }
715 }
715 states: [
716 states: [
716 State {
717 State {
debian/changelog+26
@@ -1,3 +1,29 @@
1+unity8 (7.84+14.04.20131212-0ubuntu1) trusty; urgency=low
2+
3+ [ Michał Sawicz ]
4+ * Add PyDev project files for autopilot tests. Also tweak .bzrignore
5+ to not ignore generic Eclipse project definitions.
6+ * Retry unlocking the greeter three times.
7+ * Reduce code duplication and clean up CMakeLists and includes in
8+ indicator tests.
9+
10+ [ Nick Dedekind ]
11+ * Replaced indicator page dynamic menuSelected binding with Connection
12+ to listview selectedIndex property. (LP: #1243146)
13+ * Indicators close when menu items are activated. (LP: #1238182)
14+ * Fixed up connections for changes to model data. (LP: #1253810)
15+
16+ [ Albert Astals ]
17+ * dashItemSelected -> showDashHome Because we are not using the index
18+ at all in the upper layers.
19+ * Fix filtering colllapsing/expanding again Also the delegate creation
20+ range stuff flows up->down not down->up so rearrange the bindings.
21+
22+ [ Ubuntu daily release ]
23+ * Automatic snapshot from revision 590
24+
25+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 12 Dec 2013 21:41:19 +0000
26+
1unity8 (7.84+14.04.20131206.1-0ubuntu1) trusty; urgency=low
27unity8 (7.84+14.04.20131206.1-0ubuntu1) trusty; urgency=low
2
28
3 [ Michal Hruby ]
29 [ Michal Hruby ]
main.cpp−40
@@ -19,7 +19,6 @@
19
19
20// Qt
20// Qt
21#include <QtQuick/QQuickView>
21#include <QtQuick/QQuickView>
22−#include <QtGui/QIcon>
23#include <QtGui/QGuiApplication>
22#include <QtGui/QGuiApplication>
24#include <QtQml/QQmlEngine>
23#include <QtQml/QQmlEngine>
25#include <QtQml/QQmlContext>
24#include <QtQml/QQmlContext>
@@ -37,45 +36,6 @@
37
36
38#include <unity-mir/qmirserver.h>
37#include <unity-mir/qmirserver.h>
39
38
40−namespace {
41−
42−void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
43−{
44− QStringList importPathList = engine->importPathList();
45− for (int i = paths.count() -1; i >= 0; i--) {
46− // don't duplicate
47− const QString& path = paths[i];
48− QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
49− if (iter == importPathList.end()) {
50− engine->addImportPath(path);
51− }
52− }
53−}
54−
55−/* When you append and import path to the list of import paths it will be the *last*
56− place where Qt will search for QML modules.
57− The usual QQmlEngine::addImportPath() actually prepends the given path.*/
58−void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
59−{
60− QStringList importPathList = engine->importPathList();
61− Q_FOREACH(const QString& path, paths) {
62− // don't duplicate
63− QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
64− if (iter == importPathList.end()) {
65− importPathList.append(path);
66− }
67− }
68− engine->setImportPathList(importPathList);
69−}
70−
71−void resolveIconTheme() {
72− const char *ubuntuIconTheme = getenv("UBUNTU_ICON_THEME");
73− if (ubuntuIconTheme == NULL) {
74− ubuntuIconTheme = "ubuntu-mobile";
75− }
76− QIcon::setThemeName(ubuntuIconTheme);
77−}
78−} // namespace {
79
39
80int startShell(int argc, const char** argv, void* server)
40int startShell(int argc, const char** argv, void* server)
81{
41{
paths.h.in+39
@@ -23,6 +23,8 @@
23// Qt
23// Qt
24#include <QtCore/QCoreApplication>
24#include <QtCore/QCoreApplication>
25#include <QtCore/QDir>
25#include <QtCore/QDir>
26+#include <QtGui/QIcon>
27+#include <QtQml/QQmlEngine>
26#include <QStandardPaths>
28#include <QStandardPaths>
27
29
28inline bool isRunningInstalled() {
30inline bool isRunningInstalled() {
@@ -86,4 +88,41 @@ inline QString sourceDirectory() {
86 return QString("@CMAKE_SOURCE_DIR@/");
88 return QString("@CMAKE_SOURCE_DIR@/");
87}
89}
88
90
91+inline void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
92+{
93+ QStringList importPathList = engine->importPathList();
94+ for (int i = paths.count() -1; i >= 0; i--) {
95+ // don't duplicate
96+ const QString& path = paths[i];
97+ QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
98+ if (iter == importPathList.end()) {
99+ engine->addImportPath(path);
100+ }
101+ }
102+}
103+
104+/* When you append and import path to the list of import paths it will be the *last*
105+ place where Qt will search for QML modules.
106+ The usual QQmlEngine::addImportPath() actually prepends the given path.*/
107+inline void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
108+{
109+ QStringList importPathList = engine->importPathList();
110+ Q_FOREACH(const QString& path, paths) {
111+ // don't duplicate
112+ QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
113+ if (iter == importPathList.end()) {
114+ importPathList.append(path);
115+ }
116+ }
117+ engine->setImportPathList(importPathList);
118+}
119+
120+inline void resolveIconTheme() {
121+ const char *ubuntuIconTheme = getenv("UBUNTU_ICON_THEME");
122+ if (ubuntuIconTheme == NULL) {
123+ ubuntuIconTheme = "ubuntu-mobile";
124+ }
125+ QIcon::setThemeName(ubuntuIconTheme);
126+}
127+
89#endif
128#endif
po/ast.po+6−6
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-03 14:02+0000\n"
11+"PO-Revision-Date: 2013-12-11 20:45+0000\n"
12"Last-Translator: ivarela <ivarela@ubuntu.com>\n"
12"Last-Translator: ivarela <ivarela@ubuntu.com>\n"
13"Language-Team: Asturian <ast@li.org>\n"
13"Language-Team: Asturian <ast@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-11-30 05:33+0000\n"
18+"X-Launchpad-Export-Date: 2013-12-12 06:02+0000\n"
19−"X-Generator: Launchpad (build 16856)\n"
19+"X-Generator: Launchpad (build 16869)\n"
20
20
21#: Components/EdgeDemoOverlay.qml:151
21#: Components/EdgeDemoOverlay.qml:151
22msgid "Skip intro"
22msgid "Skip intro"
@@ -141,7 +141,7 @@ msgstr "Falando…"
141
141
142#: Notifications/NotificationMenuItemFactory.qml:89
142#: Notifications/NotificationMenuItemFactory.qml:89
143msgid "Show password"
143msgid "Show password"
144−msgstr ""
144+msgstr "Amosar contraseña"
145
145
146#: Panel/SearchIndicator.qml:27
146#: Panel/SearchIndicator.qml:27
147msgid "Search"
147msgid "Search"
@@ -150,11 +150,11 @@ msgstr "Guetar"
150#: plugins/Unity/Launcher/launcheritem.cpp:43
150#: plugins/Unity/Launcher/launcheritem.cpp:43
151#: plugins/Unity/Launcher/launcheritem.cpp:73
151#: plugins/Unity/Launcher/launcheritem.cpp:73
152msgid "Lock to Launcher"
152msgid "Lock to Launcher"
153−msgstr ""
153+msgstr "Caltener nel Llanzador"
154
154
155#: plugins/Unity/Launcher/launcheritem.cpp:73
155#: plugins/Unity/Launcher/launcheritem.cpp:73
156msgid "Unlock from Launcher"
156msgid "Unlock from Launcher"
157−msgstr ""
157+msgstr "Nun caltener nel llanzador"
158
158
159#: Shell.qml:439
159#: Shell.qml:439
160#, qt-format
160#, qt-format
po/my.po+10−10
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-09 11:35+0000\n"
11+"PO-Revision-Date: 2013-12-12 11:12+0000\n"
12"Last-Translator: Pyae Sone <Unknown>\n"
12"Last-Translator: Pyae Sone <Unknown>\n"
13"Language-Team: Burmese <my@li.org>\n"
13"Language-Team: Burmese <my@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=1; plural=0;\n"
17"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2013-11-30 05:33+0000\n"
18+"X-Launchpad-Export-Date: 2013-12-13 06:46+0000\n"
19−"X-Generator: Launchpad (build 16856)\n"
19+"X-Generator: Launchpad (build 16869)\n"
20
20
21#: Components/EdgeDemoOverlay.qml:151
21#: Components/EdgeDemoOverlay.qml:151
22msgid "Skip intro"
22msgid "Skip intro"
@@ -104,16 +104,16 @@ msgstr "မှတ်ချက်များ-"
104
104
105#: Greeter/Lockscreen.qml:149
105#: Greeter/Lockscreen.qml:149
106msgid "Emergency Call"
106msgid "Emergency Call"
107−msgstr ""
107+msgstr "အရေးပေါ်ခေါ်မည်"
108
108
109#: Greeter/PassphraseLockscreen.qml:59
109#: Greeter/PassphraseLockscreen.qml:59
110#, qt-format
110#, qt-format
111msgid "Hello %1"
111msgid "Hello %1"
112−msgstr ""
112+msgstr "ဟဲလို %1"
113
113
114#: Greeter/PassphraseLockscreen.qml:59
114#: Greeter/PassphraseLockscreen.qml:59
115msgid "Hello"
115msgid "Hello"
116−msgstr ""
116+msgstr "ဟဲလို"
117
117
118#: Hud/HudParametrizedActionsPage.qml:132
118#: Hud/HudParametrizedActionsPage.qml:132
119msgid "Confirm"
119msgid "Confirm"
@@ -137,7 +137,7 @@ msgstr "ပြောနေသည်"
137
137
138#: Notifications/NotificationMenuItemFactory.qml:89
138#: Notifications/NotificationMenuItemFactory.qml:89
139msgid "Show password"
139msgid "Show password"
140−msgstr ""
140+msgstr "စကားဝှက်ကိုပြ"
141
141
142#: Panel/SearchIndicator.qml:27
142#: Panel/SearchIndicator.qml:27
143msgid "Search"
143msgid "Search"
@@ -146,13 +146,13 @@ msgstr "ရှာဖွေ"
146#: plugins/Unity/Launcher/launcheritem.cpp:43
146#: plugins/Unity/Launcher/launcheritem.cpp:43
147#: plugins/Unity/Launcher/launcheritem.cpp:73
147#: plugins/Unity/Launcher/launcheritem.cpp:73
148msgid "Lock to Launcher"
148msgid "Lock to Launcher"
149−msgstr ""
149+msgstr "Launcher တွင်ထားမည်"
150
150
151#: plugins/Unity/Launcher/launcheritem.cpp:73
151#: plugins/Unity/Launcher/launcheritem.cpp:73
152msgid "Unlock from Launcher"
152msgid "Unlock from Launcher"
153−msgstr ""
153+msgstr "Launcher မှဖြုတ်မည်"
154
154
155#: Shell.qml:439
155#: Shell.qml:439
156#, qt-format
156#, qt-format
157msgid "Please enter %1"
157msgid "Please enter %1"
158−msgstr ""
158+msgstr "%1ကိုရိုက်ထည့်ပါ"
po/tr.po+7−7
@@ -8,15 +8,15 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
10"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-01 13:21+0000\n"
11+"PO-Revision-Date: 2013-12-12 16:06+0000\n"
12−"Last-Translator: Volkan Gezer <Unknown>\n"
12+"Last-Translator: Arda Ünlü <aarda.uunlu@gmail.com>\n"
13"Language-Team: Turkish <tr@li.org>\n"
13"Language-Team: Turkish <tr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
17"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-11-30 05:33+0000\n"
18+"X-Launchpad-Export-Date: 2013-12-13 06:46+0000\n"
19−"X-Generator: Launchpad (build 16856)\n"
19+"X-Generator: Launchpad (build 16869)\n"
20
20
21#: Components/EdgeDemoOverlay.qml:151
21#: Components/EdgeDemoOverlay.qml:151
22msgid "Skip intro"
22msgid "Skip intro"
@@ -138,7 +138,7 @@ msgstr "Konuşuyor..."
138
138
139#: Notifications/NotificationMenuItemFactory.qml:89
139#: Notifications/NotificationMenuItemFactory.qml:89
140msgid "Show password"
140msgid "Show password"
141−msgstr ""
141+msgstr "Parolayı göster"
142
142
143#: Panel/SearchIndicator.qml:27
143#: Panel/SearchIndicator.qml:27
144msgid "Search"
144msgid "Search"
@@ -147,11 +147,11 @@ msgstr "Ara"
147#: plugins/Unity/Launcher/launcheritem.cpp:43
147#: plugins/Unity/Launcher/launcheritem.cpp:43
148#: plugins/Unity/Launcher/launcheritem.cpp:73
148#: plugins/Unity/Launcher/launcheritem.cpp:73
149msgid "Lock to Launcher"
149msgid "Lock to Launcher"
150−msgstr ""
150+msgstr "Başlatıcıya Sabitle"
151
151
152#: plugins/Unity/Launcher/launcheritem.cpp:73
152#: plugins/Unity/Launcher/launcheritem.cpp:73
153msgid "Unlock from Launcher"
153msgid "Unlock from Launcher"
154−msgstr ""
154+msgstr "Başlatıcıdan Ayır"
155
155
156#: Shell.qml:439
156#: Shell.qml:439
157#, qt-format
157#, qt-format
src/Panel/Indicators/client/indicatorsclient.cpp−35
@@ -26,41 +26,6 @@
26#include <QQmlEngine>
26#include <QQmlEngine>
27#include <QDebug>
27#include <QDebug>
28
28
29−namespace {
30−
31−void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
32−{
33− QStringList importPathList = engine->importPathList();
34− for (int i = paths.count()-1; i >= 0; i--) {
35− importPathList.prepend(paths[i]);
36− }
37− engine->setImportPathList(importPathList);
38−}
39−
40−/* When you append and import path to the list of import paths it will be the *last*
41− place where Qt will search for QML modules.
42− The usual QQmlEngine::addImportPath() actually prepends the given path.*/
43−void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
44−{
45− QStringList importPathList = engine->importPathList();
46− Q_FOREACH(const QString& path, paths) {
47− // don't duplicate
48− QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
49− if (iter == importPathList.end()) {
50− importPathList.append(path);
51− }
52− }
53− engine->setImportPathList(importPathList);
54−}
55−
56−void resolveIconTheme() {
57− QString ubuntuIconTheme = getenv("UBUNTU_ICON_THEME");
58− if (ubuntuIconTheme.isEmpty()) {
59− QIcon::setThemeName("ubuntu-mobile");
60− }
61−}
62−} // namespace
63−
64IndicatorsClient::IndicatorsClient(int &argc, char **argv)
29IndicatorsClient::IndicatorsClient(int &argc, char **argv)
65 : QObject(0),
30 : QObject(0),
66 m_view(0)
31 m_view(0)
tests/autopilot/.projectnew file+17
@@ -0,0 +1,17 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<projectDescription>
3+ <name>Unity8 Autopilot</name>
4+ <comment></comment>
5+ <projects>
6+ </projects>
7+ <buildSpec>
8+ <buildCommand>
9+ <name>org.python.pydev.PyDevBuilder</name>
10+ <arguments>
11+ </arguments>
12+ </buildCommand>
13+ </buildSpec>
14+ <natures>
15+ <nature>org.python.pydev.pythonNature</nature>
16+ </natures>
17+</projectDescription>
tests/autopilot/.pydevprojectnew file+8
@@ -0,0 +1,8 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<?eclipse-pydev version="1.0"?><pydev_project>
3+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
4+<path>/Unity8 Autopilot</path>
5+</pydev_pathproperty>
6+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
7+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
8+</pydev_project>
tests/autopilot/unity8/process_helpers.py+17−1
@@ -69,7 +69,23 @@ def unlock_unity(unity_proxy_obj=None):
69 greeter = main_window.get_greeter()
69 greeter = main_window.get_greeter()
70 if greeter.created == False:
70 if greeter.created == False:
71 raise RuntimeWarning("Greeter appears to be already unlocked.")
71 raise RuntimeWarning("Greeter appears to be already unlocked.")
72+
73+ # Because of potential input jerkiness under heavy load,
74+ # retry unlocking the greeter two times.
75+ # https://bugs.launchpad.net/ubuntu/+bug/1260113
76+
77+ retries = 3
78+ while retries > 0:
79+ try:
72− greeter.swipe()
80+ greeter.swipe()
81+ except AssertionError:
82+ retries -= 1
83+ if retries == 0:
84+ raise
85+ logger.info("Failed to unlock greeter, trying again...")
86+ else:
87+ logger.info("Greeter unlocked, continuing.")
88+ break
73
89
74
90
75def restart_unity_with_testability(*args):
91def restart_unity_with_testability(*args):
tests/autopilot/unity8/shell/tests/test_notifications.py+1−1
@@ -65,7 +65,7 @@ class NotificationsBase(UnityTestCase):
65 def _get_notifications_list(self):
65 def _get_notifications_list(self):
66 main_view = self.main_window.get_qml_view()
66 main_view = self.main_window.get_qml_view()
67 return main_view.select_single(
67 return main_view.select_single(
68− "QQuickListView",
68+ "Notifications",
69 objectName='notificationList'
69 objectName='notificationList'
70 )
70 )
71
71
tests/plugins/Unity/Indicators/menucontentactivatortest.cpp−1
@@ -18,7 +18,6 @@
18 */
18 */
19
19
20#include "menucontentactivator.h"
20#include "menucontentactivator.h"
21−#include "paths.h"
22
21
23#include <QtTest>
22#include <QtTest>
24#include <QDebug>
23#include <QDebug>
tests/plugins/Unity/Indicators/unitymenumodelstacktest.cpp−1
@@ -18,7 +18,6 @@
18 */
18 */
19
19
20#include "indicatorsmanager.h"
20#include "indicatorsmanager.h"
21−#include "paths.h"
22#include "unitymenumodelstack.h"
21#include "unitymenumodelstack.h"
23
22
24#include <QtTest>
23#include <QtTest>
tests/qmltests/Notifications/tst_Notifications.qml+3−4
@@ -140,8 +140,10 @@ Row {
140 Notifications {
140 Notifications {
141 id: notifications
141 id: notifications
142
142
143+ margin: units.gu(1)
144+ fullHeight: parent.height
145+
143 anchors.fill: parent
146 anchors.fill: parent
144− anchors.margins: units.gu(1)
145 model: mockModel
147 model: mockModel
146 }
148 }
147 }
149 }
@@ -401,9 +403,6 @@ Row {
401 actionSpy.wait()
403 actionSpy.wait()
402 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
404 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
403 compare(clickThroughSpy.count, 0, "click on interactive notification fell through")
405 compare(clickThroughSpy.count, 0, "click on interactive notification fell through")
404− } else {
405− mouseClick(notification, notification.width / 2, notification.height / 2)
406− clickThroughSpy.wait()
407 }
406 }
408
407
409 compare(secondaryIcon.visible, data.secondaryIconVisible, "secondary-icon visibility is incorrect")
408 compare(secondaryIcon.visible, data.secondaryIconVisible, "secondary-icon visibility is incorrect")