summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--accounts/maildir/package/contents/ui/MaildirAccountSettings.qml41
1 files changed, 35 insertions, 6 deletions
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
index 189089fa..2f5049e0 100644
--- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
+++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml
@@ -18,6 +18,7 @@
18import QtQuick 2.4 18import QtQuick 2.4
19import QtQuick.Controls 1.4 19import QtQuick.Controls 1.4
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21import QtQuick.Dialogs 1.0
21 22
22import org.kube.framework.settings 1.0 as KubeSettings 23import org.kube.framework.settings 1.0 as KubeSettings
23import org.kube.framework.theme 1.0 24import org.kube.framework.theme 1.0
@@ -43,12 +44,40 @@ Rectangle {
43 } 44 }
44 45
45 Label { text: "Path" } 46 Label { text: "Path" }
46 TextField { 47 RowLayout {
47 id: path 48 TextField {
48 placeholderText: "path" 49 id: path
49 Layout.fillWidth: true 50 placeholderText: "path"
50 text: maildirSettings.path 51 Layout.fillWidth: true
51 onTextChanged: { maildirSettings.path = text; } 52 text: maildirSettings.path
53 onTextChanged: { maildirSettings.path = text; }
54 }
55
56 Button {
57 iconName: "folder"
58 onClicked: {
59 fileDialogComponent.createObject(parent);
60 }
61
62 Component {
63 id: fileDialogComponent
64 FileDialog {
65 id: fileDialog
66 visible: true
67 title: "Please choose the maildir folder"
68
69 selectFolder: true
70
71 onAccepted: {
72 maildirSettings.path = fileDialog.fileUrl
73 fileDialogComponent.destroy()
74 }
75 onRejected: {
76 fileDialogComponent.destroy()
77 }
78 }
79 }
80 }
52 } 81 }
53 82
54 Text { 83 Text {