Merge lp:~dpniel/ubuntu-filemanager-app/new-page-header into lp:ubuntu-filemanager-app

Proposed by Dan Chapman ξƒΏ
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
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.

To post a comment you must log in.
Revision history for this message
Dan Chapman ξƒΏ (dpniel) wrote :

eeeek i see the build directory has been included in translations i'll fix that

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
542. By Dan Chapman ξƒΏ

Fix build dir included in translations

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Settings page seems blank after this change?

review: Needs Fixing
Revision history for this message
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

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

That's better! Thanks Dan!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/com.ubuntu.filemanager.pot'
--- po/com.ubuntu.filemanager.pot 2016-06-05 06:28:30 +0000
+++ po/com.ubuntu.filemanager.pot 2016-06-09 11:18:31 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2016-06-05 07:23+0100\n"11"POT-Creation-Date: 2016-06-09 12:17+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -26,13 +26,13 @@
26msgstr[0] ""26msgstr[0] ""
27msgstr[1] ""27msgstr[1] ""
2828
29#: ../src/app/qml/components/PathHistoryRow.qml:8429#: ../src/app/qml/components/PathHistoryRow.qml:89
30#: ../src/app/qml/ui/FolderListPage.qml:84530#: ../src/app/qml/ui/FolderListPage.qml:852
31msgid "Device"31msgid "Device"
32msgstr ""32msgstr ""
3333
34#: ../src/app/qml/components/PlacesSidebar.qml:5434#: ../src/app/qml/components/PlacesSidebar.qml:54
35#: ../src/app/qml/ui/FolderListPage.qml:31 ../src/app/qml/ui/PlacesPage.qml:2735#: ../src/app/qml/ui/FolderListPage.qml:30 ../src/app/qml/ui/PlacesPage.qml:31
36#: ../src/app/qml/ui/PlacesPopover.qml:10236#: ../src/app/qml/ui/PlacesPopover.qml:102
37msgid "Places"37msgid "Places"
38msgstr ""38msgstr ""
@@ -41,8 +41,8 @@
41msgid "Open with"41msgid "Open with"
42msgstr ""42msgstr ""
4343
44#: ../src/app/qml/filemanager.qml:80 ../src/app/qml/ui/FolderListPage.qml:10744#: ../src/app/qml/filemanager.qml:80 ../src/app/qml/ui/FolderListPage.qml:112
45#: ../src/app/qml/ui/SettingsSheet.qml:3145#: ../src/app/qml/ui/SettingsSheet.qml:33
46msgid "Settings"46msgid "Settings"
47msgstr ""47msgstr ""
4848
@@ -50,12 +50,12 @@
50msgid "Change app settings"50msgid "Change app settings"
51msgstr ""51msgstr ""
5252
53#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:37953#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:386
54#: ../src/app/qml/ui/ViewPopover.qml:7054#: ../src/app/qml/ui/ViewPopover.qml:70
55msgid "Icons"55msgid "Icons"
56msgstr ""56msgstr ""
5757
58#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:39558#: ../src/app/qml/filemanager.qml:258 ../src/app/qml/ui/FolderListPage.qml:402
59#: ../src/app/qml/ui/ViewPopover.qml:7159#: ../src/app/qml/ui/ViewPopover.qml:71
60msgid "List"60msgid "List"
61msgstr ""61msgstr ""
@@ -76,7 +76,7 @@
76#: ../src/app/qml/ui/AuthenticationDialog.qml:4976#: ../src/app/qml/ui/AuthenticationDialog.qml:49
77#: ../src/app/qml/ui/ConfirmDialog.qml:3177#: ../src/app/qml/ui/ConfirmDialog.qml:31
78#: ../src/app/qml/ui/ConfirmDialogWithInput.qml:4778#: ../src/app/qml/ui/ConfirmDialogWithInput.qml:47
79#: ../src/app/qml/ui/FolderListPage.qml:67979#: ../src/app/qml/ui/FolderListPage.qml:686
80#: ../src/app/qml/ui/NotifyDialog.qml:2580#: ../src/app/qml/ui/NotifyDialog.qml:25
81msgid "OK"81msgid "OK"
82msgstr ""82msgstr ""
@@ -86,9 +86,9 @@
86#: ../src/app/qml/ui/ConfirmDialogWithInput.qml:5786#: ../src/app/qml/ui/ConfirmDialogWithInput.qml:57
87#: ../src/app/qml/ui/FileActionDialog.qml:4587#: ../src/app/qml/ui/FileActionDialog.qml:45
88#: ../src/app/qml/ui/FileOperationProgressDialog.qml:4488#: ../src/app/qml/ui/FileOperationProgressDialog.qml:44
89#: ../src/app/qml/ui/FolderListPage.qml:35789#: ../src/app/qml/ui/FolderListPage.qml:364
90#: ../src/app/qml/ui/FolderListPage.qml:67090#: ../src/app/qml/ui/FolderListPage.qml:677
91#: ../src/app/qml/ui/FolderListPage.qml:737 ../src/app/qml/ui/GoToDialog.qml:6791#: ../src/app/qml/ui/FolderListPage.qml:744 ../src/app/qml/ui/GoToDialog.qml:67
92#: ../src/app/qml/ui/NetAuthenticationDialog.qml:10892#: ../src/app/qml/ui/NetAuthenticationDialog.qml:108
93msgid "Cancel"93msgid "Cancel"
94msgstr ""94msgstr ""
@@ -150,195 +150,195 @@
150msgid "File operation"150msgid "File operation"
151msgstr ""151msgstr ""
152152
153#: ../src/app/qml/ui/FolderListPage.qml:57153#: ../src/app/qml/ui/FolderListPage.qml:62
154#, qt-format154#, qt-format
155msgid "Paste %1 File"155msgid "Paste %1 File"
156msgid_plural "Paste %1 Files"156msgid_plural "Paste %1 Files"
157msgstr[0] ""157msgstr[0] ""
158msgstr[1] ""158msgstr[1] ""
159159
160#: ../src/app/qml/ui/FolderListPage.qml:61160#: ../src/app/qml/ui/FolderListPage.qml:66
161msgid "Paste files"161msgid "Paste files"
162msgstr ""162msgstr ""
163163
164#: ../src/app/qml/ui/FolderListPage.qml:69164#: ../src/app/qml/ui/FolderListPage.qml:74
165msgid "Clear clipboard"165msgid "Clear clipboard"
166msgstr ""166msgstr ""
167167
168#: ../src/app/qml/ui/FolderListPage.qml:79168#: ../src/app/qml/ui/FolderListPage.qml:84
169#: ../src/app/qml/ui/FolderListPage.qml:97169#: ../src/app/qml/ui/FolderListPage.qml:102
170#: ../src/app/qml/ui/FolderListPage.qml:607170#: ../src/app/qml/ui/FolderListPage.qml:614
171msgid "Properties"171msgid "Properties"
172msgstr ""172msgstr ""
173173
174#: ../src/app/qml/ui/FolderListPage.qml:88174#: ../src/app/qml/ui/FolderListPage.qml:93
175msgid "New Folder"175msgid "New Folder"
176msgstr ""176msgstr ""
177177
178#: ../src/app/qml/ui/FolderListPage.qml:115178#: ../src/app/qml/ui/FolderListPage.qml:120
179msgid "Go To"179msgid "Go To"
180msgstr ""180msgstr ""
181181
182#: ../src/app/qml/ui/FolderListPage.qml:122182#: ../src/app/qml/ui/FolderListPage.qml:127
183msgid "Unlock full access"183msgid "Unlock full access"
184msgstr ""184msgstr ""
185185
186#: ../src/app/qml/ui/FolderListPage.qml:136186#: ../src/app/qml/ui/FolderListPage.qml:141
187msgid "Authentication failed"187msgid "Authentication failed"
188msgstr ""188msgstr ""
189189
190#: ../src/app/qml/ui/FolderListPage.qml:210190#: ../src/app/qml/ui/FolderListPage.qml:217
191#, qt-format191#, qt-format
192msgid "%1 file"192msgid "%1 file"
193msgid_plural "%1 files"193msgid_plural "%1 files"
194msgstr[0] ""194msgstr[0] ""
195msgstr[1] ""195msgstr[1] ""
196196
197#: ../src/app/qml/ui/FolderListPage.qml:254197#: ../src/app/qml/ui/FolderListPage.qml:261
198msgid "Open in a new tab"198msgid "Open in a new tab"
199msgstr ""199msgstr ""
200200
201#: ../src/app/qml/ui/FolderListPage.qml:262201#: ../src/app/qml/ui/FolderListPage.qml:269
202msgid "Close this tab"202msgid "Close this tab"
203msgstr ""203msgstr ""
204204
205#: ../src/app/qml/ui/FolderListPage.qml:275205#: ../src/app/qml/ui/FolderListPage.qml:282
206msgid "Create folder"206msgid "Create folder"
207msgstr ""207msgstr ""
208208
209#: ../src/app/qml/ui/FolderListPage.qml:276209#: ../src/app/qml/ui/FolderListPage.qml:283
210msgid "Enter name for new folder"210msgid "Enter name for new folder"
211msgstr ""211msgstr ""
212212
213#: ../src/app/qml/ui/FolderListPage.qml:292213#: ../src/app/qml/ui/FolderListPage.qml:299
214msgid "Create file"214msgid "Create file"
215msgstr ""215msgstr ""
216216
217#: ../src/app/qml/ui/FolderListPage.qml:293217#: ../src/app/qml/ui/FolderListPage.qml:300
218msgid "Enter name for new file"218msgid "Enter name for new file"
219msgstr ""219msgstr ""
220220
221#: ../src/app/qml/ui/FolderListPage.qml:342221#: ../src/app/qml/ui/FolderListPage.qml:349
222msgid "Select"222msgid "Select"
223msgstr ""223msgstr ""
224224
225#: ../src/app/qml/ui/FolderListPage.qml:439225#: ../src/app/qml/ui/FolderListPage.qml:446
226msgid "No files"226msgid "No files"
227msgstr ""227msgstr ""
228228
229#: ../src/app/qml/ui/FolderListPage.qml:459229#: ../src/app/qml/ui/FolderListPage.qml:466
230#: ../src/app/qml/ui/FolderListPage.qml:568230#: ../src/app/qml/ui/FolderListPage.qml:575
231msgid "Delete"231msgid "Delete"
232msgstr ""232msgstr ""
233233
234#: ../src/app/qml/ui/FolderListPage.qml:460234#: ../src/app/qml/ui/FolderListPage.qml:467
235#, qt-format235#, qt-format
236msgid "Are you sure you want to permanently delete '%1'?"236msgid "Are you sure you want to permanently delete '%1'?"
237msgstr ""237msgstr ""
238238
239#: ../src/app/qml/ui/FolderListPage.qml:465239#: ../src/app/qml/ui/FolderListPage.qml:472
240msgid "Deleting files"240msgid "Deleting files"
241msgstr ""241msgstr ""
242242
243#: ../src/app/qml/ui/FolderListPage.qml:483243#: ../src/app/qml/ui/FolderListPage.qml:490
244#: ../src/app/qml/ui/FolderListPage.qml:581244#: ../src/app/qml/ui/FolderListPage.qml:588
245msgid "Rename"245msgid "Rename"
246msgstr ""246msgstr ""
247247
248#: ../src/app/qml/ui/FolderListPage.qml:484248#: ../src/app/qml/ui/FolderListPage.qml:491
249msgid "Enter a new name"249msgid "Enter a new name"
250msgstr ""250msgstr ""
251251
252#: ../src/app/qml/ui/FolderListPage.qml:493252#: ../src/app/qml/ui/FolderListPage.qml:500
253msgid "Could not rename"253msgid "Could not rename"
254msgstr ""254msgstr ""
255255
256#: ../src/app/qml/ui/FolderListPage.qml:494256#: ../src/app/qml/ui/FolderListPage.qml:501
257msgid "Insufficient permissions or name already exists?"257msgid "Insufficient permissions or name already exists?"
258msgstr ""258msgstr ""
259259
260#: ../src/app/qml/ui/FolderListPage.qml:512260#: ../src/app/qml/ui/FolderListPage.qml:519
261msgid "Extract Archive"261msgid "Extract Archive"
262msgstr ""262msgstr ""
263263
264#: ../src/app/qml/ui/FolderListPage.qml:513264#: ../src/app/qml/ui/FolderListPage.qml:520
265#, qt-format265#, qt-format
266msgid "Are you sure you want to extract '%1' here?"266msgid "Are you sure you want to extract '%1' here?"
267msgstr ""267msgstr ""
268268
269#: ../src/app/qml/ui/FolderListPage.qml:545269#: ../src/app/qml/ui/FolderListPage.qml:552
270msgid "Cut"270msgid "Cut"
271msgstr ""271msgstr ""
272272
273#: ../src/app/qml/ui/FolderListPage.qml:556273#: ../src/app/qml/ui/FolderListPage.qml:563
274msgid "Copy"274msgid "Copy"
275msgstr ""275msgstr ""
276276
277#: ../src/app/qml/ui/FolderListPage.qml:596277#: ../src/app/qml/ui/FolderListPage.qml:603
278#: ../src/app/qml/ui/FolderListPage.qml:717278#: ../src/app/qml/ui/FolderListPage.qml:724
279msgid "Extract archive"279msgid "Extract archive"
280msgstr ""280msgstr ""
281281
282#: ../src/app/qml/ui/FolderListPage.qml:627282#: ../src/app/qml/ui/FolderListPage.qml:634
283msgid "File operation error"283msgid "File operation error"
284msgstr ""284msgstr ""
285285
286#: ../src/app/qml/ui/FolderListPage.qml:658286#: ../src/app/qml/ui/FolderListPage.qml:665
287#, qt-format287#, qt-format
288msgid "Extracting archive '%1'"288msgid "Extracting archive '%1'"
289msgstr ""289msgstr ""
290290
291#: ../src/app/qml/ui/FolderListPage.qml:694291#: ../src/app/qml/ui/FolderListPage.qml:701
292msgid "Extracting failed"292msgid "Extracting failed"
293msgstr ""293msgstr ""
294294
295#: ../src/app/qml/ui/FolderListPage.qml:695295#: ../src/app/qml/ui/FolderListPage.qml:702
296#, qt-format296#, qt-format
297msgid "Extracting the archive '%1' failed."297msgid "Extracting the archive '%1' failed."
298msgstr ""298msgstr ""
299299
300#: ../src/app/qml/ui/FolderListPage.qml:709300#: ../src/app/qml/ui/FolderListPage.qml:716
301msgid "Archive file"301msgid "Archive file"
302msgstr ""302msgstr ""
303303
304#: ../src/app/qml/ui/FolderListPage.qml:710304#: ../src/app/qml/ui/FolderListPage.qml:717
305msgid "Do you want to extract the archive here?"305msgid "Do you want to extract the archive here?"
306msgstr ""306msgstr ""
307307
308#: ../src/app/qml/ui/FolderListPage.qml:727308#: ../src/app/qml/ui/FolderListPage.qml:734
309msgid "Open with another app"309msgid "Open with another app"
310msgstr ""310msgstr ""
311311
312#: ../src/app/qml/ui/FolderListPage.qml:811312#: ../src/app/qml/ui/FolderListPage.qml:818
313msgid "~/Desktop"313msgid "~/Desktop"
314msgstr ""314msgstr ""
315315
316#: ../src/app/qml/ui/FolderListPage.qml:821316#: ../src/app/qml/ui/FolderListPage.qml:828
317msgid "~/Public"317msgid "~/Public"
318msgstr ""318msgstr ""
319319
320#: ../src/app/qml/ui/FolderListPage.qml:823320#: ../src/app/qml/ui/FolderListPage.qml:830
321msgid "~/Programs"321msgid "~/Programs"
322msgstr ""322msgstr ""
323323
324#: ../src/app/qml/ui/FolderListPage.qml:825324#: ../src/app/qml/ui/FolderListPage.qml:832
325msgid "~/Templates"325msgid "~/Templates"
326msgstr ""326msgstr ""
327327
328#: ../src/app/qml/ui/FolderListPage.qml:843328#: ../src/app/qml/ui/FolderListPage.qml:850
329msgid "Home"329msgid "Home"
330msgstr ""330msgstr ""
331331
332#: ../src/app/qml/ui/FolderListPage.qml:847332#: ../src/app/qml/ui/FolderListPage.qml:854
333msgid "Network"333msgid "Network"
334msgstr ""334msgstr ""
335335
336#: ../src/app/qml/ui/FolderListPage.qml:948336#: ../src/app/qml/ui/FolderListPage.qml:955
337msgid "Folder not accessible"337msgid "Folder not accessible"
338msgstr ""338msgstr ""
339339
340#. TRANSLATORS: this refers to a folder name340#. TRANSLATORS: this refers to a folder name
341#: ../src/app/qml/ui/FolderListPage.qml:950341#: ../src/app/qml/ui/FolderListPage.qml:957
342#, qt-format342#, qt-format
343msgid "Can not access %1"343msgid "Can not access %1"
344msgstr ""344msgstr ""
@@ -351,12 +351,12 @@
351msgid "Enter a location to go to:"351msgid "Enter a location to go to:"
352msgstr ""352msgstr ""
353353
354#: ../src/app/qml/ui/GoToDialog.qml:45 ../src/app/qml/ui/PlacesPage.qml:63354#: ../src/app/qml/ui/GoToDialog.qml:45 ../src/app/qml/ui/PlacesPage.qml:65
355#: ../src/app/qml/ui/PlacesPopover.qml:66355#: ../src/app/qml/ui/PlacesPopover.qml:66
356msgid "Location..."356msgid "Location..."
357msgstr ""357msgstr ""
358358
359#: ../src/app/qml/ui/GoToDialog.qml:54 ../src/app/qml/ui/PlacesPage.qml:78359#: ../src/app/qml/ui/GoToDialog.qml:54 ../src/app/qml/ui/PlacesPage.qml:80
360#: ../src/app/qml/ui/PlacesPopover.qml:81360#: ../src/app/qml/ui/PlacesPopover.qml:81
361msgid "Go"361msgid "Go"
362msgstr ""362msgstr ""
@@ -377,11 +377,7 @@
377msgid "Ok"377msgid "Ok"
378msgstr ""378msgstr ""
379379
380#: ../src/app/qml/ui/SettingsSheet.qml:34380#: ../src/app/qml/ui/SettingsSheet.qml:45
381msgid "Close"
382msgstr ""
383
384#: ../src/app/qml/ui/SettingsSheet.qml:43
385msgid "Show Advanced Features"381msgid "Show Advanced Features"
386msgstr ""382msgstr ""
387383
388384
=== modified file 'src/app/qml/components/PathHistoryRow.qml'
--- src/app/qml/components/PathHistoryRow.qml 2016-04-06 14:51:26 +0000
+++ src/app/qml/components/PathHistoryRow.qml 2016-06-09 11:18:31 +0000
@@ -20,13 +20,22 @@
20import Ubuntu.Components.ListItems 1.320import Ubuntu.Components.ListItems 1.3
2121
22/* Full path of your current folder and recent history, that you can jump to by clicking its members */22/* Full path of your current folder and recent history, that you can jump to by clicking its members */
23
24
23Flickable {25Flickable {
24 id: flickable26 id: flickable
2527 anchors {
28 fill: parent
29 topMargin: units.gu(1)
30 rightMargin: units.gu(1)
31 bottomMargin: units.gu(1)
32 }
26 /* Convenience properties ; used a large amount of times to warrant a variable */33 /* Convenience properties ; used a large amount of times to warrant a variable */
27 property int iconWidth: units.gu(2.5)34 property int iconWidth: units.gu(2.5)
28 property string textSize: "large"35 property string textSize: "large"
29 property string separatorText: " /"36 property string separatorText: " /"
37
38
30 /* contentWidth equals this to allow it to hide Device and Home */39 /* contentWidth equals this to allow it to hide Device and Home */
31 contentWidth: {40 contentWidth: {
32 repeater.model > 0 ?41 repeater.model > 0 ?
@@ -35,11 +44,8 @@
35 : width + row.width - repeater.itemAt(repeater.model-1).width44 : width + row.width - repeater.itemAt(repeater.model-1).width
36 : width + memoryRow.width - memoryRepeater.itemAt(memoryRepeater.model-1).width45 : width + memoryRow.width - memoryRepeater.itemAt(memoryRepeater.model-1).width
37 }46 }
38 height: units.gu(7)
39 anchors {47 anchors {
40 left: parent.left // back.right48 fill: parent
41 right: parent.right
42 rightMargin: units.gu(1)
43 }49 }
44 clip: true50 clip: true
45 boundsBehavior: Flickable.StopAtBounds51 boundsBehavior: Flickable.StopAtBounds
@@ -52,6 +58,11 @@
52 /* Flickable Contents */58 /* Flickable Contents */
53 Row {59 Row {
54 id: row60 id: row
61 anchors {
62 left: parent.left
63 top: parent.top
64 bottom: parent.bottom
65 }
55 spacing: 0 // Safety; having any spacing will throw off the contentX calculations.66 spacing: 0 // Safety; having any spacing will throw off the contentX calculations.
5667
57 function repositionScrollable() {68 function repositionScrollable() {
@@ -61,23 +72,17 @@
61 flickable.contentX = row.width - repeater.itemAt(repeater.model - 1).width72 flickable.contentX = row.width - repeater.itemAt(repeater.model - 1).width
62 }73 }
63 }74 }
64
65 Timer {
66 id: repositionTimer
67 onTriggered: repositionScrollabe()
68 }
69
70 /* Adjust contentX according to the current folder */75 /* Adjust contentX according to the current folder */
71 onWidthChanged: {76 onWidthChanged: {
72 repositionScrollable()77 repositionScrollable()
73 }78 }
7479
75 /* Root Folder displayed as "Device" */80 /* Root Folder displayed as "Device" */
76 Rectangle {81 AbstractButton {
77 id: device82 id: device
78 width: deviceLabel.contentWidth + flickable.iconWidth83 width: deviceLabel.width + flickable.iconWidth
79 height: units.gu(7)84 height: parent.height
80 color: "transparent"85 onClicked: goTo("/")
8186
82 Label {87 Label {
83 id: deviceLabel88 id: deviceLabel
@@ -89,13 +94,6 @@
89 /* Maximum Width = Flickable Width */94 /* Maximum Width = Flickable Width */
90 width: if (contentWidth > flickable.width) { flickable.width }95 width: if (contentWidth > flickable.width) { flickable.width }
91 }96 }
92
93 MouseArea {
94 anchors.fill: parent
95 onClicked: {
96 goTo("/")
97 }
98 }
99 }97 }
10098
101 /* Current Directory and its parents */99 /* Current Directory and its parents */
@@ -128,11 +126,21 @@
128 // console.log("Memory Path = " + memoryPath)126 // console.log("Memory Path = " + memoryPath)
129 }127 }
130128
131 delegate: Rectangle {129 delegate: AbstractButton {
132 visible: folder !== "/" // This is to avoid issues with naming the root folder, "Device"130 visible: folder !== "/" // This is to avoid issues with naming the root folder, "Device"
133 width: label.width + pathSeparator.width131 width: label.width + pathSeparator.width
134 height: units.gu(7)132 height: row.height
135 color: "transparent"133 onClicked: {
134 // When clicking on an already selected item, go up one level. Otherwise go to
135 // the clicked item. This behaviour is to make it easy to go up in the folder
136 // hierarchy now that the "back" button goes back in history and not up the directory
137 // hierarchy
138 if (repeater.model === index + 1) {
139 goUp()
140 } else {
141 goTo(pathRaw(folder, index))
142 }
143 }
136144
137 Label {145 Label {
138 id: label146 id: label
@@ -156,21 +164,6 @@
156 color: UbuntuColors.inkstone164 color: UbuntuColors.inkstone
157 // clip: true165 // clip: true
158 }166 }
159
160 MouseArea {
161 anchors.fill: parent
162 onClicked: {
163 // When clicking on an already selected item, go up one level. Otherwise go to
164 // the clicked item. This behaviour is to make it easy to go up in the folder
165 // hierarchy now that the "back" button goes back in history and not up the directory
166 // hierarchy
167 if (repeater.model === index + 1) {
168 goUp()
169 } else {
170 goTo(pathRaw(folder, index))
171 }
172 }
173 }
174 }167 }
175 }168 }
176 }169 }
@@ -178,17 +171,20 @@
178 /* Memory of Previously visited folders */171 /* Memory of Previously visited folders */
179 Row {172 Row {
180 id: memoryRow173 id: memoryRow
181 anchors.left: row.right // Not placed in the other row, to help avoid making contentX calculations more complicated.174 anchors {
182175 top: parent.top
176 bottom: parent.bottom
177 left: row.right // Not placed in the other row, to help avoid making contentX calculations more complicated.
178 }
183 /* Previously visited folders */179 /* Previously visited folders */
184 Repeater {180 Repeater {
185 id: memoryRepeater181 id: memoryRepeater
186 model: repeater.memoryModel - repeater.model182 model: repeater.memoryModel - repeater.model
187183
188 delegate: Rectangle {184 delegate: AbstractButton {
189 width: memoryLabel.width + memoryPathSeparator.width185 width: memoryLabel.width + memoryPathSeparator.width
190 height: units.gu(7)186 height: memoryRow.height
191 color: "transparent"187 onClicked: goTo(pathRaw(repeater.memoryPath, repeater.memoryModel-memoryRepeater.model+index))
192188
193 Label {189 Label {
194 id: memoryLabel190 id: memoryLabel
@@ -213,14 +209,8 @@
213 color: UbuntuColors.inkstone209 color: UbuntuColors.inkstone
214 // clip: true210 // clip: true
215 }211 }
216
217 MouseArea {
218 anchors.fill: parent
219 onClicked: {
220 goTo(pathRaw(repeater.memoryPath, repeater.memoryModel-memoryRepeater.model+index))
221 }
222 }
223 }212 }
224 }213 }
225 }214 }
226}215}
216
227217
=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml 2016-06-05 06:28:30 +0000
+++ src/app/qml/ui/FolderListPage.qml 2016-06-09 11:18:31 +0000
@@ -27,124 +27,129 @@
2727
28PageWithBottomEdge {28PageWithBottomEdge {
29 id: folderListPage29 id: folderListPage
30 title: basename(folder)
31 bottomEdgeTitle: i18n.tr("Places")30 bottomEdgeTitle: i18n.tr("Places")
32 bottomEdgeEnabled: !sidebar.expanded31 bottomEdgeEnabled: !sidebar.expanded
33 bottomEdgePageSource: Qt.resolvedUrl("PlacesPage.qml")32 bottomEdgePageSource: Qt.resolvedUrl("PlacesPage.qml")
3433
35 head.contents: PathHistoryRow {}34 header: PageHeader {
3635 title: basename(folder)
37 /* Go to last folder visited */36 contents: PathHistoryRow {}
38 head.backAction: Action {37 flickable: !sidebar.expanded ?
39 id: back38 (folderListView.visible ? folderListView.flickable : folderIconView.flickable) : null
40 objectName: "back"39 leadingActionBar.actions: [
41 iconName: "back"40 /* Go to last folder visited */
4241 Action {
43 onTriggered: {42 id: back
44 goBack()43 objectName: "back"
44 iconName: "back"
45
46 onTriggered: {
47 goBack()
48 }
49 }
50 ]
51 trailingActionBar {
52 numberOfSlots: 3
53 actions: [
54 Action {
55 id: pasteButton
56 objectName: "paste"
57 iconName: "edit-paste"
58 // Translation message was implemented according to:
59 // http://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components.i18n/
60 // It allows correct translation for languages with more than two plural forms:
61 // http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html
62 text: i18n.tr("Paste %1 File", "Paste %1 Files", pageModel.clipboardUrlsCounter).arg(pageModel.clipboardUrlsCounter)
63 visible: pageModel.clipboardUrlsCounter > 0
64 onTriggered: {
65 console.log("Pasting to current folder items of count " + pageModel.clipboardUrlsCounter)
66 fileOperationDialog.startOperation(i18n.tr("Paste files"))
67 pageModel.paste()
68 }
69 },
70 Action {
71 id: clearClipboardButton
72 objectName: "clearClipboard"
73 iconName: "edit-clear"
74 text: i18n.tr("Clear clipboard")
75 visible: pageModel.clipboardUrlsCounter > 0
76 onTriggered: {
77 console.log("Clearing clipboard")
78 pageModel.clearClipboard()
79 }
80 },
81 Action {
82 id: optionsButton
83 iconName: "view-list-symbolic"
84 text: i18n.tr("Properties")
85 onTriggered: {
86 PopupUtils.open(Qt.resolvedUrl("ViewPopover.qml"), parent)
87 }
88 },
89 Action {
90 id: createNewFolder
91 objectName: "createFolder"
92 iconName: "add"
93 text: i18n.tr("New Folder")
94 onTriggered: {
95 print(text)
96 PopupUtils.open(createFolderDialog, folderListPage)
97 }
98 },
99 Action {
100 id: viewProperties
101 iconName: "info"
102 text: i18n.tr("Properties")
103 onTriggered: {
104 print(text)
105 PopupUtils.open(Qt.resolvedUrl("FileDetailsPopover.qml"), folderListPage,{ "model": pageModel})
106 }
107 },
108 Action {
109 id: settingsButton
110 iconName: "settings"
111 objectName: "settings"
112 text: i18n.tr("Settings")
113 visible: sidebar.expanded
114 onTriggered: pageStack.push(settingsPage);
115 },
116 Action {
117 id: gotoButton
118 iconName: "find"
119 objectName:"Find"
120 text: i18n.tr("Go To")
121 visible: sidebar.expanded
122 onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent)
123 },
124 Action {
125 id: unlockButton
126 iconName: "lock"
127 text: i18n.tr("Unlock full access")
128 visible: pageModel.onlyAllowedPaths
129 onTriggered: {
130 console.log("Full access clicked")
131 var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"),
132 folderListPage)
133
134 authDialog.passwordEntered.connect(function(password) {
135 if (pamAuthentication.validatePasswordToken(password)) {
136 console.log("Authenticated for full access")
137 pageModel.onlyAllowedPaths = false
138 } else {
139 PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage,
140 {
141 title: i18n.tr("Authentication failed")
142 })
143
144 console.log("Could not authenticate")
145 }
146 })
147 }
148 }
149 ]
45 }150 }
46 }151 }
47152
48 head.actions: [
49 Action {
50 id: pasteButton
51 objectName: "paste"
52 iconName: "edit-paste"
53 // Translation message was implemented according to:
54 // http://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components.i18n/
55 // It allows correct translation for languages with more than two plural forms:
56 // http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html
57 text: i18n.tr("Paste %1 File", "Paste %1 Files", pageModel.clipboardUrlsCounter).arg(pageModel.clipboardUrlsCounter)
58 visible: pageModel.clipboardUrlsCounter > 0
59 onTriggered: {
60 console.log("Pasting to current folder items of count " + pageModel.clipboardUrlsCounter)
61 fileOperationDialog.startOperation(i18n.tr("Paste files"))
62 pageModel.paste()
63 }
64 },
65 Action {
66 id: clearClipboardButton
67 objectName: "clearClipboard"
68 iconName: "edit-clear"
69 text: i18n.tr("Clear clipboard")
70 visible: pageModel.clipboardUrlsCounter > 0
71 onTriggered: {
72 console.log("Clearing clipboard")
73 pageModel.clearClipboard()
74 }
75 },
76 Action {
77 id: optionsButton
78 iconName: "view-list-symbolic"
79 text: i18n.tr("Properties")
80 onTriggered: {
81 PopupUtils.open(Qt.resolvedUrl("ViewPopover.qml"), parent)
82 }
83 },
84 Action {
85 id: createNewFolder
86 objectName: "createFolder"
87 iconName: "add"
88 text: i18n.tr("New Folder")
89 onTriggered: {
90 print(text)
91 PopupUtils.open(createFolderDialog, folderListPage)
92 }
93 },
94 Action {
95 id: viewProperties
96 iconName: "info"
97 text: i18n.tr("Properties")
98 onTriggered: {
99 print(text)
100 PopupUtils.open(Qt.resolvedUrl("FileDetailsPopover.qml"), folderListPage,{ "model": pageModel})
101 }
102 },
103 Action {
104 id: settingsButton
105 iconName: "settings"
106 objectName: "settings"
107 text: i18n.tr("Settings")
108 visible: sidebar.expanded
109 onTriggered: pageStack.push(settingsPage);
110 },
111 Action {
112 id: gotoButton
113 iconName: "find"
114 objectName:"Find"
115 text: i18n.tr("Go To")
116 visible: sidebar.expanded
117 onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent)
118 },
119 Action {
120 id: unlockButton
121 iconName: "lock"
122 text: i18n.tr("Unlock full access")
123 visible: pageModel.onlyAllowedPaths
124 onTriggered: {
125 console.log("Full access clicked")
126 var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"),
127 folderListPage)
128
129 authDialog.passwordEntered.connect(function(password) {
130 if (pamAuthentication.validatePasswordToken(password)) {
131 console.log("Authenticated for full access")
132 pageModel.onlyAllowedPaths = false
133 } else {
134 PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage,
135 {
136 title: i18n.tr("Authentication failed")
137 })
138
139 console.log("Could not authenticate")
140 }
141 })
142 }
143 }
144 ]
145 flickable: !sidebar.expanded ?
146 (folderListView.visible ? folderListView.flickable : folderIconView.flickable) : null
147
148 property variant fileView: folderListPage153 property variant fileView: folderListPage
149 property bool showHiddenFiles: false154 property bool showHiddenFiles: false
150 property bool showingListView: folderListView.visible155 property bool showingListView: folderListView.visible
@@ -158,6 +163,8 @@
158163
159 property FolderListSelection selectionManager: pageModel.selectionObject()164 property FolderListSelection selectionManager: pageModel.selectionObject()
160165
166 readonly property bool __anchorToHeader: sidebar.expanded
167
161 onShowHiddenFilesChanged: {168 onShowHiddenFilesChanged: {
162 pageModel.showHiddenFiles = folderListPage.showHiddenFiles169 pageModel.showHiddenFiles = folderListPage.showHiddenFiles
163 }170 }
@@ -306,12 +313,12 @@
306 PlacesSidebar {313 PlacesSidebar {
307 id: sidebar314 id: sidebar
308 objectName: "placesSidebar"315 objectName: "placesSidebar"
309316 anchors {
310 // anchors {317 left: mode === "left" ? parent.left : undefined
311 // top: parent.top318 right: mode === "right" ? parent.right : undefined
312 // bottom: parent.bottom319 top: folderListPage.header.bottom
313 // bottomMargin: units.gu(-2)320 bottom: parent.bottom
314 // }321 }
315322
316 expanded: showSidebar323 expanded: showSidebar
317 }324 }
@@ -370,7 +377,7 @@
370377
371 folderListModel: pageModel378 folderListModel: pageModel
372 anchors {379 anchors {
373 top: parent.top380 top: __anchorToHeader ? folderListPage.header.bottom : parent.top
374 bottom: bottomBar.top381 bottom: bottomBar.top
375 left: sidebar.right382 left: sidebar.right
376 right: parent.right383 right: parent.right
@@ -386,7 +393,7 @@
386393
387 folderListModel: pageModel394 folderListModel: pageModel
388 anchors {395 anchors {
389 top: parent.top396 top: __anchorToHeader ? folderListPage.header.bottom : parent.top
390 bottom: bottomBar.top397 bottom: bottomBar.top
391 left: sidebar.right398 left: sidebar.right
392 right: parent.right399 right: parent.right
@@ -829,7 +836,7 @@
829 } else if (file === "/") {836 } else if (file === "/") {
830 iconPath = "/usr/share/icons/Humanity/devices/48/drive-harddisk.svg"837 iconPath = "/usr/share/icons/Humanity/devices/48/drive-harddisk.svg"
831 } else if (file === userplaces.locationSamba) {838 } else if (file === userplaces.locationSamba) {
832 iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg"839 iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg"
833 } else if (userplaces.isUserMountDirectory(file)) {840 } else if (userplaces.isUserMountDirectory(file)) {
834 // In context of Ubuntu Touch this means SDCard currently.841 // In context of Ubuntu Touch this means SDCard currently.
835 iconPath = "/usr/share/icons/Humanity/devices/48/drive-removable-media.svg"842 iconPath = "/usr/share/icons/Humanity/devices/48/drive-removable-media.svg"
@@ -936,8 +943,8 @@
936 if (model.isBrowsable) {943 if (model.isBrowsable) {
937 console.log("browsable path="+model.filePath+" isRemote="+model.isRemote+" needsAuthentication="+model.needsAuthentication)944 console.log("browsable path="+model.filePath+" isRemote="+model.isRemote+" needsAuthentication="+model.needsAuthentication)
938 if ((model.isReadable && model.isExecutable) ||945 if ((model.isReadable && model.isExecutable) ||
939 (model.isRemote && model.needsAuthentication) //in this case it is necessary to generate the signal needsAuthentication()946 (model.isRemote && model.needsAuthentication) //in this case it is necessary to generate the signal needsAuthentication()
940 ) {947 ) {
941 console.log("Changing to dir", model.filePath)948 console.log("Changing to dir", model.filePath)
942 //prefer pageModel.cdIntoIndex() because it is not necessary to parse the path949 //prefer pageModel.cdIntoIndex() because it is not necessary to parse the path
943 //goTo(model.filePath)950 //goTo(model.filePath)
@@ -956,7 +963,7 @@
956 if (fileSelectorMode) {963 if (fileSelectorMode) {
957 selectionManager.select(model.index,false,true)964 selectionManager.select(model.index,false,true)
958 } else {965 } else {
959 openFile(model)966 openFile(model)
960 }967 }
961 }968 }
962 }969 }
963970
=== modified file 'src/app/qml/ui/PlacesPage.qml'
--- src/app/qml/ui/PlacesPage.qml 2016-01-18 10:32:34 +0000
+++ src/app/qml/ui/PlacesPage.qml 2016-06-09 11:18:31 +0000
@@ -23,11 +23,13 @@
2323
24Page {24Page {
25 id: root25 id: root
26
27 title: i18n.tr("Places")
28 objectName: 'PlacesPage'
29 // ADDED THIS PROPERTY FOR BUG #1341671 WORKAROUND26 // ADDED THIS PROPERTY FOR BUG #1341671 WORKAROUND
30 property string testProperty: "justForAutopilotTests"27 property string testProperty: "justForAutopilotTests"
28 objectName: 'PlacesPage'
29
30 header: PageHeader {
31 title: i18n.tr("Places")
32 }
3133
32 Flickable {34 Flickable {
33 objectName: "placesFlickable"35 objectName: "placesFlickable"
@@ -116,5 +118,4 @@
116 }118 }
117 }119 }
118 }120 }
119
120}121}
121122
=== modified file 'src/app/qml/ui/SettingsSheet.qml'
--- src/app/qml/ui/SettingsSheet.qml 2016-01-18 10:32:34 +0000
+++ src/app/qml/ui/SettingsSheet.qml 2016-06-09 11:18:31 +0000
@@ -28,16 +28,18 @@
28 */28 */
29Page {29Page {
30 id: sheet30 id: sheet
31 title: i18n.tr("Settings")
3231
33 Component.onCompleted: {32 header: PageHeader {
34 sheet.__leftButton.text = i18n.tr("Close")33 title: i18n.tr("Settings")
35 sheet.__foreground.style = Theme.createStyleComponent(Qt.resolvedUrl("../components/SuruSheetStyle.qml"), sheet)
36 }34 }
3735
38 Column {36 Column {
39 anchors.fill: parent37 anchors {
40 anchors.margins: units.gu(-1)38 left: parent.left
39 top: sheet.header.bottom
40 right: parent.right
41 bottom: parent.bottom
42 }
4143
42 Standard {44 Standard {
43 text: i18n.tr("Show Advanced Features")45 text: i18n.tr("Show Advanced Features")

Subscribers

People subscribed via source and target branches