diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/composer/qml/View.qml | 26 | ||||
-rw-r--r-- | views/people/qml/PersonComposer.qml | 21 |
2 files changed, 21 insertions, 26 deletions
diff --git a/views/composer/qml/View.qml b/views/composer/qml/View.qml index de3a6a5b..9e390156 100644 --- a/views/composer/qml/View.qml +++ b/views/composer/qml/View.qml | |||
@@ -348,23 +348,19 @@ Kube.View { | |||
348 | text: qsTr("Attach file") | 348 | text: qsTr("Attach file") |
349 | 349 | ||
350 | onClicked: { | 350 | onClicked: { |
351 | fileDialogComponent.createObject(parent) | 351 | fileDialog.open() |
352 | } | 352 | } |
353 | 353 | ||
354 | Component { | 354 | Dialogs.FileDialog { |
355 | id: fileDialogComponent | 355 | id: fileDialog |
356 | Dialogs.FileDialog { | 356 | title: qsTr("Choose a file to attach") |
357 | id: fileDialog | 357 | folder: shortcuts.home |
358 | visible: true | 358 | selectFolder: false |
359 | title: qsTr("Choose a file to attach") | 359 | selectExisting: true |
360 | folder: shortcuts.home | 360 | selectMultiple: true |
361 | selectFolder: false | 361 | onAccepted: { |
362 | selectExisting: true | 362 | for (var i = 0; i < fileDialog.fileUrls.length; ++i) { |
363 | selectMultiple: true | 363 | composerController.attachments.add({url: fileDialog.fileUrls[i]}) |
364 | onAccepted: { | ||
365 | for (var i = 0; i < fileDialog.fileUrls.length; ++i) { | ||
366 | composerController.attachments.add({url: fileDialog.fileUrls[i]}) | ||
367 | } | ||
368 | } | 364 | } |
369 | } | 365 | } |
370 | } | 366 | } |
diff --git a/views/people/qml/PersonComposer.qml b/views/people/qml/PersonComposer.qml index ff24a456..19e8c56b 100644 --- a/views/people/qml/PersonComposer.qml +++ b/views/people/qml/PersonComposer.qml | |||
@@ -90,19 +90,18 @@ Flickable { | |||
90 | color: "#00000000" | 90 | color: "#00000000" |
91 | 91 | ||
92 | onClicked: { | 92 | onClicked: { |
93 | fileDialogComponent.createObject(parent) | 93 | fileDialog.open() |
94 | } | 94 | } |
95 | 95 | ||
96 | Component { | 96 | Dialogs.FileDialog { |
97 | id: fileDialogComponent | 97 | id: fileDialog |
98 | Dialogs.FileDialog { | 98 | title: qsTr("Choose an Avatar") |
99 | id: fileDialog | 99 | folder: shortcuts.home |
100 | visible: true | 100 | selectFolder: false |
101 | title: "Choose an Avatar" | 101 | selectExisting: true |
102 | selectFolder: false | 102 | selectMultiple: false |
103 | onAccepted: { | 103 | onAccepted: { |
104 | //TODO | 104 | //TODO |
105 | } | ||
106 | } | 105 | } |
107 | } | 106 | } |
108 | } | 107 | } |