on xenial help sign in
Merge
23a7332Albert Astals
Greeter/Greeter.qml+38−1
@@ -30,11 +30,20 @@ Showable {
30 readonly property bool narrowMode: !multiUser && width <= units.gu(60)
30 readonly property bool narrowMode: !multiUser && width <= units.gu(60)
31 readonly property bool multiUser: LightDM.Users.count > 1
31 readonly property bool multiUser: LightDM.Users.count > 1
32
32
33− readonly property bool leftTeaserPressed: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.leftTeaserPressed
33+ readonly property bool leftTeaserPressed: greeterContentLoader.status == Loader.Ready &&
34+ greeterContentLoader.item.leftTeaserPressed
35+ readonly property bool rightTeaserPressed: greeterContentLoader.status == Loader.Ready &&
36+ greeterContentLoader.item.rightTeaserPressed
34
37
35 signal selected(int uid)
38 signal selected(int uid)
36 signal unlocked(int uid)
39 signal unlocked(int uid)
37
40
41+ onRightTeaserPressedChanged: {
42+ if (rightTeaserPressed) {
43+ teasingTimer.start();
44+ }
45+ }
46+
38 Loader {
47 Loader {
39 id: greeterContentLoader
48 id: greeterContentLoader
40 objectName: "greeterContentLoader"
49 objectName: "greeterContentLoader"
@@ -54,4 +63,32 @@ Showable {
54 onUnlocked: greeter.unlocked(uid);
63 onUnlocked: greeter.unlocked(uid);
55 }
64 }
56 }
65 }
66+
67+ Timer {
68+ id: teasingTimer
69+ interval: 200
70+ }
71+
72+ states: [
73+ State {
74+ name: "teasing"
75+ when: greeter.rightTeaserPressed || teasingTimer.running
76+ PropertyChanges {
77+ target: greeter
78+ x: -units.gu(2)
79+ }
80+ }
81+ ]
82+ transitions: [
83+ Transition {
84+ from: "*"
85+ to: "*"
86+ NumberAnimation {
87+ target: greeter
88+ property: "x"
89+ duration: 300
90+ easing.type: Easing.OutCubic
91+ }
92+ }
93+ ]
57}
94}
Greeter/GreeterContent.qml+5−3
@@ -25,7 +25,10 @@ MouseArea {
25
25
26 property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
26 property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
27 property bool ready: wallpaper.status == Image.Ready
27 property bool ready: wallpaper.status == Image.Ready
28− property alias leftTeaserPressed: leftTeaser.pressed
28+ property bool leftTeaserPressed: teasingMouseArea.pressed &&
29+ teasingMouseArea.mouseX < teasingMouseArea.width / 2
30+ property bool rightTeaserPressed: teasingMouseArea.pressed &&
31+ teasingMouseArea.mouseX > teasingMouseArea.width / 2
29
32
30 signal selected(int uid)
33 signal selected(int uid)
31 signal unlocked(int uid)
34 signal unlocked(int uid)
@@ -57,9 +60,8 @@ MouseArea {
57 }
60 }
58
61
59 MouseArea {
62 MouseArea {
60− id: leftTeaser
63+ id: teasingMouseArea
61 anchors.fill: parent
64 anchors.fill: parent
62− anchors.rightMargin: parent.width / 2
63 }
65 }
64
66
65 Loader {
67 Loader {
po/es.po+31−31
@@ -8,82 +8,82 @@ 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-06-08 14:40+0200\n"
10"POT-Creation-Date: 2013-06-08 14:40+0200\n"
11−"PO-Revision-Date: 2013-06-05 22:20+0000\n"
11+"PO-Revision-Date: 2013-06-13 23:18+0000\n"
12−"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12+"Last-Translator: Adolfo Jayme Barrientos <fitoschido@gmail.com>\n"
13"Language-Team: Spanish <es@li.org>\n"
13"Language-Team: Spanish <es@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−"X-Launchpad-Export-Date: 2013-06-11 06:34+0000\n"
17+"X-Launchpad-Export-Date: 2013-06-14 07:06+0000\n"
18"X-Generator: Launchpad (build 16667)\n"
18"X-Generator: Launchpad (build 16667)\n"
19
19
20#: Applications/applications.js:23
20#: Applications/applications.js:23
21msgid "Phone"
21msgid "Phone"
22−msgstr ""
22+msgstr "Teléfono"
23
23
24#: Applications/applications.js:29
24#: Applications/applications.js:29
25msgid "Camera"
25msgid "Camera"
26−msgstr ""
26+msgstr "Cámara"
27
27
28#: Applications/applications.js:35
28#: Applications/applications.js:35
29msgid "Gallery"
29msgid "Gallery"
30−msgstr ""
30+msgstr "Galería"
31
31
32#: Applications/applications.js:40
32#: Applications/applications.js:40
33msgid "Facebook"
33msgid "Facebook"
34−msgstr ""
34+msgstr "Facebook"
35
35
36#: Applications/applications.js:46
36#: Applications/applications.js:46
37msgid "Browser"
37msgid "Browser"
38−msgstr ""
38+msgstr "Navegador"
39
39
40#: Applications/applications.js:51
40#: Applications/applications.js:51
41msgid "Twitter"
41msgid "Twitter"
42−msgstr ""
42+msgstr "Twitter"
43
43
44#: Applications/applications.js:57
44#: Applications/applications.js:57
45msgid "GMail"
45msgid "GMail"
46−msgstr ""
46+msgstr "GMail"
47
47
48#: Applications/applications.js:62
48#: Applications/applications.js:62
49msgid "Weather"
49msgid "Weather"
50−msgstr ""
50+msgstr "Metereología"
51
51
52#: Applications/applications.js:68
52#: Applications/applications.js:68
53msgid "Notepad"
53msgid "Notepad"
54−msgstr ""
54+msgstr "Bloc de notas"
55
55
56#: Applications/applications.js:74
56#: Applications/applications.js:74
57msgid "Calendar"
57msgid "Calendar"
58−msgstr ""
58+msgstr "Calendario"
59
59
60#: Applications/applications.js:80
60#: Applications/applications.js:80
61msgid "Media Player"
61msgid "Media Player"
62−msgstr ""
62+msgstr "Reproductor multimedia"
63
63
64#: Applications/applications.js:86
64#: Applications/applications.js:86
65msgid "Evernote"
65msgid "Evernote"
66−msgstr ""
66+msgstr "Evernote"
67
67
68#: Applications/applications.js:91
68#: Applications/applications.js:91
69msgid "Map"
69msgid "Map"
70−msgstr ""
70+msgstr "Mapa"
71
71
72#: Applications/applications.js:96
72#: Applications/applications.js:96
73msgid "Pinterest"
73msgid "Pinterest"
74−msgstr ""
74+msgstr "Pinterest"
75
75
76#: Applications/applications.js:101
76#: Applications/applications.js:101
77msgid "SoundCloud"
77msgid "SoundCloud"
78−msgstr ""
78+msgstr "SoundCloud"
79
79
80#: Applications/applications.js:106
80#: Applications/applications.js:106
81msgid "Wikipedia"
81msgid "Wikipedia"
82−msgstr ""
82+msgstr "Wikipedia"
83
83
84#: Applications/applications.js:111
84#: Applications/applications.js:111
85msgid "YouTube"
85msgid "YouTube"
86−msgstr ""
86+msgstr "YouTube"
87
87
88#: Components/PageHeader.qml:300
88#: Components/PageHeader.qml:300
89msgid "Recent searches"
89msgid "Recent searches"
@@ -135,15 +135,15 @@ msgstr "Inicio"
135
135
136#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
136#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
137msgid "Featured"
137msgid "Featured"
138−msgstr ""
138+msgstr "Destacados"
139
139
140#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
140#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
141msgid "Recent"
141msgid "Recent"
142−msgstr ""
142+msgstr "Recientes"
143
143
144#: Dash/DashMusic.qml:29 Dash/DashVideos.qml:30
144#: Dash/DashMusic.qml:29 Dash/DashVideos.qml:30
145msgid "New Releases"
145msgid "New Releases"
146−msgstr ""
146+msgstr "Lanzamientos nuevos"
147
147
148#: Dash/DashMusic.qml:30
148#: Dash/DashMusic.qml:30
149msgid "Top Charting"
149msgid "Top Charting"
@@ -155,19 +155,19 @@ msgstr "Música"
155
155
156#: Dash/DashPeople.qml:31
156#: Dash/DashPeople.qml:31
157msgid "Favourites"
157msgid "Favourites"
158−msgstr ""
158+msgstr "Favoritos"
159
159
160#: Dash/DashPeople.qml:32
160#: Dash/DashPeople.qml:32
161msgid "Recently in touch"
161msgid "Recently in touch"
162−msgstr ""
162+msgstr "Contactados recientemente"
163
163
164#: Dash/DashPeople.qml:33
164#: Dash/DashPeople.qml:33
165msgid "New Contacts"
165msgid "New Contacts"
166−msgstr ""
166+msgstr "Contactos nuevos"
167
167
168#: Dash/DashPeople.qml:34
168#: Dash/DashPeople.qml:34
169msgid "A-Z"
169msgid "A-Z"
170−msgstr ""
170+msgstr "A-Z"
171
171
172#: Dash/DashPeople.qml:123
172#: Dash/DashPeople.qml:123
173msgid "People"
173msgid "People"
@@ -175,7 +175,7 @@ msgstr "Gente"
175
175
176#: Dash/DashVideos.qml:31
176#: Dash/DashVideos.qml:31
177msgid "Popular Online"
177msgid "Popular Online"
178−msgstr ""
178+msgstr "Populares en lìnea"
179
179
180#: Dash/DashVideos.qml:155
180#: Dash/DashVideos.qml:155
181msgid "Videos"
181msgid "Videos"
@@ -183,15 +183,15 @@ msgstr "Vídeos"
183
183
184#: Dash/Video/VideoPreview.qml:98
184#: Dash/Video/VideoPreview.qml:98
185msgid "Directed by:"
185msgid "Directed by:"
186−msgstr ""
186+msgstr "Dirigida por:"
187
187
188#: Dash/Video/VideoPreview.qml:121
188#: Dash/Video/VideoPreview.qml:121
189msgid "Starring:"
189msgid "Starring:"
190−msgstr ""
190+msgstr "Protagonistas:"
191
191
192#: Dash/Video/VideoPreview.qml:144
192#: Dash/Video/VideoPreview.qml:144
193msgid "Author:"
193msgid "Author:"
194−msgstr ""
194+msgstr "Autor:"
195
195
196#: Hud/HudParametrizedActionsPage.qml:132
196#: Hud/HudParametrizedActionsPage.qml:132
197msgid "Confirm"
197msgid "Confirm"
po/zh_CN.po+32−32
@@ -8,82 +8,82 @@ 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-06-08 14:40+0200\n"
10"POT-Creation-Date: 2013-06-08 14:40+0200\n"
11−"PO-Revision-Date: 2013-06-05 22:20+0000\n"
11+"PO-Revision-Date: 2013-06-13 11:35+0000\n"
12−"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12+"Last-Translator: Wylmer Wang <Unknown>\n"
13"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
13"Language-Team: Chinese (Simplified) <zh_CN@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−"X-Launchpad-Export-Date: 2013-06-11 06:34+0000\n"
17+"X-Launchpad-Export-Date: 2013-06-14 07:06+0000\n"
18"X-Generator: Launchpad (build 16667)\n"
18"X-Generator: Launchpad (build 16667)\n"
19
19
20#: Applications/applications.js:23
20#: Applications/applications.js:23
21msgid "Phone"
21msgid "Phone"
22−msgstr ""
22+msgstr "电话"
23
23
24#: Applications/applications.js:29
24#: Applications/applications.js:29
25msgid "Camera"
25msgid "Camera"
26−msgstr ""
26+msgstr "相机"
27
27
28#: Applications/applications.js:35
28#: Applications/applications.js:35
29msgid "Gallery"
29msgid "Gallery"
30−msgstr ""
30+msgstr "相册"
31
31
32#: Applications/applications.js:40
32#: Applications/applications.js:40
33msgid "Facebook"
33msgid "Facebook"
34−msgstr ""
34+msgstr "Facebook"
35
35
36#: Applications/applications.js:46
36#: Applications/applications.js:46
37msgid "Browser"
37msgid "Browser"
38−msgstr ""
38+msgstr "浏览器"
39
39
40#: Applications/applications.js:51
40#: Applications/applications.js:51
41msgid "Twitter"
41msgid "Twitter"
42−msgstr ""
42+msgstr "Twitter"
43
43
44#: Applications/applications.js:57
44#: Applications/applications.js:57
45msgid "GMail"
45msgid "GMail"
46−msgstr ""
46+msgstr "GMail"
47
47
48#: Applications/applications.js:62
48#: Applications/applications.js:62
49msgid "Weather"
49msgid "Weather"
50−msgstr ""
50+msgstr "天气"
51
51
52#: Applications/applications.js:68
52#: Applications/applications.js:68
53msgid "Notepad"
53msgid "Notepad"
54−msgstr ""
54+msgstr "记事本"
55
55
56#: Applications/applications.js:74
56#: Applications/applications.js:74
57msgid "Calendar"
57msgid "Calendar"
58−msgstr ""
58+msgstr "日历"
59
59
60#: Applications/applications.js:80
60#: Applications/applications.js:80
61msgid "Media Player"
61msgid "Media Player"
62−msgstr ""
62+msgstr "媒体播放器"
63
63
64#: Applications/applications.js:86
64#: Applications/applications.js:86
65msgid "Evernote"
65msgid "Evernote"
66−msgstr ""
66+msgstr "印象笔记"
67
67
68#: Applications/applications.js:91
68#: Applications/applications.js:91
69msgid "Map"
69msgid "Map"
70−msgstr ""
70+msgstr "地图"
71
71
72#: Applications/applications.js:96
72#: Applications/applications.js:96
73msgid "Pinterest"
73msgid "Pinterest"
74−msgstr ""
74+msgstr "Pinterest"
75
75
76#: Applications/applications.js:101
76#: Applications/applications.js:101
77msgid "SoundCloud"
77msgid "SoundCloud"
78−msgstr ""
78+msgstr "SoundCloud"
79
79
80#: Applications/applications.js:106
80#: Applications/applications.js:106
81msgid "Wikipedia"
81msgid "Wikipedia"
82−msgstr ""
82+msgstr "维基百科"
83
83
84#: Applications/applications.js:111
84#: Applications/applications.js:111
85msgid "YouTube"
85msgid "YouTube"
86−msgstr ""
86+msgstr "YouTube"
87
87
88#: Components/PageHeader.qml:300
88#: Components/PageHeader.qml:300
89msgid "Recent searches"
89msgid "Recent searches"
@@ -135,19 +135,19 @@ msgstr "主页"
135
135
136#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
136#: Dash/DashMusic.qml:27 Dash/DashVideos.qml:28
137msgid "Featured"
137msgid "Featured"
138−msgstr ""
138+msgstr "推荐"
139
139
140#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
140#: Dash/DashMusic.qml:28 Dash/DashVideos.qml:29
141msgid "Recent"
141msgid "Recent"
142−msgstr ""
142+msgstr "最近"
143
143
144#: Dash/DashMusic.qml:29 Dash/DashVideos.qml:30
144#: Dash/DashMusic.qml:29 Dash/DashVideos.qml:30
145msgid "New Releases"
145msgid "New Releases"
146−msgstr ""
146+msgstr "新版本"
147
147
148#: Dash/DashMusic.qml:30
148#: Dash/DashMusic.qml:30
149msgid "Top Charting"
149msgid "Top Charting"
150−msgstr ""
150+msgstr "排行榜图"
151
151
152#: Dash/DashMusic.qml:99
152#: Dash/DashMusic.qml:99
153msgid "Music"
153msgid "Music"
@@ -155,19 +155,19 @@ msgstr "音乐"
155
155
156#: Dash/DashPeople.qml:31
156#: Dash/DashPeople.qml:31
157msgid "Favourites"
157msgid "Favourites"
158−msgstr ""
158+msgstr "最爱"
159
159
160#: Dash/DashPeople.qml:32
160#: Dash/DashPeople.qml:32
161msgid "Recently in touch"
161msgid "Recently in touch"
162−msgstr ""
162+msgstr "最近联系"
163
163
164#: Dash/DashPeople.qml:33
164#: Dash/DashPeople.qml:33
165msgid "New Contacts"
165msgid "New Contacts"
166−msgstr ""
166+msgstr "新建联系人"
167
167
168#: Dash/DashPeople.qml:34
168#: Dash/DashPeople.qml:34
169msgid "A-Z"
169msgid "A-Z"
170−msgstr ""
170+msgstr "A-Z"
171
171
172#: Dash/DashPeople.qml:123
172#: Dash/DashPeople.qml:123
173msgid "People"
173msgid "People"
@@ -175,7 +175,7 @@ msgstr "联系人"
175
175
176#: Dash/DashVideos.qml:31
176#: Dash/DashVideos.qml:31
177msgid "Popular Online"
177msgid "Popular Online"
178−msgstr ""
178+msgstr "经常在线"
179
179
180#: Dash/DashVideos.qml:155
180#: Dash/DashVideos.qml:155
181msgid "Videos"
181msgid "Videos"
@@ -183,15 +183,15 @@ msgstr "视频"
183
183
184#: Dash/Video/VideoPreview.qml:98
184#: Dash/Video/VideoPreview.qml:98
185msgid "Directed by:"
185msgid "Directed by:"
186−msgstr ""
186+msgstr "导演:"
187
187
188#: Dash/Video/VideoPreview.qml:121
188#: Dash/Video/VideoPreview.qml:121
189msgid "Starring:"
189msgid "Starring:"
190−msgstr ""
190+msgstr "主演:"
191
191
192#: Dash/Video/VideoPreview.qml:144
192#: Dash/Video/VideoPreview.qml:144
193msgid "Author:"
193msgid "Author:"
194−msgstr ""
194+msgstr "作者:"
195
195
196#: Hud/HudParametrizedActionsPage.qml:132
196#: Hud/HudParametrizedActionsPage.qml:132
197msgid "Confirm"
197msgid "Confirm"
tests/qmltests/Greeter/tst_Phone.qml+13−8
@@ -46,17 +46,22 @@ Item {
46 compare(greeter.narrowMode, true)
46 compare(greeter.narrowMode, true)
47 }
47 }
48
48
49− function test_teasingArea() {
49+ function test_teasingArea_data() {
50− tryCompare(greeter, "leftTeaserPressed", false)
50+ return [
51− mousePress(greeter, units.gu(2), greeter.height - units.gu(1))
51+ {tag: "left", posX: units.gu(2), leftPressed: true, rightPressed: false},
52− tryCompare(greeter, "leftTeaserPressed", true)
52+ {tag: "right", posX: greeter.width - units.gu(2), leftPressed: false, rightPressed: true}
53− mouseRelease(greeter, units.gu(2), greeter.height - units.gu(1))
53+ ]
54− tryCompare(greeter, "leftTeaserPressed", false)
54+ }
55
55
56− mousePress(greeter, greeter.width - units.gu(2), greeter.height - units.gu(1))
56+ function test_teasingArea(data) {
57 tryCompare(greeter, "leftTeaserPressed", false)
57 tryCompare(greeter, "leftTeaserPressed", false)
58+ tryCompare(greeter, "rightTeaserPressed", false)
59+ mousePress(greeter, data.posX, greeter.height - units.gu(1))
60+ tryCompare(greeter, "leftTeaserPressed", data.leftPressed)
61+ tryCompare(greeter, "rightTeaserPressed", data.rightPressed)
58− mouseRelease(greeter, units.gu(2), greeter.height - units.gu(1))
62+ mouseRelease(greeter, data.posX, greeter.height - units.gu(1))
59 tryCompare(greeter, "leftTeaserPressed", false)
63 tryCompare(greeter, "leftTeaserPressed", false)
64+ tryCompare(greeter, "rightTeaserPressed", false)
60 }
65 }
61 }
66 }
62}
67}
tests/qmltests/Greeter/tst_Tablet.qml+19
@@ -305,5 +305,24 @@ Item {
305 var index = select_user("no-background")
305 var index = select_user("no-background")
306 compare(greeter.model.data(index, LightDM.UserRoles.BackgroundPathRole), "")
306 compare(greeter.model.data(index, LightDM.UserRoles.BackgroundPathRole), "")
307 }
307 }
308+
309+ function test_teasingArea_data() {
310+ return [
311+ {tag: "left", posX: units.gu(2), leftPressed: true, rightPressed: false},
312+ {tag: "right", posX: greeter.width - units.gu(2), leftPressed: false, rightPressed: true}
313+ ]
314+ }
315+
316+ function test_teasingArea(data) {
317+ tryCompare(greeter, "leftTeaserPressed", false)
318+ tryCompare(greeter, "rightTeaserPressed", false)
319+ mousePress(greeter, data.posX, greeter.height - units.gu(1))
320+ tryCompare(greeter, "leftTeaserPressed", data.leftPressed)
321+ tryCompare(greeter, "rightTeaserPressed", data.rightPressed)
322+ mouseRelease(greeter, data.posX, greeter.height - units.gu(1))
323+ tryCompare(greeter, "leftTeaserPressed", false)
324+ tryCompare(greeter, "rightTeaserPressed", false)
325+ }
326+
308 }
327 }
309}
328}