on xenial help sign in
Merge from trunk
d196328Michael Terry
Dash/graphics/phone/home.pngdeleted

Binary file not shown.

Dash/graphics/phone/music.pngdeleted

Binary file not shown.

Dash/graphics/phone/videos.pngdeleted

Binary file not shown.

Dash/graphics/tablet/apps.pngdeleted

Binary file not shown.

Dash/graphics/tablet/home.pngdeleted

Binary file not shown.

Dash/graphics/tablet/music.pngdeleted

Binary file not shown.

Dash/graphics/tablet/people.pngdeleted

Binary file not shown.

Dash/graphics/tablet/videos.pngdeleted

Binary file not shown.

Greeter/Greeter.qml+2
@@ -26,6 +26,8 @@ Showable {
26 enabled: shown
26 enabled: shown
27 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
27 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
28
28
29+ property url defaultBackground
30+
29 // 1 when fully shown and 0 when fully hidden
31 // 1 when fully shown and 0 when fully hidden
30 property real showProgress: MathLocal.clamp((width + x) / width, 0, 1)
32 property real showProgress: MathLocal.clamp((width + x) / width, 0, 1)
31
33
Greeter/GreeterContent.qml+4−3
@@ -40,11 +40,12 @@ MouseArea {
40 color: "black"
40 color: "black"
41 }
41 }
42
42
43− property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : shell.defaultBackground
43+ property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
44 onBackgroundValueChanged: wallpaper.source = backgroundValue
44 onBackgroundValueChanged: wallpaper.source = backgroundValue
45
45
46 CrossFadeImage {
46 CrossFadeImage {
47 id: wallpaper
47 id: wallpaper
48+ objectName: "wallpaper"
48 anchors.fill: parent
49 anchors.fill: parent
49 fadeInFirst: false
50 fadeInFirst: false
50 }
51 }
@@ -58,8 +59,8 @@ MouseArea {
58 sourceSize.height: 0
59 sourceSize.height: 0
59 sourceSize.width: 0
60 sourceSize.width: 0
60 onStatusChanged: {
61 onStatusChanged: {
61− if (status == Image.Error && source != shell.defaultBackground) {
62+ if (status == Image.Error && source != greeter.defaultBackground) {
62− wallpaper.source = shell.defaultBackground
63+ wallpaper.source = greeter.defaultBackground
63 }
64 }
64 }
65 }
65 }
66 }
Launcher/Launcher.qml+2−2
@@ -192,12 +192,12 @@ Item {
192
192
193 direction: Direction.Rightwards
193 direction: Direction.Rightwards
194
194
195− enabled: root.available && root.state !== "visible"
195+ enabled: root.available
196 width: root.dragAreaWidth
196 width: root.dragAreaWidth
197 height: root.height
197 height: root.height
198
198
199 onTouchXChanged: {
199 onTouchXChanged: {
200− if (status !== DirectionalDragArea.Recognized)
200+ if (status !== DirectionalDragArea.Recognized || launcher.state == "visible")
201 return;
201 return;
202
202
203 // When the gesture finally gets recognized, the finger will likely be
203 // When the gesture finally gets recognized, the finger will likely be
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}
Shell.qml+3−1
@@ -260,7 +260,7 @@ FocusScope {
260 property bool fullyShown: shown && x == 0 && parent.x == 0
260 property bool fullyShown: shown && x == 0 && parent.x == 0
261 property bool fullyHidden: !shown && x == width
261 property bool fullyHidden: !shown && x == width
262 available: !greeter.shown
262 available: !greeter.shown
263− hides: [launcher, panel.indicators]
263+ hides: [panel.indicators]
264 shown: false
264 shown: false
265 opacity: 1.0
265 opacity: 1.0
266 showAnimation: StandardAnimation { property: "x"; duration: 350; to: 0; easing.type: Easing.OutCubic }
266 showAnimation: StandardAnimation { property: "x"; duration: 350; to: 0; easing.type: Easing.OutCubic }
@@ -461,6 +461,8 @@ FocusScope {
461 hides: [launcher, panel.indicators, hud]
461 hides: [launcher, panel.indicators, hud]
462 shown: true
462 shown: true
463
463
464+ defaultBackground: shell.background
465+
464 y: panel.panelHeight
466 y: panel.panelHeight
465 width: parent.width
467 width: parent.width
466 height: parent.height - panel.panelHeight
468 height: parent.height - panel.panelHeight
debian/changelog+14
@@ -1,3 +1,17 @@
1+unity8 (7.81.3+13.10.20130916-0ubuntu1) saucy; urgency=low
2+
3+ [ Michael Zanetti ]
4+ * allow left edge gesture to minimize apps even when launcher is
5+ already visible.
6+ * Don't hide the launcher on changes in the stages.
7+ * ssh is now installed per default, but it's set to manual in the
8+ ssh.override.
9+
10+ [ Ubuntu daily release ]
11+ * Automatic snapshot from revision 320
12+
13+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 16 Sep 2013 11:49:28 +0000
14+
1unity8 (7.81.3+13.10.20130912-0ubuntu1) saucy; urgency=low
15unity8 (7.81.3+13.10.20130912-0ubuntu1) saucy; urgency=low
2
16
3 [ Michael Zanetti ]
17 [ Michael Zanetti ]
plugins/Unity/Launcher/backend/launcherbackend.cpp+8−9
@@ -132,11 +132,7 @@ QString LauncherBackend::icon(const QString &appId) const
132 }
132 }
133 }
133 }
134
134
135− QFileInfo info(iconName);
136− if (info.exists()) {
137− return info.absoluteFilePath();
138− }
139− return "image://theme/" + iconName;
135+ return iconName;
140}
136}
141
137
142bool LauncherBackend::isPinned(const QString &appId) const
138bool LauncherBackend::isPinned(const QString &appId) const
@@ -296,15 +292,18 @@ LauncherBackendItem* LauncherBackend::parseDesktopFile(const QString &desktopFil
296{
292{
297 QSettings settings(desktopFile, QSettings::IniFormat);
293 QSettings settings(desktopFile, QSettings::IniFormat);
298
294
299−
300 LauncherBackendItem* item = new LauncherBackendItem();
295 LauncherBackendItem* item = new LauncherBackendItem();
301 item->desktopFile = desktopFile;
296 item->desktopFile = desktopFile;
302 item->displayName = settings.value("Desktop Entry/Name").toString();
297 item->displayName = settings.value("Desktop Entry/Name").toString();
303
298
304− if (settings.contains("Desktop Entry/Path")) {
305− item->icon = settings.value("Desktop Entry/Path").toString() + "/" + settings.value("Desktop Entry/Icon").toString();
299+ QString iconString = settings.value("Desktop Entry/Icon").toString();
300+ QString pathString = settings.value("Desktop Entry/Path").toString();
301+ if (QFileInfo(iconString).exists()) {
302+ item->icon = QFileInfo(iconString).absoluteFilePath();
303+ } else if (QFileInfo(pathString + '/' + iconString).exists()) {
304+ item->icon = pathString + '/' + iconString;
306 } else {
305 } else {
307− item->icon = settings.value("Desktop Entry/Icon").toString();
306+ item->icon = "image://theme/" + iconString;
308 }
307 }
309 item->pinned = false;
308 item->pinned = false;
310 return item;
309 return item;
run_on_device+2−1
@@ -65,8 +65,9 @@ setup_adb_forwarding() {
65}
65}
66
66
67install_dependencies() {
67install_dependencies() {
68+ exec_with_adb rm /etc/init/ssh.override
69+ exec_with_adb service ssh start
68 exec_with_adb apt-get update
70 exec_with_adb apt-get update
69− exec_with_adb apt-get -y install openssh-server
70 exec_with_ssh $SUDO apt-get -y install build-essential rsync bzr ccache gdb ninja-build devscripts equivs
71 exec_with_ssh $SUDO apt-get -y install build-essential rsync bzr ccache gdb ninja-build devscripts equivs
71}
72}
72
73
tests/mocks/AccountsService/AccountsService.cpp+9−2
@@ -19,7 +19,8 @@
19#include "AccountsService.h"
19#include "AccountsService.h"
20
20
21AccountsService::AccountsService(QObject* parent)
21AccountsService::AccountsService(QObject* parent)
22− : QObject(parent)
22+ : QObject(parent),
23+ m_backgroundFile(TOP_SRCDIR "/graphics/phone_background.jpg")
23{
24{
24}
25}
25
26
@@ -45,5 +46,11 @@ void AccountsService::setDemoEdges(bool demoEdges)
45
46
46QString AccountsService::getBackgroundFile()
47QString AccountsService::getBackgroundFile()
47{
48{
48− return TOP_SRCDIR "/graphics/phone_background.jpg";
49+ return m_backgroundFile;
50+}
51+
52+void AccountsService::setBackgroundFile(const QString &backgroundFile)
53+{
54+ m_backgroundFile = backgroundFile;
55+ backgroundFileChanged();
49}
56}
tests/mocks/AccountsService/AccountsService.h+5
@@ -37,6 +37,7 @@ class AccountsService: public QObject
37 NOTIFY demoEdgesChanged)
37 NOTIFY demoEdgesChanged)
38 Q_PROPERTY (QString backgroundFile
38 Q_PROPERTY (QString backgroundFile
39 READ getBackgroundFile
39 READ getBackgroundFile
40+ WRITE setBackgroundFile // only available in mock
40 NOTIFY backgroundFileChanged)
41 NOTIFY backgroundFileChanged)
41
42
42public:
43public:
@@ -47,11 +48,15 @@ public:
47 bool getDemoEdges();
48 bool getDemoEdges();
48 void setDemoEdges(bool demoEdges);
49 void setDemoEdges(bool demoEdges);
49 QString getBackgroundFile();
50 QString getBackgroundFile();
51+ void setBackgroundFile(const QString &backgroundFile);
50
52
51Q_SIGNALS:
53Q_SIGNALS:
52 void userChanged();
54 void userChanged();
53 void demoEdgesChanged();
55 void demoEdgesChanged();
54 void backgroundFileChanged();
56 void backgroundFileChanged();
57+
58+private:
59+ QString m_backgroundFile;
55};
60};
56
61
57#endif
62#endif
tests/plugins/Unity/Launcher/click-icon.svgnew file

