Merge lp:~vthompson/ubuntu-filemanager-app/move-settings-page-to-toolbar into lp:ubuntu-filemanager-app

Proposed by Victor Thompson
Status: Merged
Approved by: Michael Spencer
Approved revision: 100
Merged at revision: 96
Proposed branch: lp:~vthompson/ubuntu-filemanager-app/move-settings-page-to-toolbar
Merge into: lp:ubuntu-filemanager-app
Diff against target: 103 lines (+25/-13)
3 files modified
FolderListPage.qml (+8/-1)
debian/control (+2/-1)
ubuntu-filemanager-app.qml (+15/-11)
To merge this branch: bzr merge lp:~vthompson/ubuntu-filemanager-app/move-settings-page-to-toolbar
Reviewer Review Type Date Requested Status
Michael Spencer Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Carlos Jose Mazieri Approve
Review via email: mp+197783@code.launchpad.net

Commit message

* Move Settings page to be accessible via the toolbar instead of being a separate tab

Description of the change

* Move Settings page to be accessible via the toolbar instead of being a separate tab.

To post a comment you must log in.
97. By Victor Thompson

change View toolbar icon

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

It looks OK to me.

review: Approve
Revision history for this message
Michael Spencer (ibelieve) wrote :

Let's not approve this yet, as I'd like to discuss this with Victor (see the bug report) before merging. I'm okay with the merge request if a better solution doesn't present itself, though.

review: Needs Information
Revision history for this message
Victor Thompson (vthompson) wrote :

What if we remove the toolbar icon in phone mode and instead just have a HUD action? Then in wide mode we could display the icon. This would mean that the icon will be used on the desktop, the icon or HUD for tablet, and just HUD for the phone.

Revision history for this message
Michael Spencer (ibelieve) wrote :

Yes, I like that very much! I haven't started adding support for the HUD yet in any of my apps that I work on, so I hadn't thought of that.

98. By Victor Thompson

Add HUD action to launch Settings page.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Spencer (ibelieve) wrote :

Shouldn't the Settings toolbar button be referencing the Settings action?

Otherwise, it looks good.

review: Needs Fixing
Revision history for this message
Michael Spencer (ibelieve) wrote :

Also, it looks like you accidentally deleted the Suru background colors.

review: Needs Fixing
Revision history for this message
Victor Thompson (vthompson) wrote :

I removed the Suru background colors that were previously commented out. Why would the Settings toolbar button reference the Settings HUD action? Both are called via an onTriggered signal which pushes to the pagestack. Could you explain what you are expecting a little bit more?

Revision history for this message
Michael Spencer (ibelieve) wrote :

Oh, sorry, I didn't notice that the lines you removed were commented out.

This is what I mean about the Settings button:

ToolbarButton {
    id: settingsButton
    objectName: "settings"
    visible: wideAspect
    action: settingsAction
}

Revision history for this message
Michael Spencer (ibelieve) wrote :

You'll also need to add

iconSource: getIcon("settings")

to the action.

99. By Victor Thompson

Call settingsAction from settingsButton

Revision history for this message
Michael Spencer (ibelieve) wrote :

Sorry to be picky, but I want the code to be very clean. You don't need the text property set on the toolbar button, since it gets it from the action and I don't want to worry about changing one and not changing the other (not that I can see it being changed).

review: Needs Fixing
Revision history for this message
Victor Thompson (vthompson) wrote :

Ok, that makes sense.

100. By Victor Thompson

Remove settingsButton text property

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Spencer (ibelieve) wrote :

Looks great, thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'FolderListPage.qml'
2--- FolderListPage.qml 2013-11-23 15:42:58 +0000
3+++ FolderListPage.qml 2013-12-07 18:51:20 +0000
4@@ -368,7 +368,7 @@
5
6 ToolbarButton {
7 text: i18n.tr("View")
8- iconSource: getIcon("settings")
9+ iconSource: getIcon("properties")
10 id: optionsButton
11
12 onTriggered: {
13@@ -403,6 +403,13 @@
14 PopupUtils.open(Qt.resolvedUrl("PlacesPopover.qml"), placesButton)
15 }
16 }
17+
18+ ToolbarButton {
19+ id: settingsButton
20+ visible: wideAspect
21+ objectName: "settings"
22+ action: settingsAction
23+ }
24 }
25
26 flickable: !wideAspect ? folderListView : null
27
28=== modified file 'debian/control'
29--- debian/control 2013-10-25 13:44:03 +0000
30+++ debian/control 2013-12-07 18:51:20 +0000
31@@ -15,7 +15,8 @@
32 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
33 qtdeclarative5-qtquick2-plugin,
34 qtdeclarative5-nemo-qml-plugin-folderlistmodel,
35- qtdeclarative5-u1db1.0
36+ qtdeclarative5-u1db1.0,
37+ qtdeclarative5-hud1.0
38 Description: File Manager application
39 Core File Manager application
40
41
42=== added file 'icons/properties.png'
43Binary files icons/properties.png 1970-01-01 00:00:00 +0000 and icons/properties.png 2013-12-07 18:51:20 +0000 differ
44=== modified file 'ubuntu-filemanager-app.qml'
45--- ubuntu-filemanager-app.qml 2013-10-10 16:47:27 +0000
46+++ ubuntu-filemanager-app.qml 2013-12-07 18:51:20 +0000
47@@ -19,6 +19,7 @@
48 import Ubuntu.Components 0.1
49 import org.nemomobile.folderlistmodel 1.0
50 import Ubuntu.Components.Popups 0.1
51+import Ubuntu.Unity.Action 1.0 as UnityActions
52 import U1db 1.0 as U1db
53
54 /*!
55@@ -44,9 +45,15 @@
56 backgroundColor: "#797979"
57 footerColor: "#808080"
58
59-// headerColor: "#303030"
60-// backgroundColor: "#505050"
61-// footerColor: "#707070"
62+ // HUD Actions
63+ Action {
64+ id: settingsAction
65+ text: i18n.tr("Settings")
66+ description: i18n.tr("Change app settings")
67+ iconSource: getIcon("settings")
68+ onTriggered: pageStack.push(settingsPage)
69+ }
70+ actions: [settingsAction]
71
72 property var pageStack: pageStack
73
74@@ -65,18 +72,11 @@
75 folder: homeFolder
76 }
77 }
78-
79- Tab {
80- title: page.title
81- page: SettingsPage {
82- id: settingsPage
83- }
84- }
85 }
86
87 Component.onCompleted: {
88 pageStack.push(tabs)
89- pageStack.push(Qt.resolvedUrl("FolderListPage.qml"))
90+ pageStack.push(settingsPage)
91 pageStack.pop()
92 }
93 }
94@@ -113,6 +113,10 @@
95 }
96 }
97
98+ SettingsPage {
99+ id: settingsPage
100+ }
101+
102 // Individual settings, used for bindings
103 property bool showAdvancedFeatures: false
104

Subscribers

People subscribed via source and target branches