Merge lp:~cimi/unity8/preview-sharing into lp:unity8

Proposed by Andrea Cimitan on 2015-10-02
Status: Merged
Approved by: Albert Astals Cid on 2015-11-04
Approved revision: 2005
Merged at revision: 2045
Proposed branch: lp:~cimi/unity8/preview-sharing
Merge into: lp:unity8
Prerequisite: lp:~cimi/unity8/wide-preview-zoomable-videoplayback
Diff against target: 793 lines (+336/-169)
8 files modified
debian/control (+1/-0)
po/unity8.pot (+102/-169)
qml/Dash/Previews/PreviewMediaToolbar.qml (+36/-0)
qml/Dash/Previews/PreviewSharing.qml (+105/-0)
qml/Dash/Previews/PreviewVideoPlayback.qml (+10/-0)
qml/Dash/Previews/PreviewZoomableImage.qml (+10/-0)
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Dash/Previews/tst_PreviewSharing.qml (+71/-0)
To merge this branch: bzr merge lp:~cimi/unity8/preview-sharing
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2015-11-05
Albert Astals Cid (community) Approve on 2015-11-04
Michał Sawicz Needs Fixing on 2015-10-26
Paweł Stołowski 2015-10-02 Approve on 2015-10-13
Review via email: mp+273233@code.launchpad.net

Commit Message

Add sharing widget to zoomable image and video playback

Description of the Change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
nope, but unity-api needs to document the new scope properties
 * Did you perform an exploratory manual test run of your code change and any related functionality?
y
 * Did you make sure that your branch does not contain spurious tags?
y
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
n/a
 * If you changed the UI, has there been a design review?
y

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1995
http://jenkins.qa.ubuntu.com/job/unity8-ci/6411/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4478
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/790
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1123
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/442
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1018
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1019
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/650
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/651
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3643
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4475
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4475/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23907
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/477
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/790
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/790/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23908

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6411/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1996
http://jenkins.qa.ubuntu.com/job/unity8-ci/6419/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4495
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/798
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1131
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/450
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1026
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1027
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/658
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/659
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3653
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4492
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4492/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23944
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/481
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/798
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/798/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23943

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6419/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1997
http://jenkins.qa.ubuntu.com/job/unity8-ci/6420/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4502
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/799
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1132
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/451
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1027
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1028
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/659
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/660
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3659
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4499
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4499/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23954
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/482
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/799
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/799/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/23953

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6420/rebuild

review: Needs Fixing (continuous-integration)
Paweł Stołowski (stolowski) wrote :

Looks good overall, just a couple of inline comments.

review: Needs Information
Michael Zanetti (mzanetti) wrote :

Some replies/discussion to Pawel's comments.

Paweł Stołowski (stolowski) wrote :

See comment inline.

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1998
http://jenkins.qa.ubuntu.com/job/unity8-ci/6453/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4608
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/835
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1165
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/484
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1060
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1061
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/692
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/693
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3729
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4605
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4605/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24152
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/499
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/835
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/835/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24153

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6453/rebuild

review: Needs Fixing (continuous-integration)
Paweł Stołowski (stolowski) wrote :

<pstolowski> kenvandine, hello, can you take a quick look at comments re content type here: https://code.launchpad.net/~cimi/unity8/preview-sharing/+merge/273233 ? is content-hub going to support mimetypes in near future?
<kenvandine> pstolowski, we want to switch to using mimetypes, but it isn't on the near term roadmap
<pstolowski> kenvandine, if you switch, do you plan to still support the old content types for existing clients (i'm not sure it's really possible though)?
<kenvandine> pstolowski, we'll have to for some time
<kenvandine> have to deprecate it

With that I'm not going to insist on any remapping of mime types (I'm not thrilled by the idea of doing it in the shell, just wanted to rise the concern). We can use c-h content types and when they switch to mime types, update affected scopes (and according to the above, old content types will still be supported for some time before deprecating).

So, it looks good to me, +1. Thanks!

review: Approve
Albert Astals Cid (aacid) wrote :

make pot_file to update the .pot file

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

sourceComponent: root.visible ? contentPeerComponent : undefined

Maybe just use the active property for this?

review: Needs Information
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1999
http://jenkins.qa.ubuntu.com/job/unity8-ci/6490/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4705
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/872
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1202
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/518
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1097
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1098
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/729
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/730
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3798
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4702
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4702/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24352
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/516
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/872
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/872/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24351

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6490/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

visible: sharingWidget.url != ""

