Merge lp:~ajalkane/ubuntu-filemanager-app/fileopendialog into lp:ubuntu-filemanager-app

Proposed by Arto Jalkanen
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 13
Merged at revision: 12
Proposed branch: lp:~ajalkane/ubuntu-filemanager-app/fileopendialog
Merge into: lp:ubuntu-filemanager-app
Diff against target: 51 lines (+34/-0)
2 files modified
FileActionDialog.qml (+27/-0)
FolderListView.qml (+7/-0)
To merge this branch: bzr merge lp:~ajalkane/ubuntu-filemanager-app/fileopendialog
Reviewer Review Type Date Requested Status
Arto Jalkanen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+153936@code.launchpad.net

Commit message

Added file opening dialog

Description of the change

Added file opening 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
Arto Jalkanen (ajalkane) wrote :

If it's fine by Jenkins, it's fine by me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'FileActionDialog.qml'
2--- FileActionDialog.qml 1970-01-01 00:00:00 +0000
3+++ FileActionDialog.qml 2013-03-18 21:26:20 +0000
4@@ -0,0 +1,27 @@
5+import QtQuick 2.0
6+import Ubuntu.Components 0.1
7+import Ubuntu.Components.Popups 0.1
8+
9+Dialog {
10+ id: root
11+
12+ property string fileName
13+ property string filePath
14+
15+ title: i18n.tr("Choose action")
16+ text: i18n.tr("For file: ") + fileName
17+
18+ Button {
19+ text: i18n.tr("Open")
20+ onClicked: {
21+ console.log("Opening file", filePath)
22+ Qt.openUrlExternally("file://" + filePath)
23+ onClicked: PopupUtils.close(root)
24+ }
25+ }
26+
27+ Button {
28+ text: i18n.tr("Cancel")
29+ onClicked: PopupUtils.close(root)
30+ }
31+}
32
33=== modified file 'FolderListView.qml'
34--- FolderListView.qml 2013-03-13 21:13:08 +0000
35+++ FolderListView.qml 2013-03-18 21:26:20 +0000
36@@ -75,8 +75,15 @@
37 }
38 } else {
39 console.log("Non dir clicked")
40+ PopupUtils.open(Qt.resolvedUrl("FileActionDialog.qml"), delegate,
41+ {
42+ fileName: model.fileName,
43+ filePath: model.filePath
44+
45+ })
46 }
47 }
48+
49 onPressAndHold: {
50 console.log("FolderListDelegate onPressAndHold")
51 actionSelectionPopover.caller = delegate

Subscribers

People subscribed via source and target branches