Merge lp:~dpniel/ubuntu-filemanager-app/new-page-header into lp:ubuntu-filemanager-app
- new-page-header
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Alan Pope πΊπ§π± π¦ |
Approved revision: | 543 |
Merged at revision: | 543 |
Proposed branch: | lp:~dpniel/ubuntu-filemanager-app/new-page-header |
Merge into: | lp:ubuntu-filemanager-app |
Prerequisite: | lp:~dpniel/ubuntu-filemanager-app/fix-1588252 |
Diff against target: |
910 lines (+249/-253) 5 files modified
po/com.ubuntu.filemanager.pot (+64/-68) src/app/qml/components/PathHistoryRow.qml (+42/-52) src/app/qml/ui/FolderListPage.qml (+130/-123) src/app/qml/ui/PlacesPage.qml (+5/-4) src/app/qml/ui/SettingsSheet.qml (+8/-6) |
To merge this branch: | bzr merge lp:~dpniel/ubuntu-filemanager-app/new-page-header |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Pope πΊπ§π± π¦ (community) | Approve | ||
Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+296499@code.launchpad.net |
Commit message
Migrate to using the latest PageHeader API
This required a few changes in PathHistoryRow so it aligned properly
plus i quickly replaced the Rectangle's that really weren't needed???
Description of the change
Migrate to using the latest PageHeader API.
Dan Chapman ξΏ (dpniel) wrote : | # |
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:541
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 542. By Dan Chapman ξΏ
-
Fix build dir included in translations
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:542
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Settings page seems blank after this change?
Dan Chapman ξΏ (dpniel) wrote : | # |
Oh forgot about the settings page :-) Probably because it's named as SettingsSheet so i missed it. I'll update that as well.
- 543. By Dan Chapman ξΏ
-
Fix settings page content hiding behind header :-p
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:543
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
That's better! Thanks Dan!
Preview Diff
1 | === modified file 'po/com.ubuntu.filemanager.pot' |
2 | --- po/com.ubuntu.filemanager.pot 2016-06-05 06:28:30 +0000 |
3 | +++ po/com.ubuntu.filemanager.pot 2016-06-09 11:18:31 +0000 |
4 | @@ -8,7 +8,7 @@ |
5 | msgstr "" |
6 | "Project-Id-Version: \n" |
7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2016-06-05 07:23+0100\n" |
9 | +"POT-Creation-Date: 2016-06-09 12:17+0100\n" |
10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | @@ -26,13 +26,13 @@ |
14 | msgstr[0] "" |
15 | msgstr[1] "" |
16 | |
17 | -#: ../src/app/qml/components/PathHistoryRow.qml:84 |
18 | -#: ../src/app/qml/ui/FolderListPage.qml:845 |
19 | +#: ../src/app/qml/components/PathHistoryRow.qml:89 |
20 | +#: ../src/app/qml/ui/FolderListPage.qml:852 |
21 | msgid "Device" |
22 | msgstr "" |
23 | |
24 | #: ../src/app/qml/components/PlacesSidebar.qml:54 |
25 | -#: ../src/app/qml/ui/FolderListPage.qml:31 ../src/app/qml/ui/PlacesPage.qml:27 |
26 | +#: ../src/app/qml/ui/FolderListPage.qml:30 ../src/app/qml/ui/PlacesPage.qml:31 |
27 | #: ../src/app/qml/ui/PlacesPopover.qml:102 |
28 | msgid "Places" |
29 | msgstr "" |
30 | @@ -41,8 +41,8 @@ |
31 | msgid "Open with" |
32 | msgstr "" |
33 | |
34 | -#: ../src/app/qml/filemanager.qml:80 ../src/app/qml/ui/FolderListPage.qml:107 |
35 | -#: ../src/app/qml/ui/SettingsSheet.qml:31 |
36 | +#: ../src/app/qml/filemanager.qml:80 ../src/app/qml/ui/FolderListPage.qml:112 |
37 | +#: ../src/app/qml/ui/SettingsSheet.qml:33 |
38 | msgid "Settings" |
39 | msgstr "" |
40 | |
41 | @@ -50,12 +50,12 @@ |
42 | msgid "Change app settings" |
43 | msgstr "" |
44 | |
45 | -#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:379 |
46 | +#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:386 |
47 | #: ../src/app/qml/ui/ViewPopover.qml:70 |
48 | msgid "Icons" |
49 | msgstr "" |
50 | |
51 | -#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:395 |
52 | +#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:402 |
53 | #: ../src/app/qml/ui/ViewPopover.qml:71 |
54 | msgid "List" |
55 | msgstr "" |
56 | @@ -76,7 +76,7 @@ |
57 | #: ../src/app/qml/ui/AuthenticationDialog.qml:49 |
58 | #: ../src/app/qml/ui/ConfirmDialog.qml:31 |
59 | #: ../src/app/qml/ui/ConfirmDialogWithInput.qml:47 |
60 | -#: ../src/app/qml/ui/FolderListPage.qml:679 |
61 | +#: ../src/app/qml/ui/FolderListPage.qml:686 |
62 | #: ../src/app/qml/ui/NotifyDialog.qml:25 |
63 | msgid "OK" |
64 | msgstr "" |
65 | @@ -86,9 +86,9 @@ |
66 | #: ../src/app/qml/ui/ConfirmDialogWithInput.qml:57 |
67 | #: ../src/app/qml/ui/FileActionDialog.qml:45 |
68 | #: ../src/app/qml/ui/FileOperationProgressDialog.qml:44 |
69 | -#: ../src/app/qml/ui/FolderListPage.qml:357 |
70 | -#: ../src/app/qml/ui/FolderListPage.qml:670 |
71 | -#: ../src/app/qml/ui/FolderListPage.qml:737 ../src/app/qml/ui/GoToDialog.qml:67 |
72 | +#: ../src/app/qml/ui/FolderListPage.qml:364 |
73 | +#: ../src/app/qml/ui/FolderListPage.qml:677 |
74 | +#: ../src/app/qml/ui/FolderListPage.qml:744 ../src/app/qml/ui/GoToDialog.qml:67 |
75 | #: ../src/app/qml/ui/NetAuthenticationDialog.qml:108 |
76 | msgid "Cancel" |
77 | msgstr "" |
78 | @@ -150,195 +150,195 @@ |
79 | msgid "File operation" |
80 | msgstr "" |
81 | |
82 | -#: ../src/app/qml/ui/FolderListPage.qml:57 |
83 | +#: ../src/app/qml/ui/FolderListPage.qml:62 |
84 | #, qt-format |
85 | msgid "Paste %1 File" |
86 | msgid_plural "Paste %1 Files" |
87 | msgstr[0] "" |
88 | msgstr[1] "" |
89 | |
90 | -#: ../src/app/qml/ui/FolderListPage.qml:61 |
91 | +#: ../src/app/qml/ui/FolderListPage.qml:66 |
92 | msgid "Paste files" |
93 | msgstr "" |
94 | |
95 | -#: ../src/app/qml/ui/FolderListPage.qml:69 |
96 | +#: ../src/app/qml/ui/FolderListPage.qml:74 |
97 | msgid "Clear clipboard" |
98 | msgstr "" |
99 | |
100 | -#: ../src/app/qml/ui/FolderListPage.qml:79 |
101 | -#: ../src/app/qml/ui/FolderListPage.qml:97 |
102 | -#: ../src/app/qml/ui/FolderListPage.qml:607 |
103 | +#: ../src/app/qml/ui/FolderListPage.qml:84 |
104 | +#: ../src/app/qml/ui/FolderListPage.qml:102 |
105 | +#: ../src/app/qml/ui/FolderListPage.qml:614 |
106 | msgid "Properties" |
107 | msgstr "" |
108 | |
109 | -#: ../src/app/qml/ui/FolderListPage.qml:88 |
110 | +#: ../src/app/qml/ui/FolderListPage.qml:93 |
111 | msgid "New Folder" |
112 | msgstr "" |
113 | |
114 | -#: ../src/app/qml/ui/FolderListPage.qml:115 |
115 | +#: ../src/app/qml/ui/FolderListPage.qml:120 |
116 | msgid "Go To" |
117 | msgstr "" |
118 | |
119 | -#: ../src/app/qml/ui/FolderListPage.qml:122 |
120 | +#: ../src/app/qml/ui/FolderListPage.qml:127 |
121 | msgid "Unlock full access" |
122 | msgstr "" |
123 | |
124 | -#: ../src/app/qml/ui/FolderListPage.qml:136 |
125 | +#: ../src/app/qml/ui/FolderListPage.qml:141 |
126 | msgid "Authentication failed" |
127 | msgstr "" |
128 | |
129 | -#: ../src/app/qml/ui/FolderListPage.qml:210 |
130 | +#: ../src/app/qml/ui/FolderListPage.qml:217 |
131 | #, qt-format |
132 | msgid "%1 file" |
133 | msgid_plural "%1 files" |
134 | msgstr[0] "" |
135 | msgstr[1] "" |
136 | |
137 | -#: ../src/app/qml/ui/FolderListPage.qml:254 |
138 | +#: ../src/app/qml/ui/FolderListPage.qml:261 |
139 | msgid "Open in a new tab" |
140 | msgstr "" |
141 | |
142 | -#: ../src/app/qml/ui/FolderListPage.qml:262 |
143 | +#: ../src/app/qml/ui/FolderListPage.qml:269 |
144 | msgid "Close this tab" |
145 | msgstr "" |
146 | |
147 | -#: ../src/app/qml/ui/FolderListPage.qml:275 |
148 | +#: ../src/app/qml/ui/FolderListPage.qml:282 |
149 | msgid "Create folder" |
150 | msgstr "" |
151 | |
152 | -#: ../src/app/qml/ui/FolderListPage.qml:276 |
153 | +#: ../src/app/qml/ui/FolderListPage.qml:283 |
154 | msgid "Enter name for new folder" |
155 | msgstr "" |
156 | |
157 | -#: ../src/app/qml/ui/FolderListPage.qml:292 |
158 | +#: ../src/app/qml/ui/FolderListPage.qml:299 |
159 | msgid "Create file" |
160 | msgstr "" |
161 | |
162 | -#: ../src/app/qml/ui/FolderListPage.qml:293 |
163 | +#: ../src/app/qml/ui/FolderListPage.qml:300 |
164 | msgid "Enter name for new file" |
165 | msgstr "" |
166 | |
167 | -#: ../src/app/qml/ui/FolderListPage.qml:342 |
168 | +#: ../src/app/qml/ui/FolderListPage.qml:349 |
169 | msgid "Select" |
170 | msgstr "" |
171 | |
172 | -#: ../src/app/qml/ui/FolderListPage.qml:439 |
173 | +#: ../src/app/qml/ui/FolderListPage.qml:446 |
174 | msgid "No files" |
175 | msgstr "" |
176 | |
177 | -#: ../src/app/qml/ui/FolderListPage.qml:459 |
178 | -#: ../src/app/qml/ui/FolderListPage.qml:568 |
179 | +#: ../src/app/qml/ui/FolderListPage.qml:466 |
180 | +#: ../src/app/qml/ui/FolderListPage.qml:575 |
181 | msgid "Delete" |
182 | msgstr "" |
183 | |
184 | -#: ../src/app/qml/ui/FolderListPage.qml:460 |
185 | +#: ../src/app/qml/ui/FolderListPage.qml:467 |
186 | #, qt-format |
187 | msgid "Are you sure you want to permanently delete '%1'?" |
188 | msgstr "" |
189 | |
190 | -#: ../src/app/qml/ui/FolderListPage.qml:465 |
191 | +#: ../src/app/qml/ui/FolderListPage.qml:472 |
192 | msgid "Deleting files" |
193 | msgstr "" |
194 | |
195 | -#: ../src/app/qml/ui/FolderListPage.qml:483 |
196 | -#: ../src/app/qml/ui/FolderListPage.qml:581 |
197 | +#: ../src/app/qml/ui/FolderListPage.qml:490 |
198 | +#: ../src/app/qml/ui/FolderListPage.qml:588 |
199 | msgid "Rename" |
200 | msgstr "" |
201 | |
202 | -#: ../src/app/qml/ui/FolderListPage.qml:484 |
203 | +#: ../src/app/qml/ui/FolderListPage.qml:491 |
204 | msgid "Enter a new name" |
205 | msgstr "" |
206 | |
207 | -#: ../src/app/qml/ui/FolderListPage.qml:493 |
208 | +#: ../src/app/qml/ui/FolderListPage.qml:500 |
209 | msgid "Could not rename" |
210 | msgstr "" |
211 | |
212 | -#: ../src/app/qml/ui/FolderListPage.qml:494 |
213 | +#: ../src/app/qml/ui/FolderListPage.qml:501 |
214 | msgid "Insufficient permissions or name already exists?" |
215 | msgstr "" |
216 | |
217 | -#: ../src/app/qml/ui/FolderListPage.qml:512 |
218 | +#: ../src/app/qml/ui/FolderListPage.qml:519 |
219 | msgid "Extract Archive" |
220 | msgstr "" |
221 | |
222 | -#: ../src/app/qml/ui/FolderListPage.qml:513 |
223 | +#: ../src/app/qml/ui/FolderListPage.qml:520 |
224 | #, qt-format |
225 | msgid "Are you sure you want to extract '%1' here?" |
226 | msgstr "" |
227 | |
228 | -#: ../src/app/qml/ui/FolderListPage.qml:545 |
229 | +#: ../src/app/qml/ui/FolderListPage.qml:552 |
230 | msgid "Cut" |
231 | msgstr "" |
232 | |
233 | -#: ../src/app/qml/ui/FolderListPage.qml:556 |
234 | +#: ../src/app/qml/ui/FolderListPage.qml:563 |
235 | msgid "Copy" |
236 | msgstr "" |
237 | |
238 | -#: ../src/app/qml/ui/FolderListPage.qml:596 |
239 | -#: ../src/app/qml/ui/FolderListPage.qml:717 |
240 | +#: ../src/app/qml/ui/FolderListPage.qml:603 |
241 | +#: ../src/app/qml/ui/FolderListPage.qml:724 |
242 | msgid "Extract archive" |
243 | msgstr "" |
244 | |
245 | -#: ../src/app/qml/ui/FolderListPage.qml:627 |
246 | +#: ../src/app/qml/ui/FolderListPage.qml:634 |
247 | msgid "File operation error" |
248 | msgstr "" |
249 | |
250 | -#: ../src/app/qml/ui/FolderListPage.qml:658 |
251 | +#: ../src/app/qml/ui/FolderListPage.qml:665 |
252 | #, qt-format |
253 | msgid "Extracting archive '%1'" |
254 | msgstr "" |
255 | |
256 | -#: ../src/app/qml/ui/FolderListPage.qml:694 |
257 | +#: ../src/app/qml/ui/FolderListPage.qml:701 |
258 | msgid "Extracting failed" |
259 | msgstr "" |
260 | |
261 | -#: ../src/app/qml/ui/FolderListPage.qml:695 |
262 | +#: ../src/app/qml/ui/FolderListPage.qml:702 |
263 | #, qt-format |
264 | msgid "Extracting the archive '%1' failed." |
265 | msgstr "" |
266 | |
267 | -#: ../src/app/qml/ui/FolderListPage.qml:709 |
268 | +#: ../src/app/qml/ui/FolderListPage.qml:716 |
269 | msgid "Archive file" |
270 | msgstr "" |
271 | |
272 | -#: ../src/app/qml/ui/FolderListPage.qml:710 |
273 | +#: ../src/app/qml/ui/FolderListPage.qml:717 |
274 | msgid "Do you want to extract the archive here?" |
275 | msgstr "" |
276 | |
277 | -#: ../src/app/qml/ui/FolderListPage.qml:727 |
278 | +#: ../src/app/qml/ui/FolderListPage.qml:734 |
279 | msgid "Open with another app" |
280 | msgstr "" |
281 | |
282 | -#: ../src/app/qml/ui/FolderListPage.qml:811 |
283 | +#: ../src/app/qml/ui/FolderListPage.qml:818 |
284 | msgid "~/Desktop" |
285 | msgstr "" |
286 | |
287 | -#: ../src/app/qml/ui/FolderListPage.qml:821 |
288 | +#: ../src/app/qml/ui/FolderListPage.qml:828 |
289 | msgid "~/Public" |
290 | msgstr "" |
291 | |
292 | -#: ../src/app/qml/ui/FolderListPage.qml:823 |
293 | +#: ../src/app/qml/ui/FolderListPage.qml:830 |
294 | msgid "~/Programs" |
295 | msgstr "" |
296 | |
297 | -#: ../src/app/qml/ui/FolderListPage.qml:825 |
298 | +#: ../src/app/qml/ui/FolderListPage.qml:832 |
299 | msgid "~/Templates" |
300 | msgstr "" |
301 | |
302 | -#: ../src/app/qml/ui/FolderListPage.qml:843 |
303 | +#: ../src/app/qml/ui/FolderListPage.qml:850 |
304 | msgid "Home" |
305 | msgstr "" |
306 | |
307 | -#: ../src/app/qml/ui/FolderListPage.qml:847 |
308 | +#: ../src/app/qml/ui/FolderListPage.qml:854 |
309 | msgid "Network" |
310 | msgstr "" |
311 | |
312 | -#: ../src/app/qml/ui/FolderListPage.qml:948 |
313 | +#: ../src/app/qml/ui/FolderListPage.qml:955 |
314 | msgid "Folder not accessible" |
315 | msgstr "" |
316 | |
317 | #. TRANSLATORS: this refers to a folder name |
318 | -#: ../src/app/qml/ui/FolderListPage.qml:950 |
319 | +#: ../src/app/qml/ui/FolderListPage.qml:957 |
320 | #, qt-format |
321 | msgid "Can not access %1" |
322 | msgstr "" |
323 | @@ -351,12 +351,12 @@ |
324 | msgid "Enter a location to go to:" |
325 | msgstr "" |
326 | |
327 | -#: ../src/app/qml/ui/GoToDialog.qml:45 ../src/app/qml/ui/PlacesPage.qml:63 |
328 | +#: ../src/app/qml/ui/GoToDialog.qml:45 ../src/app/qml/ui/PlacesPage.qml:65 |
329 | #: ../src/app/qml/ui/PlacesPopover.qml:66 |
330 | msgid "Location..." |
331 | msgstr "" |
332 | |
333 | -#: ../src/app/qml/ui/GoToDialog.qml:54 ../src/app/qml/ui/PlacesPage.qml:78 |
334 | +#: ../src/app/qml/ui/GoToDialog.qml:54 ../src/app/qml/ui/PlacesPage.qml:80 |
335 | #: ../src/app/qml/ui/PlacesPopover.qml:81 |
336 | msgid "Go" |
337 | msgstr "" |
338 | @@ -377,11 +377,7 @@ |
339 | msgid "Ok" |
340 | msgstr "" |
341 | |
342 | -#: ../src/app/qml/ui/SettingsSheet.qml:34 |
343 | -msgid "Close" |
344 | -msgstr "" |
345 | - |
346 | -#: ../src/app/qml/ui/SettingsSheet.qml:43 |
347 | +#: ../src/app/qml/ui/SettingsSheet.qml:45 |
348 | msgid "Show Advanced Features" |
349 | msgstr "" |
350 | |
351 | |
352 | === modified file 'src/app/qml/components/PathHistoryRow.qml' |
353 | --- src/app/qml/components/PathHistoryRow.qml 2016-04-06 14:51:26 +0000 |
354 | +++ src/app/qml/components/PathHistoryRow.qml 2016-06-09 11:18:31 +0000 |
355 | @@ -20,13 +20,22 @@ |
356 | import Ubuntu.Components.ListItems 1.3 |
357 | |
358 | /* Full path of your current folder and recent history, that you can jump to by clicking its members */ |
359 | + |
360 | + |
361 | Flickable { |
362 | id: flickable |
363 | - |
364 | + anchors { |
365 | + fill: parent |
366 | + topMargin: units.gu(1) |
367 | + rightMargin: units.gu(1) |
368 | + bottomMargin: units.gu(1) |
369 | + } |
370 | /* Convenience properties ; used a large amount of times to warrant a variable */ |
371 | property int iconWidth: units.gu(2.5) |
372 | property string textSize: "large" |
373 | property string separatorText: " /" |
374 | + |
375 | + |
376 | /* contentWidth equals this to allow it to hide Device and Home */ |
377 | contentWidth: { |
378 | repeater.model > 0 ? |
379 | @@ -35,11 +44,8 @@ |
380 | : width + row.width - repeater.itemAt(repeater.model-1).width |
381 | : width + memoryRow.width - memoryRepeater.itemAt(memoryRepeater.model-1).width |
382 | } |
383 | - height: units.gu(7) |
384 | anchors { |
385 | - left: parent.left // back.right |
386 | - right: parent.right |
387 | - rightMargin: units.gu(1) |
388 | + fill: parent |
389 | } |
390 | clip: true |
391 | boundsBehavior: Flickable.StopAtBounds |
392 | @@ -52,6 +58,11 @@ |
393 | /* Flickable Contents */ |
394 | Row { |
395 | id: row |
396 | + anchors { |
397 | + left: parent.left |
398 | + top: parent.top |
399 | + bottom: parent.bottom |
400 | + } |
401 | spacing: 0 // Safety; having any spacing will throw off the contentX calculations. |
402 | |
403 | function repositionScrollable() { |
404 | @@ -61,23 +72,17 @@ |
405 | flickable.contentX = row.width - repeater.itemAt(repeater.model - 1).width |
406 | } |
407 | } |
408 | - |
409 | - Timer { |
410 | - id: repositionTimer |
411 | - onTriggered: repositionScrollabe() |
412 | - } |
413 | - |
414 | /* Adjust contentX according to the current folder */ |
415 | onWidthChanged: { |
416 | repositionScrollable() |
417 | } |
418 | |
419 | /* Root Folder displayed as "Device" */ |
420 | - Rectangle { |
421 | + AbstractButton { |
422 | id: device |
423 | - width: deviceLabel.contentWidth + flickable.iconWidth |
424 | - height: units.gu(7) |
425 | - color: "transparent" |
426 | + width: deviceLabel.width + flickable.iconWidth |
427 | + height: parent.height |
428 | + onClicked: goTo("/") |
429 | |
430 | Label { |
431 | id: deviceLabel |
432 | @@ -89,13 +94,6 @@ |
433 | /* Maximum Width = Flickable Width */ |
434 | width: if (contentWidth > flickable.width) { flickable.width } |
435 | } |
436 | - |
437 | - MouseArea { |
438 | - anchors.fill: parent |
439 | - onClicked: { |
440 | - goTo("/") |
441 | - } |
442 | - } |
443 | } |
444 | |
445 | /* Current Directory and its parents */ |
446 | @@ -128,11 +126,21 @@ |
447 | // console.log("Memory Path = " + memoryPath) |
448 | } |
449 | |
450 | - delegate: Rectangle { |
451 | + delegate: AbstractButton { |
452 | visible: folder !== "/" // This is to avoid issues with naming the root folder, "Device" |
453 | width: label.width + pathSeparator.width |
454 | - height: units.gu(7) |
455 | - color: "transparent" |
456 | + height: row.height |
457 | + onClicked: { |
458 | + // When clicking on an already selected item, go up one level. Otherwise go to |
459 | + // the clicked item. This behaviour is to make it easy to go up in the folder |
460 | + // hierarchy now that the "back" button goes back in history and not up the directory |
461 | + // hierarchy |
462 | + if (repeater.model === index + 1) { |
463 | + goUp() |
464 | + } else { |
465 | + goTo(pathRaw(folder, index)) |
466 | + } |
467 | + } |
468 | |
469 | Label { |
470 | id: label |
471 | @@ -156,21 +164,6 @@ |
472 | color: UbuntuColors.inkstone |
473 | // clip: true |
474 | } |
475 | - |
476 | - MouseArea { |
477 | - anchors.fill: parent |
478 | - onClicked: { |
479 | - // When clicking on an already selected item, go up one level. Otherwise go to |
480 | - // the clicked item. This behaviour is to make it easy to go up in the folder |
481 | - // hierarchy now that the "back" button goes back in history and not up the directory |
482 | - // hierarchy |
483 | - if (repeater.model === index + 1) { |
484 | - goUp() |
485 | - } else { |
486 | - goTo(pathRaw(folder, index)) |
487 | - } |
488 | - } |
489 | - } |
490 | } |
491 | } |
492 | } |
493 | @@ -178,17 +171,20 @@ |
494 | /* Memory of Previously visited folders */ |
495 | Row { |
496 | id: memoryRow |
497 | - anchors.left: row.right // Not placed in the other row, to help avoid making contentX calculations more complicated. |
498 | - |
499 | + anchors { |
500 | + top: parent.top |
501 | + bottom: parent.bottom |
502 | + left: row.right // Not placed in the other row, to help avoid making contentX calculations more complicated. |
503 | + } |
504 | /* Previously visited folders */ |
505 | Repeater { |
506 | id: memoryRepeater |
507 | model: repeater.memoryModel - repeater.model |
508 | |
509 | - delegate: Rectangle { |
510 | + delegate: AbstractButton { |
511 | width: memoryLabel.width + memoryPathSeparator.width |
512 | - height: units.gu(7) |
513 | - color: "transparent" |
514 | + height: memoryRow.height |
515 | + onClicked: goTo(pathRaw(repeater.memoryPath, repeater.memoryModel-memoryRepeater.model+index)) |
516 | |
517 | Label { |
518 | id: memoryLabel |
519 | @@ -213,14 +209,8 @@ |
520 | color: UbuntuColors.inkstone |
521 | // clip: true |
522 | } |
523 | - |
524 | - MouseArea { |
525 | - anchors.fill: parent |
526 | - onClicked: { |
527 | - goTo(pathRaw(repeater.memoryPath, repeater.memoryModel-memoryRepeater.model+index)) |
528 | - } |
529 | - } |
530 | } |
531 | } |
532 | } |
533 | } |
534 | + |
535 | |
536 | === modified file 'src/app/qml/ui/FolderListPage.qml' |
537 | --- src/app/qml/ui/FolderListPage.qml 2016-06-05 06:28:30 +0000 |
538 | +++ src/app/qml/ui/FolderListPage.qml 2016-06-09 11:18:31 +0000 |
539 | @@ -27,124 +27,129 @@ |
540 | |
541 | PageWithBottomEdge { |
542 | id: folderListPage |
543 | - title: basename(folder) |
544 | bottomEdgeTitle: i18n.tr("Places") |
545 | bottomEdgeEnabled: !sidebar.expanded |
546 | bottomEdgePageSource: Qt.resolvedUrl("PlacesPage.qml") |
547 | |
548 | - head.contents: PathHistoryRow {} |
549 | - |
550 | - /* Go to last folder visited */ |
551 | - head.backAction: Action { |
552 | - id: back |
553 | - objectName: "back" |
554 | - iconName: "back" |
555 | - |
556 | - onTriggered: { |
557 | - goBack() |
558 | + header: PageHeader { |
559 | + title: basename(folder) |
560 | + contents: PathHistoryRow {} |
561 | + flickable: !sidebar.expanded ? |
562 | + (folderListView.visible ? folderListView.flickable : folderIconView.flickable) : null |
563 | + leadingActionBar.actions: [ |
564 | + /* Go to last folder visited */ |
565 | + Action { |
566 | + id: back |
567 | + objectName: "back" |
568 | + iconName: "back" |
569 | + |
570 | + onTriggered: { |
571 | + goBack() |
572 | + } |
573 | + } |
574 | + ] |
575 | + trailingActionBar { |
576 | + numberOfSlots: 3 |
577 | + actions: [ |
578 | + Action { |
579 | + id: pasteButton |
580 | + objectName: "paste" |
581 | + iconName: "edit-paste" |
582 | + // Translation message was implemented according to: |
583 | + // http://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components.i18n/ |
584 | + // It allows correct translation for languages with more than two plural forms: |
585 | + // http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html |
586 | + text: i18n.tr("Paste %1 File", "Paste %1 Files", pageModel.clipboardUrlsCounter).arg(pageModel.clipboardUrlsCounter) |
587 | + visible: pageModel.clipboardUrlsCounter > 0 |
588 | + onTriggered: { |
589 | + console.log("Pasting to current folder items of count " + pageModel.clipboardUrlsCounter) |
590 | + fileOperationDialog.startOperation(i18n.tr("Paste files")) |
591 | + pageModel.paste() |
592 | + } |
593 | + }, |
594 | + Action { |
595 | + id: clearClipboardButton |
596 | + objectName: "clearClipboard" |
597 | + iconName: "edit-clear" |
598 | + text: i18n.tr("Clear clipboard") |
599 | + visible: pageModel.clipboardUrlsCounter > 0 |
600 | + onTriggered: { |
601 | + console.log("Clearing clipboard") |
602 | + pageModel.clearClipboard() |
603 | + } |
604 | + }, |
605 | + Action { |
606 | + id: optionsButton |
607 | + iconName: "view-list-symbolic" |
608 | + text: i18n.tr("Properties") |
609 | + onTriggered: { |
610 | + PopupUtils.open(Qt.resolvedUrl("ViewPopover.qml"), parent) |
611 | + } |
612 | + }, |
613 | + Action { |
614 | + id: createNewFolder |
615 | + objectName: "createFolder" |
616 | + iconName: "add" |
617 | + text: i18n.tr("New Folder") |
618 | + onTriggered: { |
619 | + print(text) |
620 | + PopupUtils.open(createFolderDialog, folderListPage) |
621 | + } |
622 | + }, |
623 | + Action { |
624 | + id: viewProperties |
625 | + iconName: "info" |
626 | + text: i18n.tr("Properties") |
627 | + onTriggered: { |
628 | + print(text) |
629 | + PopupUtils.open(Qt.resolvedUrl("FileDetailsPopover.qml"), folderListPage,{ "model": pageModel}) |
630 | + } |
631 | + }, |
632 | + Action { |
633 | + id: settingsButton |
634 | + iconName: "settings" |
635 | + objectName: "settings" |
636 | + text: i18n.tr("Settings") |
637 | + visible: sidebar.expanded |
638 | + onTriggered: pageStack.push(settingsPage); |
639 | + }, |
640 | + Action { |
641 | + id: gotoButton |
642 | + iconName: "find" |
643 | + objectName:"Find" |
644 | + text: i18n.tr("Go To") |
645 | + visible: sidebar.expanded |
646 | + onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent) |
647 | + }, |
648 | + Action { |
649 | + id: unlockButton |
650 | + iconName: "lock" |
651 | + text: i18n.tr("Unlock full access") |
652 | + visible: pageModel.onlyAllowedPaths |
653 | + onTriggered: { |
654 | + console.log("Full access clicked") |
655 | + var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"), |
656 | + folderListPage) |
657 | + |
658 | + authDialog.passwordEntered.connect(function(password) { |
659 | + if (pamAuthentication.validatePasswordToken(password)) { |
660 | + console.log("Authenticated for full access") |
661 | + pageModel.onlyAllowedPaths = false |
662 | + } else { |
663 | + PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage, |
664 | + { |
665 | + title: i18n.tr("Authentication failed") |
666 | + }) |
667 | + |
668 | + console.log("Could not authenticate") |
669 | + } |
670 | + }) |
671 | + } |
672 | + } |
673 | + ] |
674 | } |
675 | } |
676 | |
677 | - head.actions: [ |
678 | - Action { |
679 | - id: pasteButton |
680 | - objectName: "paste" |
681 | - iconName: "edit-paste" |
682 | - // Translation message was implemented according to: |
683 | - // http://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components.i18n/ |
684 | - // It allows correct translation for languages with more than two plural forms: |
685 | - // http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html |
686 | - text: i18n.tr("Paste %1 File", "Paste %1 Files", pageModel.clipboardUrlsCounter).arg(pageModel.clipboardUrlsCounter) |
687 | - visible: pageModel.clipboardUrlsCounter > 0 |
688 | - onTriggered: { |
689 | - console.log("Pasting to current folder items of count " + pageModel.clipboardUrlsCounter) |
690 | - fileOperationDialog.startOperation(i18n.tr("Paste files")) |
691 | - pageModel.paste() |
692 | - } |
693 | - }, |
694 | - Action { |
695 | - id: clearClipboardButton |
696 | - objectName: "clearClipboard" |
697 | - iconName: "edit-clear" |
698 | - text: i18n.tr("Clear clipboard") |
699 | - visible: pageModel.clipboardUrlsCounter > 0 |
700 | - onTriggered: { |
701 | - console.log("Clearing clipboard") |
702 | - pageModel.clearClipboard() |
703 | - } |
704 | - }, |
705 | - Action { |
706 | - id: optionsButton |
707 | - iconName: "view-list-symbolic" |
708 | - text: i18n.tr("Properties") |
709 | - onTriggered: { |
710 | - PopupUtils.open(Qt.resolvedUrl("ViewPopover.qml"), parent) |
711 | - } |
712 | - }, |
713 | - Action { |
714 | - id: createNewFolder |
715 | - objectName: "createFolder" |
716 | - iconName: "add" |
717 | - text: i18n.tr("New Folder") |
718 | - onTriggered: { |
719 | - print(text) |
720 | - PopupUtils.open(createFolderDialog, folderListPage) |
721 | - } |
722 | - }, |
723 | - Action { |
724 | - id: viewProperties |
725 | - iconName: "info" |
726 | - text: i18n.tr("Properties") |
727 | - onTriggered: { |
728 | - print(text) |
729 | - PopupUtils.open(Qt.resolvedUrl("FileDetailsPopover.qml"), folderListPage,{ "model": pageModel}) |
730 | - } |
731 | - }, |
732 | - Action { |
733 | - id: settingsButton |
734 | - iconName: "settings" |
735 | - objectName: "settings" |
736 | - text: i18n.tr("Settings") |
737 | - visible: sidebar.expanded |
738 | - onTriggered: pageStack.push(settingsPage); |
739 | - }, |
740 | - Action { |
741 | - id: gotoButton |
742 | - iconName: "find" |
743 | - objectName:"Find" |
744 | - text: i18n.tr("Go To") |
745 | - visible: sidebar.expanded |
746 | - onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent) |
747 | - }, |
748 | - Action { |
749 | - id: unlockButton |
750 | - iconName: "lock" |
751 | - text: i18n.tr("Unlock full access") |
752 | - visible: pageModel.onlyAllowedPaths |
753 | - onTriggered: { |
754 | - console.log("Full access clicked") |
755 | - var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"), |
756 | - folderListPage) |
757 | - |
758 | - authDialog.passwordEntered.connect(function(password) { |
759 | - if (pamAuthentication.validatePasswordToken(password)) { |
760 | - console.log("Authenticated for full access") |
761 | - pageModel.onlyAllowedPaths = false |
762 | - } else { |
763 | - PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage, |
764 | - { |
765 | - title: i18n.tr("Authentication failed") |
766 | - }) |
767 | - |
768 | - console.log("Could not authenticate") |
769 | - } |
770 | - }) |
771 | - } |
772 | - } |
773 | - ] |
774 | - flickable: !sidebar.expanded ? |
775 | - (folderListView.visible ? folderListView.flickable : folderIconView.flickable) : null |
776 | - |
777 | property variant fileView: folderListPage |
778 | property bool showHiddenFiles: false |
779 | property bool showingListView: folderListView.visible |
780 | @@ -158,6 +163,8 @@ |
781 | |
782 | property FolderListSelection selectionManager: pageModel.selectionObject() |
783 | |
784 | + readonly property bool __anchorToHeader: sidebar.expanded |
785 | + |
786 | onShowHiddenFilesChanged: { |
787 | pageModel.showHiddenFiles = folderListPage.showHiddenFiles |
788 | } |
789 | @@ -306,12 +313,12 @@ |
790 | PlacesSidebar { |
791 | id: sidebar |
792 | objectName: "placesSidebar" |
793 | - |
794 | - // anchors { |
795 | - // top: parent.top |
796 | - // bottom: parent.bottom |
797 | - // bottomMargin: units.gu(-2) |
798 | - // } |
799 | + anchors { |
800 | + left: mode === "left" ? parent.left : undefined |
801 | + right: mode === "right" ? parent.right : undefined |
802 | + top: folderListPage.header.bottom |
803 | + bottom: parent.bottom |
804 | + } |
805 | |
806 | expanded: showSidebar |
807 | } |
808 | @@ -370,7 +377,7 @@ |
809 | |
810 | folderListModel: pageModel |
811 | anchors { |
812 | - top: parent.top |
813 | + top: __anchorToHeader ? folderListPage.header.bottom : parent.top |
814 | bottom: bottomBar.top |
815 | left: sidebar.right |
816 | right: parent.right |
817 | @@ -386,7 +393,7 @@ |
818 | |
819 | folderListModel: pageModel |
820 | anchors { |
821 | - top: parent.top |
822 | + top: __anchorToHeader ? folderListPage.header.bottom : parent.top |
823 | bottom: bottomBar.top |
824 | left: sidebar.right |
825 | right: parent.right |
826 | @@ -829,7 +836,7 @@ |
827 | } else if (file === "/") { |
828 | iconPath = "/usr/share/icons/Humanity/devices/48/drive-harddisk.svg" |
829 | } else if (file === userplaces.locationSamba) { |
830 | - iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg" |
831 | + iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg" |
832 | } else if (userplaces.isUserMountDirectory(file)) { |
833 | // In context of Ubuntu Touch this means SDCard currently. |
834 | iconPath = "/usr/share/icons/Humanity/devices/48/drive-removable-media.svg" |
835 | @@ -936,8 +943,8 @@ |
836 | if (model.isBrowsable) { |
837 | console.log("browsable path="+model.filePath+" isRemote="+model.isRemote+" needsAuthentication="+model.needsAuthentication) |
838 | if ((model.isReadable && model.isExecutable) || |
839 | - (model.isRemote && model.needsAuthentication) //in this case it is necessary to generate the signal needsAuthentication() |
840 | - ) { |
841 | + (model.isRemote && model.needsAuthentication) //in this case it is necessary to generate the signal needsAuthentication() |
842 | + ) { |
843 | console.log("Changing to dir", model.filePath) |
844 | //prefer pageModel.cdIntoIndex() because it is not necessary to parse the path |
845 | //goTo(model.filePath) |
846 | @@ -956,7 +963,7 @@ |
847 | if (fileSelectorMode) { |
848 | selectionManager.select(model.index,false,true) |
849 | } else { |
850 | - openFile(model) |
851 | + openFile(model) |
852 | } |
853 | } |
854 | } |
855 | |
856 | === modified file 'src/app/qml/ui/PlacesPage.qml' |
857 | --- src/app/qml/ui/PlacesPage.qml 2016-01-18 10:32:34 +0000 |
858 | +++ src/app/qml/ui/PlacesPage.qml 2016-06-09 11:18:31 +0000 |
859 | @@ -23,11 +23,13 @@ |
860 | |
861 | Page { |
862 | id: root |
863 | - |
864 | - title: i18n.tr("Places") |
865 | - objectName: 'PlacesPage' |
866 | // ADDED THIS PROPERTY FOR BUG #1341671 WORKAROUND |
867 | property string testProperty: "justForAutopilotTests" |
868 | + objectName: 'PlacesPage' |
869 | + |
870 | + header: PageHeader { |
871 | + title: i18n.tr("Places") |
872 | + } |
873 | |
874 | Flickable { |
875 | objectName: "placesFlickable" |
876 | @@ -116,5 +118,4 @@ |
877 | } |
878 | } |
879 | } |
880 | - |
881 | } |
882 | |
883 | === modified file 'src/app/qml/ui/SettingsSheet.qml' |
884 | --- src/app/qml/ui/SettingsSheet.qml 2016-01-18 10:32:34 +0000 |
885 | +++ src/app/qml/ui/SettingsSheet.qml 2016-06-09 11:18:31 +0000 |
886 | @@ -28,16 +28,18 @@ |
887 | */ |
888 | Page { |
889 | id: sheet |
890 | - title: i18n.tr("Settings") |
891 | |
892 | - Component.onCompleted: { |
893 | - sheet.__leftButton.text = i18n.tr("Close") |
894 | - sheet.__foreground.style = Theme.createStyleComponent(Qt.resolvedUrl("../components/SuruSheetStyle.qml"), sheet) |
895 | + header: PageHeader { |
896 | + title: i18n.tr("Settings") |
897 | } |
898 | |
899 | Column { |
900 | - anchors.fill: parent |
901 | - anchors.margins: units.gu(-1) |
902 | + anchors { |
903 | + left: parent.left |
904 | + top: sheet.header.bottom |
905 | + right: parent.right |
906 | + bottom: parent.bottom |
907 | + } |
908 | |
909 | Standard { |
910 | text: i18n.tr("Show Advanced Features") |
eeeek i see the build directory has been included in translations i'll fix that