this should probably be sharingWidget.visible and delegate to sharingWidget what it wants to be visible (you're already doing the url comparison but maybe in the future may be more things)

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

I also have the feeling that it may make sense to make the "toolbar" a reusable component instead of copying the code. What do you think?

review: Needs Information
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2000
http://jenkins.qa.ubuntu.com/job/unity8-ci/6502/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4744
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-wily-touch/884
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1214
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-wily/530
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1109
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1110
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-amd64-ci/741
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-wily-i386-ci/742
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3829
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4741
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4741/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24424
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-wily-mako/522
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/884
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-wily-armhf/884/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24423

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6502/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass? If not, please explain why.
enough

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Michał Sawicz (saviq) wrote :

Please bump to 1.3:

/«BUILDDIR»/unity8-8.11+16.04.20151026/qml/Dash/Previews/PreviewMediaToolbar.qml: bad import version in line 17
/«BUILDDIR»/unity8-8.11+16.04.20151026/qml/Dash/Previews/PreviewMediaToolbar.qml: bad import version in line 18
/«BUILDDIR»/unity8-8.11+16.04.20151026/qml/Dash/Previews/PreviewSharing.qml: bad import version in line 18
/«BUILDDIR»/unity8-8.11+16.04.20151026/tests/qmltests/Dash/Previews/tst_PreviewSharing.qml: bad import version in line 17
/«BUILDDIR»/unity8-8.11+16.04.20151026/tests/qmltests/Dash/Previews/tst_PreviewSharing.qml: bad import version in line 19

review: Needs Fixing
Albert Astals Cid (aacid) wrote :

Please update the pot file

review: Needs Fixing
Albert Astals Cid (aacid) :
review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2005
http://jenkins.qa.ubuntu.com/job/unity8-ci/6644/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5015
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/59/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1356
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/59/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1251/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1252
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/58
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/58/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/4026
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5012
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5012/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24905
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/59
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/59/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6644/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-11-04 15:03:24 +0000
3+++ debian/control 2015-11-04 15:03:25 +0000
4@@ -49,6 +49,7 @@
5 qtdeclarative5-dev-tools,
6 qtdeclarative5-private-dev (>= 5.2.1),
7 qtdeclarative5-qtmultimedia-plugin,
8+ qtdeclarative5-ubuntu-content1,
9 qtdeclarative5-ubuntu-settings-components (>= 0.6),
10 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1676) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1676),
11 qtdeclarative5-ubuntu-web-plugin,
12
13=== modified file 'po/unity8.pot'
14--- po/unity8.pot 2015-09-15 22:50:16 +0000
15+++ po/unity8.pot 2015-11-04 15:03:25 +0000
16@@ -8,7 +8,7 @@
17 msgstr ""
18 "Project-Id-Version: unity8\n"
19 "Report-Msgid-Bugs-To: \n"
20-"POT-Creation-Date: 2015-09-16 00:49+0200\n"
21+"POT-Creation-Date: 2015-11-04 15:02+0000\n"
22 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
23 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
24 "Language-Team: LANGUAGE <LL@li.org>\n"
25@@ -35,86 +35,6 @@
26 msgid "Unpin shortcut"
27 msgstr ""
28
29-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
30-#. This format string is used for showing, on a 12-hour clock, times that happen yesterday.
31-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
32-#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 1:00 PM"
33-#: plugins/Utils/relativetimeformatter.cpp:157
34-msgid "Yesterday %l:%M %p"
35-msgstr ""
36-
37-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
38-#. This format string is used for showing, on a 12-hour clock, times that happened today.
39-#. en_US example: "%l:%M %p" --> "1:00 PM"
40-#: plugins/Utils/relativetimeformatter.cpp:164
41-msgid "%l:%M %p"
42-msgstr ""
43-
44-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
45-#. This format string is used for showing, on a 12-hour clock, events/appointments that happen tomorrow.
46-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
47-#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 1:00 PM"
48-#: plugins/Utils/relativetimeformatter.cpp:172
49-msgid "Tomorrow %l:%M %p"
50-msgstr ""
51-
52-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
53-#. This format string is used for showing, on a 12-hour clock, times that happened in the last week.
54-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
55-#. en_US example: "%a\u2003%l:%M %p" --> "Fri 1:00 PM"
56-#: plugins/Utils/relativetimeformatter.cpp:181
57-msgid "%a %l:%M %p"
58-msgstr ""
59-
60-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
61-#. This format string is used for showing, on a 12-hour clock, times that happened before a week from now.
62-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
63-#. en_US example: "%a %d %b\u2003%l:%M %p" --> "Fri Oct 31 1:00 PM"
64-#. en_GB example: "%a %b %d\u2003%l:%M %p" --> "Fri 31 Oct 1:00 PM"
65-#: plugins/Utils/relativetimeformatter.cpp:190
66-msgid "%a %d %b %l:%M %p"
67-msgstr ""
68-
69-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
70-#. This format string is used for showing, on a 24-hour clock, times that happen yesterday.
71-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
72-#. en_US example: "Yesterday\u2003%l:%M %p" --> "Yesterday 13:00"
73-#: plugins/Utils/relativetimeformatter.cpp:201
74-msgid "Yesterday %H:%M"
75-msgstr ""
76-
77-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
78-#. This format string is used for showing, on a 24-hour clock, times that happened today.
79-#. en_US example: "%H:%M" --> "13:00"
80-#: plugins/Utils/relativetimeformatter.cpp:208
81-msgid "%H:%M"
82-msgstr ""
83-
84-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
85-#. This format string is used for showing, on a 24-hour clock, events/appointments that happen tomorrow.
86-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
87-#. en_US example: "Tomorrow\u2003%l:%M %p" --> "Tomorrow 13:00"
88-#: plugins/Utils/relativetimeformatter.cpp:216
89-msgid "Tomorrow %H:%M"
90-msgstr ""
91-
92-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
93-#. This format string is used for showing, on a 24-hour clock, times that happened in the last week.
94-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
95-#. en_US example: "%a\u2003%H:%M" --> "Fri 13:00"
96-#: plugins/Utils/relativetimeformatter.cpp:225
97-msgid "%a %H:%M"
98-msgstr ""
99-
100-#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
101-#. This format string is used for showing, on a 24-hour clock, times that happened before a week from now.
102-#. (\u2003 is a unicode em space which is slightly wider than a normal space.)
103-#. en_US example: "%a %d %b\u2003%H:%M" --> "Fri Oct 31 13:00"
104-#. en_GB example: "%a %b %d\u2003%H:%M" --> "Fri 31 Oct 13:00"
105-#: plugins/Utils/relativetimeformatter.cpp:234
106-msgid "%a %d %b %H:%M"
107-msgstr ""
108-
109 #: qml/Components/DelayedLockscreen.qml:49
110 msgid "Device Locked"
111 msgstr ""
112@@ -134,83 +54,83 @@
113 msgstr[0] ""
114 msgstr[1] ""
115
116-#: qml/Components/Dialogs.qml:115
117+#: qml/Components/Dialogs.qml:116
118 msgctxt "Title: Lock/Log out dialog"
119 msgid "Log out"
120 msgstr ""
121
122-#: qml/Components/Dialogs.qml:116
123+#: qml/Components/Dialogs.qml:117
124 msgid "Are you sure you want to log out?"
125 msgstr ""
126
127-#: qml/Components/Dialogs.qml:118
128+#: qml/Components/Dialogs.qml:119
129 msgctxt "Button: Lock the system"
130 msgid "Lock"
131 msgstr ""
132
133-#: qml/Components/Dialogs.qml:125
134+#: qml/Components/Dialogs.qml:126
135 msgctxt "Button: Log out from the system"
136 msgid "Log Out"
137 msgstr ""
138
139-#: qml/Components/Dialogs.qml:132 qml/Components/Dialogs.qml:165
140-#: qml/Components/Dialogs.qml:224
141+#: qml/Components/Dialogs.qml:133 qml/Components/Dialogs.qml:166
142+#: qml/Components/Dialogs.qml:225
143 msgid "Cancel"
144 msgstr ""
145
146-#: qml/Components/Dialogs.qml:144
147+#: qml/Components/Dialogs.qml:145
148 msgctxt "Title: Reboot/Shut down dialog"
149 msgid "Shut down"
150 msgstr ""
151
152-#: qml/Components/Dialogs.qml:145
153+#: qml/Components/Dialogs.qml:146
154 msgid "Are you sure you want to shut down?"
155 msgstr ""
156
157-#: qml/Components/Dialogs.qml:147
158+#: qml/Components/Dialogs.qml:148
159 msgctxt "Button: Reboot the system"
160 msgid "Reboot"
161 msgstr ""
162
163-#: qml/Components/Dialogs.qml:156
164+#: qml/Components/Dialogs.qml:157
165 msgctxt "Button: Shut down the system"
166 msgid "Shut down"
167 msgstr ""
168
169-#: qml/Components/Dialogs.qml:178
170+#: qml/Components/Dialogs.qml:179
171 msgctxt "Title: Reboot dialog"
172 msgid "Reboot"
173 msgstr ""
174
175-#: qml/Components/Dialogs.qml:179
176+#: qml/Components/Dialogs.qml:180
177 msgid "Are you sure you want to reboot?"
178 msgstr ""
179
180-#: qml/Components/Dialogs.qml:181
181+#: qml/Components/Dialogs.qml:182
182 msgid "No"
183 msgstr ""
184
185-#: qml/Components/Dialogs.qml:188
186+#: qml/Components/Dialogs.qml:189
187 msgid "Yes"
188 msgstr ""
189
190-#: qml/Components/Dialogs.qml:203
191+#: qml/Components/Dialogs.qml:204
192 msgctxt "Title: Power off/Restart dialog"
193 msgid "Power"
194 msgstr ""
195
196-#: qml/Components/Dialogs.qml:204
197+#: qml/Components/Dialogs.qml:205
198 msgid ""
199 "Are you sure you would like\n"
200 "to power off?"
201 msgstr ""
202
203-#: qml/Components/Dialogs.qml:206
204+#: qml/Components/Dialogs.qml:207
205 msgctxt "Button: Power off the system"
206 msgid "Power off"
207 msgstr ""
208
209-#: qml/Components/Dialogs.qml:215
210+#: qml/Components/Dialogs.qml:216
211 msgctxt "Button: Restart the system"
212 msgid "Restart"
213 msgstr ""
214@@ -227,42 +147,42 @@
215 msgid "OK"
216 msgstr ""
217
218-#: qml/Dash/GenericScopeView.qml:569 qml/Dash/GenericScopeView.qml:727
219-msgid "See less"
220-msgstr ""
221-
222-#: qml/Dash/GenericScopeView.qml:569
223-msgid "See all"
224-msgstr ""
225-
226-#: qml/Dash/GenericScopeView.qml:631
227-msgctxt "Label: Hint for dash search line edit"
228-msgid "Search"
229-msgstr ""
230-
231-#: qml/Dash/PageHeader.qml:269
232+#: qml/Dash/DashPageHeader.qml:265
233 msgctxt "Button: Open the Ubuntu Store"
234 msgid "Store"
235 msgstr ""
236
237-#: qml/Dash/PageHeader.qml:276
238+#: qml/Dash/DashPageHeader.qml:272
239 msgctxt "Button: Start a search in the current dash scope"
240 msgid "Search"
241 msgstr ""
242
243-#: qml/Dash/PageHeader.qml:286
244+#: qml/Dash/DashPageHeader.qml:282
245 msgctxt "Button: Show the current dash scope settings"
246 msgid "Settings"
247 msgstr ""
248
249-#: qml/Dash/PageHeader.qml:293
250+#: qml/Dash/DashPageHeader.qml:289
251 msgid "Remove from Favorites"
252 msgstr ""
253
254-#: qml/Dash/PageHeader.qml:293
255+#: qml/Dash/DashPageHeader.qml:289
256 msgid "Add to Favorites"
257 msgstr ""
258
259+#: qml/Dash/GenericScopeView.qml:569 qml/Dash/GenericScopeView.qml:727
260+msgid "See less"
261+msgstr ""
262+
263+#: qml/Dash/GenericScopeView.qml:569
264+msgid "See all"
265+msgstr ""
266+
267+#: qml/Dash/GenericScopeView.qml:631
268+msgctxt "Label: Hint for dash search line edit"
269+msgid "Search"
270+msgstr ""
271+
272 #: qml/Dash/Previews/PreviewActionCombo.qml:35
273 msgid "More..."
274 msgstr ""
275@@ -273,8 +193,6 @@
276
277 #: qml/Dash/Previews/PreviewCommentInput.qml:68
278 #: qml/Dash/Previews/PreviewRatingInput.qml:174
279-#: qml/Panel/Indicators/MessageMenuItemFactory.qml:148
280-#: qml/Panel/Indicators/MessageMenuItemFactory.qml:205
281 msgid "Send"
282 msgstr ""
283
284@@ -286,6 +204,10 @@
285 msgid "Add a review"
286 msgstr ""
287
288+#: qml/Dash/Previews/PreviewSharing.qml:51
289+msgid "Preview Share Item"
290+msgstr ""
291+
292 #: qml/Dash/PullToRefreshScopeStyle.qml:55
293 msgid "Pull to refresh…"
294 msgstr ""
295@@ -310,6 +232,10 @@
296 msgid "Also installed"
297 msgstr ""
298
299+#: qml/DisabledScreenNotice.qml:42
300+msgid "Your device is now connected to an external display."
301+msgstr ""
302+
303 #: qml/Greeter/CoverPage.qml:107
304 msgid "Unlock"
305 msgstr ""
306@@ -377,7 +303,7 @@
307 msgid "Sorry, incorrect passcode"
308 msgstr ""
309
310-#: qml/Notifications/NotificationMenuItemFactory.qml:128
311+#: qml/Notifications/NotificationMenuItemFactory.qml:129
312 msgid "Show password"
313 msgstr ""
314
315@@ -389,71 +315,78 @@
316 msgid "Conference"
317 msgstr ""
318
319-#: qml/Panel/Indicators/MenuItemFactory.qml:718
320+#: qml/Panel/Indicators/MenuItemFactory.qml:731
321 msgid "Nothing is playing"
322 msgstr ""
323
324-#: qml/Panel/Indicators/MenuItemFactory.qml:847
325+#: qml/Panel/Indicators/MenuItemFactory.qml:860
326 #, qt-format
327 msgid "%1 hour"
328 msgid_plural "%1 hours"
329 msgstr[0] ""
330 msgstr[1] ""
331
332-#: qml/Panel/Indicators/MenuItemFactory.qml:851
333+#: qml/Panel/Indicators/MenuItemFactory.qml:864
334 #, qt-format
335 msgid "%1 minute"
336 msgid_plural "%1 minutes"
337 msgstr[0] ""
338 msgstr[1] ""
339
340-#: qml/Panel/Indicators/MenuItemFactory.qml:856
341+#: qml/Panel/Indicators/MenuItemFactory.qml:869
342 #, qt-format
343 msgid "%1 second"
344 msgid_plural "%1 seconds"
345 msgstr[0] ""
346 msgstr[1] ""
347
348-#: qml/Panel/Indicators/MenuItemFactory.qml:859
349+#: qml/Panel/Indicators/MenuItemFactory.qml:872
350 msgid "0 seconds"
351 msgstr ""
352
353 #. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
354-#: qml/Panel/Indicators/MenuItemFactory.qml:861
355+#: qml/Panel/Indicators/MenuItemFactory.qml:874
356 #, qt-format
357 msgid "%1 remaining"
358 msgstr ""
359
360-#: qml/Panel/Indicators/MenuItemFactory.qml:867
361+#: qml/Panel/Indicators/MenuItemFactory.qml:880
362 msgid "In queue…"
363 msgstr ""
364
365-#: qml/Panel/Indicators/MenuItemFactory.qml:871
366+#: qml/Panel/Indicators/MenuItemFactory.qml:884
367 msgid "Downloading"
368 msgstr ""
369
370-#: qml/Panel/Indicators/MenuItemFactory.qml:873
371+#: qml/Panel/Indicators/MenuItemFactory.qml:886
372 msgid "Paused, tap to resume"
373 msgstr ""
374
375-#: qml/Panel/Indicators/MenuItemFactory.qml:875
376+#: qml/Panel/Indicators/MenuItemFactory.qml:888
377 msgid "Canceled"
378 msgstr ""
379
380-#: qml/Panel/Indicators/MenuItemFactory.qml:877
381+#: qml/Panel/Indicators/MenuItemFactory.qml:890
382 msgid "Finished"
383 msgstr ""
384
385-#: qml/Panel/Indicators/MenuItemFactory.qml:879
386+#: qml/Panel/Indicators/MenuItemFactory.qml:892
387 msgid "Failed, tap to retry"
388 msgstr ""
389
390-#: qml/Panel/Indicators/MessageMenuItemFactory.qml:149
391+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:155
392+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:214
393+msgctxt "Button: Send a reply message"
394+msgid "Send"
395+msgstr ""
396+
397+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:156
398 msgctxt "Label: Hint in message indicator line edit"
399 msgid "Reply"
400 msgstr ""
401
402-#: qml/Panel/Indicators/MessageMenuItemFactory.qml:204
403+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:213
404+msgctxt "Button: Call back on phone"
405 msgid "Call back"
406 msgstr ""
407
408@@ -523,38 +456,6 @@
409 msgid "Back"
410 msgstr ""
411
412-#: qml/Wizard/Pages/here-terms.qml:27
413-msgid "Terms & Conditions"
414-msgstr ""
415-
416-#: qml/Wizard/Pages/passwd-confirm.qml:49
417-msgid "Confirm passphrase"
418-msgstr ""
419-
420-#: qml/Wizard/Pages/passwd-confirm.qml:50
421-msgid "Confirm passcode"
422-msgstr ""
423-
424-#: qml/Wizard/Pages/passwd-confirm.qml:53
425-#: qml/Wizard/Pages/passwd-confirm.qml:54
426-msgid "Please try again."
427-msgstr ""
428-
429-#: qml/Wizard/Pages/passwd-confirm.qml:82 qml/Wizard/Pages/passwd-set.qml:90
430-#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
431-#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
432-#: qml/Wizard/Pages/60-reporting.qml:50
433-msgid "Continue"
434-msgstr ""
435-
436-#: qml/Wizard/Pages/passwd-set.qml:61
437-msgid "Choose your passcode"
438-msgstr ""
439-
440-#: qml/Wizard/Pages/passwd-set.qml:68
441-msgid "Passphrase must be 4 characters long"
442-msgstr ""
443-
444 #: qml/Wizard/Pages/10-welcome.qml:27
445 msgid "Hi!"
446 msgstr ""
447@@ -567,6 +468,13 @@
448 msgid "Let’s get started."
449 msgstr ""
450
451+#: qml/Wizard/Pages/10-welcome.qml:88 qml/Wizard/Pages/30-passwd-type.qml:128
452+#: qml/Wizard/Pages/40-wifi.qml:215 qml/Wizard/Pages/50-location.qml:131
453+#: qml/Wizard/Pages/60-reporting.qml:60 qml/Wizard/Pages/passwd-confirm.qml:82
454+#: qml/Wizard/Pages/passwd-set.qml:90
455+msgid "Continue"
456+msgstr ""
457+
458 #: qml/Wizard/Pages/20-sim.qml:25
459 msgid "Add a SIM card and restart your device"
460 msgstr ""
461@@ -660,17 +568,17 @@
462 msgid "You can change your mind later in <b>System Settings</b>."
463 msgstr ""
464
465-#: qml/Wizard/Pages/60-reporting.qml:24
466+#: qml/Wizard/Pages/60-reporting.qml:26
467 msgid "Improving your experience"
468 msgstr ""
469
470-#: qml/Wizard/Pages/60-reporting.qml:36
471+#: qml/Wizard/Pages/60-reporting.qml:46
472 msgid ""
473 "Your phone is set up to automatically report errors to Canonical and its "
474 "partners, the makers of the operating system."
475 msgstr ""
476
477-#: qml/Wizard/Pages/60-reporting.qml:43
478+#: qml/Wizard/Pages/60-reporting.qml:53
479 msgid ""
480 "This can be disabled in <b>System Settings</b> under <b>Security &amp; "
481 "Privacy</b>"
482@@ -692,6 +600,31 @@
483 msgid "Finish"
484 msgstr ""
485
486+#: qml/Wizard/Pages/here-terms.qml:27
487+msgid "Terms & Conditions"
488+msgstr ""
489+
490+#: qml/Wizard/Pages/passwd-confirm.qml:49
491+msgid "Confirm passphrase"
492+msgstr ""
493+
494+#: qml/Wizard/Pages/passwd-confirm.qml:50
495+msgid "Confirm passcode"
496+msgstr ""
497+
498+#: qml/Wizard/Pages/passwd-confirm.qml:53
499+#: qml/Wizard/Pages/passwd-confirm.qml:54
500+msgid "Please try again."
501+msgstr ""
502+
503+#: qml/Wizard/Pages/passwd-set.qml:61
504+msgid "Choose your passcode"
505+msgstr ""
506+
507+#: qml/Wizard/Pages/passwd-set.qml:68
508+msgid "Passphrase must be 4 characters long"
509+msgstr ""
510+
511 #. Translators: This is the arrow for "Back" buttons
512 #: qml/Wizard/StackButton.qml:39
513 #, qt-format
514
515=== added file 'qml/Dash/Previews/PreviewMediaToolbar.qml'
516--- qml/Dash/Previews/PreviewMediaToolbar.qml 1970-01-01 00:00:00 +0000
517+++ qml/Dash/Previews/PreviewMediaToolbar.qml 2015-11-04 15:03:25 +0000
518@@ -0,0 +1,36 @@
519+/*
520+ * Copyright (C) 2015 Canonical, Ltd.
521+ *
522+ * This program is free software; you can redistribute it and/or modify
523+ * it under the terms of the GNU General Public License as published by
524+ * the Free Software Foundation; version 3.
525+ *
526+ * This program is distributed in the hope that it will be useful,
527+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
528+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
529+ * GNU General Public License for more details.
530+ *
531+ * You should have received a copy of the GNU General Public License
532+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
533+ */
534+
535+import QtQuick 2.4
536+import Ubuntu.Components 1.3
537+import "../../Components"
538+
539+Rectangle {
540+ property alias shareData: sharingWidget.shareData
541+
542+ implicitHeight: units.gu(6)
543+ color: Qt.rgba(0, 0, 0, 0.8)
544+ visible: sharingWidget.visible
545+
546+ PreviewSharing {
547+ id: sharingWidget
548+ anchors {
549+ left: parent.left
550+ verticalCenter: parent.verticalCenter
551+ leftMargin: units.gu(1)
552+ }
553+ }
554+}
555
556=== added file 'qml/Dash/Previews/PreviewSharing.qml'
557--- qml/Dash/Previews/PreviewSharing.qml 1970-01-01 00:00:00 +0000
558+++ qml/Dash/Previews/PreviewSharing.qml 2015-11-04 15:03:25 +0000
559@@ -0,0 +1,105 @@
560+/*
561+ * Copyright (C) 2015 Canonical, Ltd.
562+ *
563+ * This program is free software; you can redistribute it and/or modify
564+ * it under the terms of the GNU General Public License as published by
565+ * the Free Software Foundation; version 3.
566+ *
567+ * This program is distributed in the hope that it will be useful,
568+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
569+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
570+ * GNU General Public License for more details.
571+ *
572+ * You should have received a copy of the GNU General Public License
573+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
574+ */
575+
576+import QtQuick 2.4
577+import Ubuntu.Components 1.3
578+import Ubuntu.Content 1.1
579+
580+Item {
581+ id: root
582+ implicitHeight: button.height
583+ implicitWidth: button.width
584+
585+ property var shareData
586+ readonly property bool isUrlExternal: url && url.indexOf("file:///") != 0 && url.indexOf("/") != 0
587+ readonly property string contentType: shareData ? shareData["contentType"] : ""
588+ readonly property var url: shareData ? shareData["uri"] : ""
589+ readonly property Item rootItem: QuickUtils.rootItem(root)
590+
591+ visible: url != ""
592+
593+ AbstractButton {
594+ id: button
595+ height: units.gu(4)
596+ width: units.gu(4)
597+ onClicked: peerPicker.visible = true
598+
599+ Icon {
600+ anchors.centerIn: parent
601+ height: units.gu(3)
602+ width: units.gu(3)
603+ source: "image://theme/share"
604+ }
605+ }
606+
607+ Component {
608+ id: exportItemComponent
609+ ContentItem {
610+ name: i18n.tr("Preview Share Item")
611+ }
612+ }
613+
614+ Component {
615+ id: contentPeerComponent
616+ ContentPeerPicker {
617+ handler: ContentHandler.Share
618+ contentType: {
619+ // for now, treat all external urls as Links, or it will break contenthub
620+ if (root.isUrlExternal) return ContentType.Links;
621+
622+ switch(root.contentType) {
623+ case "all": return ContentType.All;
624+ case "contacts": return ContentType.Contacts;
625+ case "documents": return ContentType.Documents;
626+ case "links": return ContentType.Links;
627+ case "music": return ContentType.Music;
628+ case "pictures": return ContentType.Pictures;
629+ case "text": return ContentType.Text;
630+ default:
631+ case "unknown": return ContentType.Unknown;
632+ case "videos": return ContentType.Videos;
633+ }
634+ }
635+
636+ onPeerSelected: {
637+ var transfer = peer.request();
638+ if (transfer.state === ContentTransfer.InProgress) {
639+ var items = new Array();
640+ for (var i = 0; i < url.length; i++) {
641+ var exportItem = exportItemComponent.createObject();
642+ exportItem.url = url[i];
643+ items.push(exportItem);
644+ }
645+ transfer.items = items;
646+ transfer.state = ContentTransfer.Charged;
647+ }
648+ peerPicker.visible = false;
649+ }
650+ onCancelPressed: peerPicker.visible = false;
651+ }
652+ }
653+
654+ Loader {
655+ id: peerPicker
656+ objectName: "peerPicker"
657+ parent: rootItem
658+ anchors.fill: parent
659+ visible: false
660+ active: root.visible
661+
662+ sourceComponent: contentPeerComponent
663+ }
664+}
665
666=== modified file 'qml/Dash/Previews/PreviewVideoPlayback.qml'
667--- qml/Dash/Previews/PreviewVideoPlayback.qml 2015-11-04 15:03:24 +0000
668+++ qml/Dash/Previews/PreviewVideoPlayback.qml 2015-11-04 15:03:25 +0000
669@@ -73,5 +73,15 @@
670 anchors.fill: parent
671 onClicked: Qt.openUrlExternally(widgetData["source"])
672 }
673+
674+ PreviewMediaToolbar {
675+ id: toolbar
676+ anchors {
677+ left: parent.left
678+ right: parent.right
679+ bottom: parent.bottom
680+ }
681+ shareData: widgetData["shareData"]
682+ }
683 }
684 }
685
686=== modified file 'qml/Dash/Previews/PreviewZoomableImage.qml'
687--- qml/Dash/Previews/PreviewZoomableImage.qml 2015-11-04 15:03:24 +0000
688+++ qml/Dash/Previews/PreviewZoomableImage.qml 2015-11-04 15:03:25 +0000
689@@ -64,6 +64,16 @@
690 // But at the moment the model never changes
691 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
692 }
693+
694+ PreviewMediaToolbar {
695+ id: toolbar
696+ anchors {
697+ left: parent.left
698+ right: parent.right
699+ bottom: parent.bottom
700+ }
701+ shareData: widgetData["shareData"]
702+ }
703 }
704
705 PreviewOverlay {
706
707=== modified file 'tests/qmltests/CMakeLists.txt'
708--- tests/qmltests/CMakeLists.txt 2015-11-04 15:03:24 +0000
709+++ tests/qmltests/CMakeLists.txt 2015-11-04 15:03:25 +0000
710@@ -42,6 +42,7 @@
711 add_unity8_qmltest(Dash/Previews PreviewRatingDisplay)
712 add_unity8_qmltest(Dash/Previews PreviewRatingEdit)
713 add_unity8_qmltest(Dash/Previews PreviewRatingInput)
714+add_unity8_qmltest(Dash/Previews PreviewSharing)
715 add_unity8_qmltest(Dash/Previews PreviewTable)
716 add_unity8_qmltest(Dash/Previews PreviewTextSummary)
717 add_unity8_qmltest(Dash/Previews PreviewVideoPlayback)
718
719=== added file 'tests/qmltests/Dash/Previews/tst_PreviewSharing.qml'
720--- tests/qmltests/Dash/Previews/tst_PreviewSharing.qml 1970-01-01 00:00:00 +0000
721+++ tests/qmltests/Dash/Previews/tst_PreviewSharing.qml 2015-11-04 15:03:25 +0000
722@@ -0,0 +1,71 @@
723+/*
724+ * Copyright 2014 Canonical Ltd.
725+ *
726+ * This program is free software; you can redistribute it and/or modify
727+ * it under the terms of the GNU General Public License as published by
728+ * the Free Software Foundation; version 3.
729+ *
730+ * This program is distributed in the hope that it will be useful,
731+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
732+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
733+ * GNU General Public License for more details.
734+ *
735+ * You should have received a copy of the GNU General Public License
736+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
737+ */
738+
739+import QtQuick 2.4
740+import QtTest 1.0
741+import Ubuntu.Components 1.3
742+import "../../../../qml/Dash/Previews"
743+import Unity.Test 0.1 as UT
744+
745+Rectangle {
746+ id: root
747+ width: units.gu(40)
748+ height: units.gu(80)
749+ color: "black"
750+
751+ property var shareData: {
752+ "uri": [
753+ "Text here",
754+ "text here 2",
755+ "text here 3"
756+ ],
757+ "contentType": "text"
758+ }
759+
760+ property var shareDataNoUri: {
761+ "uri": "",
762+ "contentType": "text"
763+ }
764+
765+ PreviewSharing {
766+ id: previewSharing
767+ anchors { left: parent.left; bottom: parent.bottom; }
768+ shareData: root.shareData
769+ }
770+
771+ UT.UnityTestCase {
772+ name: "PreviewSharingTest"
773+ when: windowShown
774+
775+ property Item peerPicker: findChild(previewSharing.rootItem, "peerPicker")
776+
777+ function cleanup() {
778+ peerPicker.visible = false;
779+ previewSharing.shareData = root.shareData;
780+ }
781+
782+ function test_visible() {
783+ compare(previewSharing.visible, true);
784+ previewSharing.shareData = shareDataNoUri;
785+ compare(previewSharing.visible, false);
786+ }
787+
788+ function test_open_picker() {
789+ mouseClick(previewSharing);
790+ compare(peerPicker.visible, true);
791+ }
792+ }
793+}

Subscribers

People subscribed via source and target branches