summaryrefslogtreecommitdiffstats
path: root/components/mail/contents/ui
diff options
context:
space:
mode:
Diffstat (limited to 'components/mail/contents/ui')
-rw-r--r--components/mail/contents/ui/main.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index 15a2b0b8..c2569cdc 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -38,7 +38,9 @@ ApplicationWindow {
38 KubeAction.Context { 38 KubeAction.Context {
39 id: maillistcontext 39 id: maillistcontext
40 property variant mail 40 property variant mail
41 property bool isDraft
41 mail: mailListView.currentMail 42 mail: mailListView.currentMail
43 isDraft: mailListView.isDraft
42 } 44 }
43 45
44 KubeAction.Context { 46 KubeAction.Context {
@@ -54,6 +56,12 @@ ApplicationWindow {
54 } 56 }
55 57
56 KubeAction.Action { 58 KubeAction.Action {
59 id: editAction
60 actionId: "org.kde.kube.actions.edit"
61 context: maillistcontext
62 }
63
64 KubeAction.Action {
57 id: markAsReadAction 65 id: markAsReadAction
58 actionId: "org.kde.kube.actions.mark-as-read" 66 actionId: "org.kde.kube.actions.mark-as-read"
59 context: maillistcontext 67 context: maillistcontext
@@ -180,6 +188,17 @@ ApplicationWindow {
180 } 188 }
181 } 189 }
182 190
191 KubeAction.ActionHandler {
192 actionId: "org.kde.kube.actions.edit"
193 function isReady(context) {
194 return context.mail && context.isDraft;
195 }
196
197 function handler(context) {
198 composerComponent.createObject(app, {"draftMessage": context.mail})
199 }
200 }
201
183 ToolButton { 202 ToolButton {
184 id: newMailButton 203 id: newMailButton
185 204
@@ -202,6 +221,16 @@ ApplicationWindow {
202 } 221 }
203 } 222 }
204 223
224 ToolButton {
225 Layout.fillHeight: true
226 iconName: "mail-message-edit"
227 text: "Edit"
228 enabled: editAction.ready
229 onClicked: {
230 editAction.execute()
231 }
232 }
233
205 Item { 234 Item {
206 Layout.fillWidth: true 235 Layout.fillWidth: true
207 } 236 }