summaryrefslogtreecommitdiffstats
path: root/components/mail/contents/ui/main.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-10 15:03:58 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-10 15:03:58 +0200
commitdac20ebf46c14c17981edce6401117914d5dcf5b (patch)
tree1ed853ea8470ec45c0227a358944d443c435dbc7 /components/mail/contents/ui/main.qml
parent5a27d32ab4a1c4833cda0bce7e8d5bceee41d6cf (diff)
downloadkube-dac20ebf46c14c17981edce6401117914d5dcf5b.tar.gz
kube-dac20ebf46c14c17981edce6401117914d5dcf5b.zip
Reply as an action
Diffstat (limited to 'components/mail/contents/ui/main.qml')
-rw-r--r--components/mail/contents/ui/main.qml21
1 files changed, 19 insertions, 2 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index 975e6a24..15a2b0b8 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -48,6 +48,12 @@ ApplicationWindow {
48 } 48 }
49 49
50 KubeAction.Action { 50 KubeAction.Action {
51 id: replyAction
52 actionId: "org.kde.kube.actions.reply"
53 context: maillistcontext
54 }
55
56 KubeAction.Action {
51 id: markAsReadAction 57 id: markAsReadAction
52 actionId: "org.kde.kube.actions.mark-as-read" 58 actionId: "org.kde.kube.actions.mark-as-read"
53 context: maillistcontext 59 context: maillistcontext
@@ -163,6 +169,17 @@ ApplicationWindow {
163 } 169 }
164 } 170 }
165 171
172 KubeAction.ActionHandler {
173 actionId: "org.kde.kube.actions.reply"
174 function isReady(context) {
175 return context.mail ? true : false;
176 }
177
178 function handler(context) {
179 composerComponent.createObject(app, {"originalMessage": context.mail})
180 }
181 }
182
166 ToolButton { 183 ToolButton {
167 id: newMailButton 184 id: newMailButton
168 185
@@ -179,9 +196,9 @@ ApplicationWindow {
179 Layout.fillHeight: true 196 Layout.fillHeight: true
180 iconName: "mail-message-reply" 197 iconName: "mail-message-reply"
181 text: "Reply" 198 text: "Reply"
199 enabled: replyAction.ready
182 onClicked: { 200 onClicked: {
183 composerComponent.createObject(app) 201 replyAction.execute()
184 composer.originalMessage = mailListView.currentMail
185 } 202 }
186 } 203 }
187 204