Merge lp:~ajalkane/ubuntu-filemanager-app/unlock-to-header into lp:ubuntu-filemanager-app

Proposed by Arto Jalkanen
Status: Merged
Approved by: David Planella
Approved revision: 316
Merged at revision: 317
Proposed branch: lp:~ajalkane/ubuntu-filemanager-app/unlock-to-header
Merge into: lp:ubuntu-filemanager-app
Diff against target: 78 lines (+26/-24)
2 files modified
src/app/qml/ui/AuthenticationDialog.qml (+1/-1)
src/app/qml/ui/FolderListPage.qml (+25/-23)
To merge this branch: bzr merge lp:~ajalkane/ubuntu-filemanager-app/unlock-to-header
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+239919@code.launchpad.net

Commit message

Bug 1386254: move unlock button to header action. Added short explanation
to unlock dialog.

Description of the change

Bug 1386254: move unlock button to header action. Added short explanation
to unlock dialog.

To post a comment you must log in.
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
David Planella (dpm) wrote :

LGTM, passes tests, tested it to work with the emulator.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/qml/ui/AuthenticationDialog.qml'
--- src/app/qml/ui/AuthenticationDialog.qml 2014-09-20 10:49:51 +0000
+++ src/app/qml/ui/AuthenticationDialog.qml 2014-10-28 22:30:13 +0000
@@ -24,7 +24,7 @@
2424
25 title: i18n.tr("Authentication required")25 title: i18n.tr("Authentication required")
2626
27 text: i18n.tr("Enter password:")27 text: i18n.tr("Password is required to access all files")
2828
29 signal passwordEntered(string password)29 signal passwordEntered(string password)
3030
3131
=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml 2014-10-24 23:41:57 +0000
+++ src/app/qml/ui/FolderListPage.qml 2014-10-28 22:30:13 +0000
@@ -108,6 +108,31 @@
108 iconName: "find"108 iconName: "find"
109 text: i18n.tr("Go To")109 text: i18n.tr("Go To")
110 onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent)110 onTriggered: PopupUtils.open(Qt.resolvedUrl("GoToDialog.qml"), parent)
111 },
112 Action {
113 id: unlockButton
114 iconName: "lock"
115 text: i18n.tr("Unlock full access")
116 visible: pageModel.onlyMTPPaths
117 onTriggered: {
118 console.log("Full access clicked")
119 var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"),
120 folderListPage)
121
122 authDialog.passwordEntered.connect(function(password) {
123 if (pamAuthentication.validatePasswordToken(password)) {
124 console.log("Authenticated for full access")
125 pageModel.onlyMTPPaths = false
126 } else {
127 PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage,
128 {
129 title: i18n.tr("Authentication failed")
130 })
131
132 console.log("Could not authenticate")
133 }
134 })
135 }
111 }136 }
112 ]137 ]
113 flickable: !sidebar.expanded ?138 flickable: !sidebar.expanded ?
@@ -308,29 +333,6 @@
308 cancelFileSelector()333 cancelFileSelector()
309 }334 }
310 }335 }
311 Button {
312 text: i18n.tr("Unlock full access")
313 visible: pageModel.onlyMTPPaths
314 onClicked: {
315 console.log("Full access clicked")
316 var authDialog = PopupUtils.open(Qt.resolvedUrl("AuthenticationDialog.qml"),
317 folderListPage)
318
319 authDialog.passwordEntered.connect(function(password) {
320 if (pamAuthentication.validatePasswordToken(password)) {
321 console.log("Authenticated for full access")
322 pageModel.onlyMTPPaths = false
323 } else {
324 PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), folderListPage,
325 {
326 title: i18n.tr("Authentication failed")
327 })
328
329 console.log("Could not authenticate")
330 }
331 })
332 }
333 }
334 }336 }
335337
336 FolderIconView {338 FolderIconView {

Subscribers

People subscribed via source and target branches