summaryrefslogtreecommitdiffstats
path: root/accounts/maildir/qml/AccountSettings.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-18 08:11:48 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-18 08:11:48 +0200
commit894322a3a1d9c098a76cf2eec97a05f30a74dfe9 (patch)
tree7b62c28918f7827bf91dcb3e32e37720eeb3e291 /accounts/maildir/qml/AccountSettings.qml
parent438864fa0057a0fed91431b224429e80f619d06b (diff)
downloadkube-894322a3a1d9c098a76cf2eec97a05f30a74dfe9.tar.gz
kube-894322a3a1d9c098a76cf2eec97a05f30a74dfe9.zip
Hopefully fixed file dialogs on mac.
There seems to be a problem with setting visible=true before the component is completed. The dialog doesn't have to wrapped in a component anyways, and we can just show it using open.
Diffstat (limited to 'accounts/maildir/qml/AccountSettings.qml')
-rw-r--r--accounts/maildir/qml/AccountSettings.qml24
1 files changed, 10 insertions, 14 deletions
diff --git a/accounts/maildir/qml/AccountSettings.qml b/accounts/maildir/qml/AccountSettings.qml
index 9553135b..44713b00 100644
--- a/accounts/maildir/qml/AccountSettings.qml
+++ b/accounts/maildir/qml/AccountSettings.qml
@@ -82,22 +82,18 @@ Item {
82 iconName: Kube.Icons.folder 82 iconName: Kube.Icons.folder
83 83
84 onClicked: { 84 onClicked: {
85 fileDialogComponent.createObject(parent) 85 fileDialog.open()
86 } 86 }
87 87
88 Component { 88 Dialogs.FileDialog {
89 id: fileDialogComponent 89 id: fileDialog
90 Dialogs.FileDialog { 90 title: qsTr("Choose a maildir folder")
91 id: fileDialog 91 folder: shortcuts.home
92 92 selectFolder: true
93 visible: true 93 selectExisting: true
94 title: "Choose the maildir folder" 94 selectMultiple: false
95 95 onAccepted: {
96 selectFolder: true 96 maildirSettings.path = fileDialog.fileUrl
97
98 onAccepted: {
99 maildirSettings.path = fileDialog.fileUrl
100 }
101 } 97 }
102 } 98 }
103 } 99 }