No changes to the content.

tests/plugins/Unity/Launcher/launcherbackendtest.cpp+10−2
@@ -26,6 +26,15 @@ class LauncherBackendTest : public QObject
26 Q_OBJECT
26 Q_OBJECT
27
27
28private Q_SLOTS:
28private Q_SLOTS:
29+
30+ void initTestCase()
31+ {
32+ // As we want to test absolute file paths in the .desktop file, we need to modify the
33+ // sample file and replace the path in there with the current build dir.
34+ QSettings settings(QDir::currentPath() + "/click-icon.desktop", QSettings::IniFormat);
35+ settings.setValue("Desktop Entry/Path", QDir::currentPath());
36+ }
37+
29 void testFileNames()
38 void testFileNames()
30 {
39 {
31 LauncherBackend backend(false);
40 LauncherBackend backend(false);
@@ -66,8 +75,7 @@ private Q_SLOTS:
66 QTest::newRow("fallback on theme") << "abs-icon" << "image://theme//path/to/icon.png";
75 QTest::newRow("fallback on theme") << "abs-icon" << "image://theme//path/to/icon.png";
67
76
68 // Click packages have a relative icon path but an absolute path as a separate entry
77 // Click packages have a relative icon path but an absolute path as a separate entry
69− // As we don't want to rely on a click app being installed for the test, accept it with the image://theme fallback
70− QTest::newRow("click package icon") << "click-icon" << "image://theme//path/to/some/click/app/click-icon.svg";
78+ QTest::newRow("click package icon") << "click-icon" << QDir::currentPath() + "/click-icon.svg";
71 }
79 }
72
80
73 void testIcon() {
81 void testIcon() {
tests/qmltests/Greeter/tst_Phone.qml+19−1
@@ -18,8 +18,8 @@ import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../Greeter"
20import "../../../Greeter"
21+import AccountsService 0.1
21import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
22−import LightDM 0.1 as LightDM
23import Unity.Test 0.1 as UT
23import Unity.Test 0.1 as UT
24
24
25Item {
25Item {
@@ -32,6 +32,8 @@ Item {
32 height: parent.height
32 height: parent.height
33 x: 0; y: 0
33 x: 0; y: 0
34
34
35+ defaultBackground: "../../../graphics/phone_background.jpg"
36+
35 property int minX: 0
37 property int minX: 0
36
38
37 onXChanged: {
39 onXChanged: {
@@ -102,5 +104,21 @@ Item {
102 // Wait until we're back to 0
104 // Wait until we're back to 0
103 tryCompareFunction(function() { return greeter.x;}, 0);
105 tryCompareFunction(function() { return greeter.x;}, 0);
104 }
106 }
107+
108+ function test_wallpaper_data() {
109+ return [
110+ {tag: "set", accounts: "../tests/data/unity/backgrounds/blue.png", expected: "blue.png"},
111+ {tag: "unset", accounts: "", expected: "background.jpg"},
112+ {tag: "invalid", accounts: "invalid", expected: "background.jpg"},
113+ ]
114+ }
115+
116+ function test_wallpaper(data) {
117+ var loader = findChild(greeter, "greeterContentLoader")
118+ var wallpaper = findChild(loader.item, "wallpaper")
119+ AccountsService.backgroundFile = data.accounts
120+ tryCompareFunction(function() { return wallpaper.source.toString().indexOf(data.expected) !== -1; }, true)
121+ tryCompare(wallpaper, "status", Image.Ready)
122+ }
105 }
123 }
106}
124}
tests/qmltests/tst_Shell.qml+25−1
@@ -114,6 +114,26 @@ Item {
114 checkRightEdgeDragWithNoRunningApps();
114 checkRightEdgeDragWithNoRunningApps();
115 }
115 }
116
116
117+ function test_leftEdgeDrag_data() {
118+ return [
119+ {tag: "without launcher", revealLauncher: false},
120+ {tag: "with launcher", revealLauncher: true},
121+ ];
122+ }
123+
124+ function test_leftEdgeDrag(data) {
125+ dragLauncherIntoView();
126+ tapOnAppIconInLauncher();
127+ waitUntilApplicationWindowIsFullyVisible();
128+
129+ if (data.revealLauncher) {
130+ dragLauncherIntoView();
131+ }
132+
133+ swipeFromLeftEdge();
134+ waitUntilApplicationWindowIsFullyHidden();
135+ }
136+
117 function test_suspend() {
137 function test_suspend() {
118 var greeter = findChild(shell, "greeter");
138 var greeter = findChild(shell, "greeter");
119
139
@@ -223,7 +243,11 @@ Item {
223 function dragLauncherIntoView() {
243 function dragLauncherIntoView() {
224 var launcherPanel = findChild(shell, "launcherPanel");
244 var launcherPanel = findChild(shell, "launcherPanel");
225 verify(launcherPanel.x = - launcherPanel.width);
245 verify(launcherPanel.x = - launcherPanel.width);
226− swipeFromLeftEdge();
246+
247+ var touchStartX = 2;
248+ var touchStartY = shell.height / 2;
249+ touchFlick(shell, touchStartX, touchStartY, launcherPanel.width + units.gu(1), touchStartY);
250+
227 tryCompare(launcherPanel, "x", 0);
251 tryCompare(launcherPanel, "x", 0);
228 }
252 }
229
253