Merge lp:~dpm/ubuntu-filemanager-app/merge-settings into lp:ubuntu-filemanager-app
- merge-settings
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~dpm/ubuntu-filemanager-app/merge-settings |
Merge into: | lp:ubuntu-filemanager-app |
Diff against target: |
604 lines (+137/-367) 5 files modified
src/app/qml/filemanager.qml (+8/-29) src/app/qml/ui/FolderListPage.qml (+6/-15) src/app/qml/ui/PlacesPopover.qml (+0/-149) src/app/qml/ui/SettingsPage.qml (+123/-19) src/app/qml/ui/ViewPopover.qml (+0/-155) |
To merge this branch: | bzr merge lp:~dpm/ubuntu-filemanager-app/merge-settings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jenkins Bot | continuous-integration | Needs Fixing | |
Arto Jalkanen | Needs Fixing | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+240543@code.launchpad.net |
Commit message
Merges the view options and the current settings view into a single settings page.
Description of the change
Merges the view options and the current settings view into a single settings page.
I've done some cleanup and removed some dead code. However, one related thing that still needs to be fixed is how settings are stored and the UI updated when they change. I see two issues with the current code:
- Settings are properties of either MainView or the FolderListPage component. This makes it a bit unwieldy to set from the Settings page. They should all probably be properties of one single component.
- The way to put settings into effect once they've been changed from the Settings page is to use the reloadSettings() function. Is there a more efficient way to trigger an update of the properties?
Any feedback will be really welcome!
Notes:
- Not an issue, but the use of a dark theme triggers bug 1389112 (UbuntuShape shown for ItemSelector)
- Not a big issue, but again the use of a dark theme triggers bug 1389115 (ItemSelector ticks not visible)
- Wrapping the settings into i18n.tr() is not a good idea, as if a translation is done after one particular release, then the database will be out of sync with the UI. Need to find a solution to store the settings in English while showing them translated in the UI.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Arto Jalkanen (ajalkane) wrote : | # |
I tried changing (in tablet mode, using List view) for example to "Sort by date". It had no effect. I tried changing "Sort order" - no change.
Another problem is that these settings are not accessible at all in "phone" mode. Probably an artifact of the former "feature" that "Settings" page was only available in "tablet" mode.
- 322. By David Planella
-
Made settings visible on phone mode
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:322
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Arto Jalkanen (ajalkane) wrote : | # |
Now settings available in phone mode, but there's still the problem that changing sort mode doesn't work (in neither tablet nor phone mode).
Console gets this error when trying to change those Settings:
file://
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:322
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 322. By David Planella
-
Made settings visible on phone mode
- 321. By David Planella
-
Removed dead code, wrapped settings in a flickable, created layout for settings
- 320. By David Planella
-
Merged different settings into one page
Preview Diff
1 | === modified file 'src/app/qml/filemanager.qml' | |||
2 | --- src/app/qml/filemanager.qml 2014-10-28 14:29:20 +0000 | |||
3 | +++ src/app/qml/filemanager.qml 2014-11-05 05:37:10 +0000 | |||
4 | @@ -76,16 +76,6 @@ | |||
5 | 76 | serviceName: "filemanager" | 76 | serviceName: "filemanager" |
6 | 77 | } | 77 | } |
7 | 78 | 78 | ||
8 | 79 | // HUD Actions | ||
9 | 80 | Action { | ||
10 | 81 | id: settingsAction | ||
11 | 82 | text: i18n.tr("Settings") | ||
12 | 83 | description: i18n.tr("Change app settings") | ||
13 | 84 | iconSource: getIcon("settings") | ||
14 | 85 | onTriggered: showSettings() | ||
15 | 86 | } | ||
16 | 87 | actions: [settingsAction] | ||
17 | 88 | |||
18 | 89 | property var pageStack: pageStack | 79 | property var pageStack: pageStack |
19 | 90 | 80 | ||
20 | 91 | property var folderTabs: [userplaces.locationHome] | 81 | property var folderTabs: [userplaces.locationHome] |
21 | @@ -164,15 +154,10 @@ | |||
22 | 164 | folder: userplaces.locationHome //modelData | 154 | folder: userplaces.locationHome //modelData |
23 | 165 | } | 155 | } |
24 | 166 | } | 156 | } |
34 | 167 | Tab { | 157 | |
35 | 168 | title: "page.title" | 158 | Tab { |
36 | 169 | page: Page { | 159 | title: "page.title" |
37 | 170 | objectName: "settingsPage" | 160 | page: SettingsPage { |
29 | 171 | } | ||
30 | 172 | } | ||
31 | 173 | Tab { | ||
32 | 174 | title: "page.title" | ||
33 | 175 | page: SettingsSheet { | ||
38 | 176 | id: settingsPage | 161 | id: settingsPage |
39 | 177 | } | 162 | } |
40 | 178 | } | 163 | } |
41 | @@ -215,15 +200,17 @@ | |||
42 | 215 | create: true | 200 | create: true |
43 | 216 | 201 | ||
44 | 217 | defaults: { | 202 | defaults: { |
45 | 203 | showHiddenFiles: false | ||
46 | 218 | showAdvancedFeatures: false | 204 | showAdvancedFeatures: false |
47 | 219 | collapsedSidebar: false | 205 | collapsedSidebar: false |
48 | 206 | viewMethod: i18n.tr("List") | ||
49 | 220 | } | 207 | } |
50 | 221 | } | 208 | } |
51 | 222 | 209 | ||
52 | 223 | // Individual settings, used for bindings | 210 | // Individual settings, used for bindings |
53 | 224 | property bool showAdvancedFeatures: false | 211 | property bool showAdvancedFeatures: false |
54 | 225 | 212 | ||
56 | 226 | property var viewMethod | 213 | property var viewMethod: getSetting("viewMethod", wideAspect ? i18n.tr("Icons") : i18n.tr("List")) |
57 | 227 | 214 | ||
58 | 228 | property bool collapsedSidebar: false | 215 | property bool collapsedSidebar: false |
59 | 229 | 216 | ||
60 | @@ -251,12 +238,8 @@ | |||
61 | 251 | } | 238 | } |
62 | 252 | } | 239 | } |
63 | 253 | 240 | ||
64 | 254 | function showSettings() { | ||
65 | 255 | PopupUtils.open(Qt.resolvedUrl("ui/SettingsSheet.qml"), mainView) | ||
66 | 256 | } | ||
67 | 257 | |||
68 | 258 | function reloadSettings() { | 241 | function reloadSettings() { |
70 | 259 | //showAdvancedFeatures = getSetting("showAdvancedFeatures", false) | 242 | showAdvancedFeatures = getSetting("showAdvancedFeatures", false) |
71 | 260 | viewMethod = getSetting("viewMethod", wideAspect ? i18n.tr("Icons") : i18n.tr("List")) | 243 | viewMethod = getSetting("viewMethod", wideAspect ? i18n.tr("Icons") : i18n.tr("List")) |
72 | 261 | collapsedSidebar = getSetting("collapsedSidebar", false) | 244 | collapsedSidebar = getSetting("collapsedSidebar", false) |
73 | 262 | } | 245 | } |
74 | @@ -265,10 +248,6 @@ | |||
75 | 265 | reloadSettings() | 248 | reloadSettings() |
76 | 266 | } | 249 | } |
77 | 267 | 250 | ||
78 | 268 | function getIcon(name) { | ||
79 | 269 | return "/usr/share/icons/ubuntu-mobile/actions/scalable/" + name + ".svg" //Qt.resolvedUrl("icons/" + name + ".png") | ||
80 | 270 | } | ||
81 | 271 | |||
82 | 272 | function error(title, message) { | 251 | function error(title, message) { |
83 | 273 | PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), mainView, | 252 | PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), mainView, |
84 | 274 | { | 253 | { |
85 | 275 | 254 | ||
86 | === modified file 'src/app/qml/ui/FolderListPage.qml' | |||
87 | --- src/app/qml/ui/FolderListPage.qml 2014-11-01 23:44:58 +0000 | |||
88 | +++ src/app/qml/ui/FolderListPage.qml 2014-11-05 05:37:10 +0000 | |||
89 | @@ -69,12 +69,11 @@ | |||
90 | 69 | } | 69 | } |
91 | 70 | }, | 70 | }, |
92 | 71 | Action { | 71 | Action { |
99 | 72 | id: optionsButton | 72 | id: settingsButton |
100 | 73 | iconName: "view-list-symbolic" | 73 | iconName: "settings" |
101 | 74 | text: i18n.tr("Properties") | 74 | objectName: "settings" |
102 | 75 | onTriggered: { | 75 | text: i18n.tr("Settings") |
103 | 76 | PopupUtils.open(Qt.resolvedUrl("ViewPopover.qml"), parent) | 76 | onTriggered: pageStack.push(settingsPage); |
98 | 77 | } | ||
104 | 78 | }, | 77 | }, |
105 | 79 | Action { | 78 | Action { |
106 | 80 | id: createNewFolder | 79 | id: createNewFolder |
107 | @@ -96,14 +95,6 @@ | |||
108 | 96 | } | 95 | } |
109 | 97 | }, | 96 | }, |
110 | 98 | Action { | 97 | Action { |
111 | 99 | id: settingsButton | ||
112 | 100 | iconName: "settings" | ||
113 | 101 | objectName: "settings" | ||
114 | 102 | text: i18n.tr("Settings") | ||
115 | 103 | visible: sidebar.expanded | ||
116 | 104 | onTriggered: pageStack.push(settingsPage); | ||
117 | 105 | }, | ||
118 | 106 | Action { | ||
119 | 107 | id: gotoButton | 98 | id: gotoButton |
120 | 108 | iconName: "find" | 99 | iconName: "find" |
121 | 109 | text: i18n.tr("Go To") | 100 | text: i18n.tr("Go To") |
122 | @@ -139,7 +130,7 @@ | |||
123 | 139 | flickable: !sidebar.expanded ? | 130 | flickable: !sidebar.expanded ? |
124 | 140 | (folderListView.visible ? folderListView : folderIconView.flickable) : null | 131 | (folderListView.visible ? folderListView : folderIconView.flickable) : null |
125 | 141 | 132 | ||
127 | 142 | property variant fileView: folderListPage | 133 | property alias fileView: folderListPage |
128 | 143 | property bool showHiddenFiles: false | 134 | property bool showHiddenFiles: false |
129 | 144 | property bool showingListView: folderListView.visible | 135 | property bool showingListView: folderListView.visible |
130 | 145 | property string sortingMethod: "Name" | 136 | property string sortingMethod: "Name" |
131 | 146 | 137 | ||
132 | === removed file 'src/app/qml/ui/PlacesPopover.qml' | |||
133 | --- src/app/qml/ui/PlacesPopover.qml 2014-10-20 21:19:26 +0000 | |||
134 | +++ src/app/qml/ui/PlacesPopover.qml 1970-01-01 00:00:00 +0000 | |||
135 | @@ -1,149 +0,0 @@ | |||
136 | 1 | /* | ||
137 | 2 | * Copyright (C) 2013, 2014 Canonical Ltd | ||
138 | 3 | * | ||
139 | 4 | * This program is free software: you can redistribute it and/or modify | ||
140 | 5 | * it under the terms of the GNU General Public License version 3 as | ||
141 | 6 | * published by the Free Software Foundation. | ||
142 | 7 | * | ||
143 | 8 | * This program is distributed in the hope that it will be useful, | ||
144 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
145 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
146 | 11 | * GNU General Public License for more details. | ||
147 | 12 | * | ||
148 | 13 | * You should have received a copy of the GNU General Public License | ||
149 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
150 | 15 | * | ||
151 | 16 | * Authored by: Michael Spencer <sonrisesoftware@gmail.com> | ||
152 | 17 | */ | ||
153 | 18 | import QtQuick 2.3 | ||
154 | 19 | import Ubuntu.Components 1.1 | ||
155 | 20 | import Ubuntu.Components.Popups 1.0 | ||
156 | 21 | import Ubuntu.Components.ListItems 1.0 | ||
157 | 22 | import com.ubuntu.PlacesModel 0.1 | ||
158 | 23 | |||
159 | 24 | Popover { | ||
160 | 25 | id: root | ||
161 | 26 | objectName: "placesPopover" | ||
162 | 27 | |||
163 | 28 | Column { | ||
164 | 29 | // Places must not be visible when virtual keyboard is open, because then | ||
165 | 30 | // the virtual keyboard can push the text input out of visible area and | ||
166 | 31 | // you don't see what you type. So when virtual keyboard is open we show | ||
167 | 32 | // only the text input and a "Places" icon that you can click to get the | ||
168 | 33 | // full list again. | ||
169 | 34 | Connections { | ||
170 | 35 | id: placesVisibleController | ||
171 | 36 | target: Qt.inputMethod | ||
172 | 37 | onVisibleChanged: { | ||
173 | 38 | showPlaces.visible = Qt.inputMethod.visible | ||
174 | 39 | placesList.visible = !Qt.inputMethod.visible | ||
175 | 40 | } | ||
176 | 41 | } | ||
177 | 42 | |||
178 | 43 | anchors { | ||
179 | 44 | left: parent.left | ||
180 | 45 | right: parent.right | ||
181 | 46 | top: parent.top | ||
182 | 47 | } | ||
183 | 48 | |||
184 | 49 | Empty { | ||
185 | 50 | |||
186 | 51 | TextField { | ||
187 | 52 | id: locationField | ||
188 | 53 | objectName: "inputField" | ||
189 | 54 | anchors { | ||
190 | 55 | verticalCenter: parent.verticalCenter | ||
191 | 56 | left: parent.left | ||
192 | 57 | right: goButton.left | ||
193 | 58 | margins: units.gu(1) | ||
194 | 59 | } | ||
195 | 60 | |||
196 | 61 | inputMethodHints: Qt.ImhNoAutoUppercase | ||
197 | 62 | |||
198 | 63 | property bool valid: pathExists(text) | ||
199 | 64 | |||
200 | 65 | text: fileView.folder | ||
201 | 66 | |||
202 | 67 | placeholderText: i18n.tr("Location...") | ||
203 | 68 | |||
204 | 69 | onAccepted: goButton.clicked() | ||
205 | 70 | } | ||
206 | 71 | |||
207 | 72 | Button { | ||
208 | 73 | id: goButton | ||
209 | 74 | objectName: "okButton" | ||
210 | 75 | anchors { | ||
211 | 76 | top: locationField.top | ||
212 | 77 | bottom: locationField.bottom | ||
213 | 78 | right: parent.right | ||
214 | 79 | rightMargin: units.gu(1) | ||
215 | 80 | } | ||
216 | 81 | |||
217 | 82 | text: i18n.tr("Go") | ||
218 | 83 | enabled: locationField.acceptableInput && locationField.valid | ||
219 | 84 | |||
220 | 85 | onClicked: { | ||
221 | 86 | print("User switched to:", locationField.text) | ||
222 | 87 | goTo(locationField.text) | ||
223 | 88 | PopupUtils.close(root) | ||
224 | 89 | } | ||
225 | 90 | } | ||
226 | 91 | } | ||
227 | 92 | |||
228 | 93 | Empty { | ||
229 | 94 | id: showPlaces | ||
230 | 95 | visible: false | ||
231 | 96 | Standard { | ||
232 | 97 | objectName: "showPlaces" | ||
233 | 98 | |||
234 | 99 | Label { | ||
235 | 100 | anchors.left: parent.left | ||
236 | 101 | anchors.leftMargin: units.gu(8) | ||
237 | 102 | anchors.verticalCenter: parent.verticalCenter | ||
238 | 103 | text: i18n.tr("Places") | ||
239 | 104 | color: Theme.palette.normal.overlayText | ||
240 | 105 | } | ||
241 | 106 | |||
242 | 107 | onClicked: { | ||
243 | 108 | locationField.activeFocus = false | ||
244 | 109 | } | ||
245 | 110 | |||
246 | 111 | iconSource: getIcon("location") | ||
247 | 112 | |||
248 | 113 | iconFrame: false | ||
249 | 114 | } | ||
250 | 115 | } | ||
251 | 116 | |||
252 | 117 | Repeater { | ||
253 | 118 | id: placesList | ||
254 | 119 | objectName: "placesList" | ||
255 | 120 | visible: true | ||
256 | 121 | model: PlacesModel {} | ||
257 | 122 | |||
258 | 123 | delegate: Standard { | ||
259 | 124 | visible: placesList.visible | ||
260 | 125 | objectName: "place" + folderDisplayName(path).replace(/ /g,'') | ||
261 | 126 | property string name: folderDisplayName(path) | ||
262 | 127 | |||
263 | 128 | Label { | ||
264 | 129 | anchors.left: parent.left | ||
265 | 130 | anchors.leftMargin: units.gu(8) | ||
266 | 131 | anchors.verticalCenter: parent.verticalCenter | ||
267 | 132 | text: folderDisplayName(path) | ||
268 | 133 | color: selected ? UbuntuColors.orange : Theme.palette.normal.overlayText | ||
269 | 134 | } | ||
270 | 135 | |||
271 | 136 | iconSource: model.icon || fileIcon(model.path, true) | ||
272 | 137 | |||
273 | 138 | onClicked: { | ||
274 | 139 | PopupUtils.close(root) | ||
275 | 140 | goTo(model.path) | ||
276 | 141 | } | ||
277 | 142 | |||
278 | 143 | selected: folder === path | ||
279 | 144 | iconFrame: false | ||
280 | 145 | showDivider: index < (placesList.count - 1) | ||
281 | 146 | } | ||
282 | 147 | } | ||
283 | 148 | } | ||
284 | 149 | } | ||
285 | 150 | 0 | ||
286 | === renamed file 'src/app/qml/ui/SettingsSheet.qml' => 'src/app/qml/ui/SettingsPage.qml' | |||
287 | --- src/app/qml/ui/SettingsSheet.qml 2014-10-18 00:35:24 +0000 | |||
288 | +++ src/app/qml/ui/SettingsPage.qml 2014-11-05 05:37:10 +0000 | |||
289 | @@ -17,8 +17,7 @@ | |||
290 | 17 | */ | 17 | */ |
291 | 18 | import QtQuick 2.3 | 18 | import QtQuick 2.3 |
292 | 19 | import Ubuntu.Components 1.1 | 19 | import Ubuntu.Components 1.1 |
295 | 20 | import Ubuntu.Components.ListItems 1.0 | 20 | import Ubuntu.Components.ListItems 1.0 as ListItem |
294 | 21 | import Ubuntu.Components.Popups 1.0 | ||
296 | 22 | 21 | ||
297 | 23 | /* | 22 | /* |
298 | 24 | * The Settings page holds global settings/preferences. | 23 | * The Settings page holds global settings/preferences. |
299 | @@ -30,23 +29,128 @@ | |||
300 | 30 | id: sheet | 29 | id: sheet |
301 | 31 | title: i18n.tr("Settings") | 30 | title: i18n.tr("Settings") |
302 | 32 | 31 | ||
320 | 33 | Component.onCompleted: { | 32 | Flickable { |
321 | 34 | sheet.__leftButton.text = i18n.tr("Close") | 33 | id: flickable |
322 | 35 | sheet.__foreground.style = Theme.createStyleComponent(Qt.resolvedUrl("../components/SuruSheetStyle.qml"), sheet) | 34 | anchors { |
323 | 36 | } | 35 | fill: parent |
324 | 37 | 36 | topMargin: units.gu(1) | |
325 | 38 | Column { | 37 | bottomMargin: units.gu(1) |
326 | 39 | anchors.fill: parent | 38 | } |
327 | 40 | anchors.margins: units.gu(-1) | 39 | contentWidth: parent.width |
328 | 41 | 40 | contentHeight: parent.height | |
329 | 42 | Standard { | 41 | boundsBehavior: (contentHeight > parent.height) ? |
330 | 43 | text: i18n.tr("Show Advanced Features") | 42 | Flickable.DragAndOvershootBounds : Flickable.StopAtBounds |
331 | 44 | control: CheckBox { | 43 | |
332 | 45 | id: showAdvancedFeaturesCheckBox | 44 | Column { |
333 | 46 | checked: showAdvancedFeatures | 45 | id: content |
334 | 47 | onCheckedChanged: { | 46 | spacing: units.gu(1) |
335 | 48 | saveSetting("showAdvancedFeatures", showAdvancedFeaturesCheckBox.checked ? "true" : "false"); | 47 | anchors { |
336 | 49 | } | 48 | margins: units.gu(3) |
337 | 49 | left: parent.left | ||
338 | 50 | right: parent.right | ||
339 | 51 | } | ||
340 | 52 | |||
341 | 53 | ListItem.Standard { | ||
342 | 54 | text: i18n.tr("Show Hidden Files") | ||
343 | 55 | control: CheckBox { | ||
344 | 56 | id: showHiddenFilesCheckBox | ||
345 | 57 | objectName: "showHiddenFileCheckBox" | ||
346 | 58 | checked: getSetting("showHiddenFiles", false); | ||
347 | 59 | onCheckedChanged: { | ||
348 | 60 | saveSetting("showHiddenFiles", | ||
349 | 61 | showHiddenFilesCheckBox.checked ? true : false); | ||
350 | 62 | fileView.showHiddenFiles = checked | ||
351 | 63 | } | ||
352 | 64 | } | ||
353 | 65 | } | ||
354 | 66 | |||
355 | 67 | ListItem.ItemSelector { | ||
356 | 68 | text: i18n.tr("View As") | ||
357 | 69 | |||
358 | 70 | expanded: true | ||
359 | 71 | delegate: selectorDelegate | ||
360 | 72 | selectedIndex: model.indexOf(mainView.viewMethod) | ||
361 | 73 | model: [ | ||
362 | 74 | i18n.tr("Icons"), | ||
363 | 75 | i18n.tr("List") | ||
364 | 76 | ] | ||
365 | 77 | |||
366 | 78 | onSelectedIndexChanged: { | ||
367 | 79 | mainView.viewMethod = model[selectedIndex] | ||
368 | 80 | saveSetting("viewMethod", model[selectedIndex]) | ||
369 | 81 | } | ||
370 | 82 | } | ||
371 | 83 | |||
372 | 84 | ListItem.ItemSelector { | ||
373 | 85 | text: i18n.tr("Sort By") | ||
374 | 86 | expanded: true | ||
375 | 87 | width: parent.width | ||
376 | 88 | selectedIndex: values.indexOf(fileView.sortingMethod) | ||
377 | 89 | model: [ | ||
378 | 90 | i18n.tr("Name"), | ||
379 | 91 | i18n.tr("Date") | ||
380 | 92 | ] | ||
381 | 93 | |||
382 | 94 | onSelectedIndexChanged: { | ||
383 | 95 | fileView.sortingMethod = values[selectedIndex] | ||
384 | 96 | } | ||
385 | 97 | } | ||
386 | 98 | |||
387 | 99 | ListItem.ItemSelector { | ||
388 | 100 | text: i18n.tr("Sort Order") | ||
389 | 101 | expanded: true | ||
390 | 102 | selectedIndex: sortAscending ? 0 : 1 | ||
391 | 103 | model: [ | ||
392 | 104 | i18n.tr("Ascending"), | ||
393 | 105 | i18n.tr("Descending") | ||
394 | 106 | ] | ||
395 | 107 | |||
396 | 108 | onSelectedIndexChanged: { | ||
397 | 109 | fileView.sortAscending = (values[selectedIndex] === i18n.tr("Ascending")) | ||
398 | 110 | } | ||
399 | 111 | } | ||
400 | 112 | |||
401 | 113 | ListItem.Standard { | ||
402 | 114 | text: i18n.tr("Show Advanced Features") | ||
403 | 115 | control: CheckBox { | ||
404 | 116 | id: showAdvancedFeaturesCheckBox | ||
405 | 117 | checked: getSetting("showAdvancedFeatures", false); | ||
406 | 118 | onCheckedChanged: { | ||
407 | 119 | saveSetting("showAdvancedFeatures", | ||
408 | 120 | showAdvancedFeaturesCheckBox.checked ? true : false); | ||
409 | 121 | } | ||
410 | 122 | } | ||
411 | 123 | } | ||
412 | 124 | |||
413 | 125 | ListItem.Standard { | ||
414 | 126 | text: i18n.tr("Filter") | ||
415 | 127 | |||
416 | 128 | visible: fileView.showAdvancedFeatures | ||
417 | 129 | |||
418 | 130 | control: TextField { | ||
419 | 131 | id: filterField | ||
420 | 132 | anchors { | ||
421 | 133 | verticalCenter: parent.verticalCenter | ||
422 | 134 | right: parent.right | ||
423 | 135 | margins: units.gu(1) | ||
424 | 136 | } | ||
425 | 137 | |||
426 | 138 | inputMethodHints: Qt.ImhNoAutoUppercase | ||
427 | 139 | |||
428 | 140 | text: pageModel.nameFilters | ||
429 | 141 | |||
430 | 142 | onAccepted: goButton.clicked() | ||
431 | 143 | onTextChanged: { | ||
432 | 144 | if (text !== pageModel.nameFilters) | ||
433 | 145 | pageModel.nameFilters = [text] | ||
434 | 146 | } | ||
435 | 147 | } | ||
436 | 148 | } | ||
437 | 149 | |||
438 | 150 | Component { | ||
439 | 151 | id: selectorDelegate | ||
440 | 152 | |||
441 | 153 | OptionSelectorDelegate { showDivider: false; } | ||
442 | 50 | } | 154 | } |
443 | 51 | } | 155 | } |
444 | 52 | } | 156 | } |
445 | 53 | 157 | ||
446 | === removed file 'src/app/qml/ui/ViewPopover.qml' | |||
447 | --- src/app/qml/ui/ViewPopover.qml 2014-09-20 10:49:51 +0000 | |||
448 | +++ src/app/qml/ui/ViewPopover.qml 1970-01-01 00:00:00 +0000 | |||
449 | @@ -1,155 +0,0 @@ | |||
450 | 1 | /* | ||
451 | 2 | * Copyright (C) 2013 Canonical Ltd | ||
452 | 3 | * | ||
453 | 4 | * This program is free software: you can redistribute it and/or modify | ||
454 | 5 | * it under the terms of the GNU General Public License version 3 as | ||
455 | 6 | * published by the Free Software Foundation. | ||
456 | 7 | * | ||
457 | 8 | * This program is distributed in the hope that it will be useful, | ||
458 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
459 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
460 | 11 | * GNU General Public License for more details. | ||
461 | 12 | * | ||
462 | 13 | * You should have received a copy of the GNU General Public License | ||
463 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
464 | 15 | * | ||
465 | 16 | * Authored by: Michael Spencer <sonrisesoftware@gmail.com> | ||
466 | 17 | */ | ||
467 | 18 | import QtQuick 2.3 | ||
468 | 19 | import Ubuntu.Components 1.1 | ||
469 | 20 | import Ubuntu.Components.Popups 1.0 | ||
470 | 21 | import Ubuntu.Components.ListItems 1.0 | ||
471 | 22 | |||
472 | 23 | Popover { | ||
473 | 24 | id: root | ||
474 | 25 | objectName: "viewPopover" | ||
475 | 26 | |||
476 | 27 | Column { | ||
477 | 28 | anchors { | ||
478 | 29 | left: parent.left | ||
479 | 30 | right: parent.right | ||
480 | 31 | top: parent.top | ||
481 | 32 | } | ||
482 | 33 | |||
483 | 34 | Standard { | ||
484 | 35 | id: showHiddenFileCheckBox | ||
485 | 36 | objectName: "showHiddenFileCheckBox" | ||
486 | 37 | |||
487 | 38 | Label { | ||
488 | 39 | text: i18n.tr("Show Hidden Files") | ||
489 | 40 | fontSize: "medium" | ||
490 | 41 | color: Theme.palette.normal.overlayText | ||
491 | 42 | anchors.left: parent.left | ||
492 | 43 | anchors.leftMargin: units.gu(2) | ||
493 | 44 | anchors.verticalCenter: parent.verticalCenter | ||
494 | 45 | } | ||
495 | 46 | |||
496 | 47 | control: CheckBox { | ||
497 | 48 | anchors.verticalCenter: parent.verticalCenter | ||
498 | 49 | |||
499 | 50 | checked: fileView.showHiddenFiles | ||
500 | 51 | onCheckedChanged: { | ||
501 | 52 | fileView.showHiddenFiles = checked | ||
502 | 53 | } | ||
503 | 54 | } | ||
504 | 55 | } | ||
505 | 56 | |||
506 | 57 | ValueSelector { | ||
507 | 58 | Label { | ||
508 | 59 | text: i18n.tr("View As") | ||
509 | 60 | fontSize: "medium" | ||
510 | 61 | color: Theme.palette.normal.overlayText | ||
511 | 62 | anchors.left: parent.left | ||
512 | 63 | anchors.leftMargin: units.gu(2) | ||
513 | 64 | anchors.top: parent.top | ||
514 | 65 | anchors.topMargin: units.gu(1.6) | ||
515 | 66 | } | ||
516 | 67 | |||
517 | 68 | selectedIndex: values.indexOf(viewMethod) | ||
518 | 69 | values: [ | ||
519 | 70 | i18n.tr("Icons"), | ||
520 | 71 | i18n.tr("List") | ||
521 | 72 | ] | ||
522 | 73 | |||
523 | 74 | onSelectedIndexChanged: { | ||
524 | 75 | saveSetting("viewMethod", values[selectedIndex]) | ||
525 | 76 | } | ||
526 | 77 | } | ||
527 | 78 | |||
528 | 79 | ValueSelector { | ||
529 | 80 | Label { | ||
530 | 81 | text: i18n.tr("Sort By") | ||
531 | 82 | fontSize: "medium" | ||
532 | 83 | color: Theme.palette.normal.overlayText | ||
533 | 84 | anchors.left: parent.left | ||
534 | 85 | anchors.leftMargin: units.gu(2) | ||
535 | 86 | anchors.top: parent.top | ||
536 | 87 | anchors.topMargin: units.gu(1.6) | ||
537 | 88 | } | ||
538 | 89 | |||
539 | 90 | selectedIndex: values.indexOf(fileView.sortingMethod) | ||
540 | 91 | values: [ | ||
541 | 92 | i18n.tr("Name"), | ||
542 | 93 | i18n.tr("Date") | ||
543 | 94 | ] | ||
544 | 95 | |||
545 | 96 | onSelectedIndexChanged: { | ||
546 | 97 | fileView.sortingMethod = values[selectedIndex] | ||
547 | 98 | } | ||
548 | 99 | } | ||
549 | 100 | |||
550 | 101 | ValueSelector { | ||
551 | 102 | Label { | ||
552 | 103 | text: i18n.tr("Sort Order") | ||
553 | 104 | fontSize: "medium" | ||
554 | 105 | color: Theme.palette.normal.overlayText | ||
555 | 106 | anchors.left: parent.left | ||
556 | 107 | anchors.leftMargin: units.gu(2) | ||
557 | 108 | anchors.top: parent.top | ||
558 | 109 | anchors.topMargin: units.gu(1.7) | ||
559 | 110 | } | ||
560 | 111 | |||
561 | 112 | selectedIndex: sortAscending ? 0 : 1 | ||
562 | 113 | values: [ | ||
563 | 114 | i18n.tr("Ascending"), | ||
564 | 115 | i18n.tr("Descending") | ||
565 | 116 | ] | ||
566 | 117 | |||
567 | 118 | onSelectedIndexChanged: { | ||
568 | 119 | fileView.sortAscending = (values[selectedIndex] === i18n.tr("Ascending")) | ||
569 | 120 | } | ||
570 | 121 | } | ||
571 | 122 | |||
572 | 123 | Standard { | ||
573 | 124 | visible: showAdvancedFeatures | ||
574 | 125 | |||
575 | 126 | Label { | ||
576 | 127 | text: i18n.tr("Filter") | ||
577 | 128 | fontSize: "medium" | ||
578 | 129 | color: Theme.palette.normal.overlayText | ||
579 | 130 | anchors.left: parent.left | ||
580 | 131 | anchors.leftMargin: units.gu(2) | ||
581 | 132 | anchors.verticalCenter: parent.verticalCenter | ||
582 | 133 | } | ||
583 | 134 | |||
584 | 135 | TextField { | ||
585 | 136 | id: filterField | ||
586 | 137 | anchors { | ||
587 | 138 | verticalCenter: parent.verticalCenter | ||
588 | 139 | right: parent.right | ||
589 | 140 | margins: units.gu(1) | ||
590 | 141 | } | ||
591 | 142 | |||
592 | 143 | inputMethodHints: Qt.ImhNoAutoUppercase | ||
593 | 144 | |||
594 | 145 | text: pageModel.nameFilters | ||
595 | 146 | |||
596 | 147 | onAccepted: goButton.clicked() | ||
597 | 148 | onTextChanged: { | ||
598 | 149 | if (text !== pageModel.nameFilters) | ||
599 | 150 | pageModel.nameFilters = [text] | ||
600 | 151 | } | ||
601 | 152 | } | ||
602 | 153 | } | ||
603 | 154 | } | ||
604 | 155 | } |
PASSED: Continuous integration, rev:321 91.189. 93.70:8080/ job/ubuntu- filemanager- app-ci/ 379/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1443 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1443/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/ubuntu- filemanager- app-utopic- amd64-ci/ 175
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- filemanager- app-ci/ 379/rebuild
http://