diff options
-rw-r--r-- | components/mail/contents/ui/main.qml | 12 | ||||
-rw-r--r-- | components/package/contents/ui/SingleMailView.qml | 32 |
2 files changed, 33 insertions, 11 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 5fceaf30..39df6040 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -57,9 +57,6 @@ Controls2.ApplicationWindow { | |||
57 | //END Actions | 57 | //END Actions |
58 | 58 | ||
59 | //BEGIN ActionHandler | 59 | //BEGIN ActionHandler |
60 | |||
61 | //TODO | ||
62 | /* | ||
63 | KubeAction.ActionHandler { | 60 | KubeAction.ActionHandler { |
64 | actionId: "org.kde.kube.actions.reply" | 61 | actionId: "org.kde.kube.actions.reply" |
65 | function isReady(context) { | 62 | function isReady(context) { |
@@ -67,8 +64,8 @@ Controls2.ApplicationWindow { | |||
67 | } | 64 | } |
68 | 65 | ||
69 | function handler(context) { | 66 | function handler(context) { |
70 | var component = composerComponent.createObject(app) | 67 | composer.loadMessage(context.mail, false) |
71 | component.loadMessage(context.mail, false) | 68 | composer.open() |
72 | } | 69 | } |
73 | } | 70 | } |
74 | 71 | ||
@@ -78,11 +75,10 @@ Controls2.ApplicationWindow { | |||
78 | return context.mail && context.isDraft; | 75 | return context.mail && context.isDraft; |
79 | } | 76 | } |
80 | function handler(context) { | 77 | function handler(context) { |
81 | var component= composerComponent.createObject(app, {"draftMessage": context.mail}) | 78 | composer.loadMessage(context.mail, true) |
82 | component.loadMessage(context.mail, true) | 79 | composer.open() |
83 | } | 80 | } |
84 | } | 81 | } |
85 | */ | ||
86 | //END ActionHandler | 82 | //END ActionHandler |
87 | 83 | ||
88 | //Controller | 84 | //Controller |
diff --git a/components/package/contents/ui/SingleMailView.qml b/components/package/contents/ui/SingleMailView.qml index 5576391d..c2565cf1 100644 --- a/components/package/contents/ui/SingleMailView.qml +++ b/components/package/contents/ui/SingleMailView.qml | |||
@@ -25,6 +25,7 @@ import org.kde.kirigami 1.0 as Kirigami | |||
25 | import QtQml 2.2 as QtQml | 25 | import QtQml 2.2 as QtQml |
26 | 26 | ||
27 | import org.kube.framework.domain 1.0 as KubeFramework | 27 | import org.kube.framework.domain 1.0 as KubeFramework |
28 | import org.kube.framework.actions 1.0 as KubeAction | ||
28 | 29 | ||
29 | Item { | 30 | Item { |
30 | id: root | 31 | id: root |
@@ -346,7 +347,6 @@ Item { | |||
346 | width: parent.width | 347 | width: parent.width |
347 | 348 | ||
348 | Text { | 349 | Text { |
349 | |||
350 | anchors{ | 350 | anchors{ |
351 | verticalCenter: parent.verticalCenter | 351 | verticalCenter: parent.verticalCenter |
352 | left: parent.left | 352 | left: parent.left |
@@ -380,8 +380,34 @@ Item { | |||
380 | rightMargin: Kirigami.Units.gridUnit | 380 | rightMargin: Kirigami.Units.gridUnit |
381 | } | 381 | } |
382 | 382 | ||
383 | iconName: "mail-reply-sender" | 383 | KubeAction.Context { |
384 | //TODO add text | 384 | id: mailcontext |
385 | property variant mail | ||
386 | property bool isDraft | ||
387 | mail: model.mail | ||
388 | isDraft: model.draft | ||
389 | } | ||
390 | |||
391 | KubeAction.Action { | ||
392 | id: replyAction | ||
393 | actionId: "org.kde.kube.actions.reply" | ||
394 | context: maillistcontext | ||
395 | } | ||
396 | |||
397 | KubeAction.Action { | ||
398 | id: editAction | ||
399 | actionId: "org.kde.kube.actions.edit" | ||
400 | context: maillistcontext | ||
401 | } | ||
402 | |||
403 | iconName: model.draft ? "document-edit" : "mail-reply-sender" | ||
404 | onClicked: { | ||
405 | if (model.draft) { | ||
406 | editAction.execute() | ||
407 | } else { | ||
408 | replyAction.execute() | ||
409 | } | ||
410 | } | ||
385 | } | 411 | } |
386 | } | 412 | } |
387 | } | 413 | } |