summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/mail/contents/ui/main.qml37
-rw-r--r--components/package/contents/ui/Outbox.qml9
2 files changed, 16 insertions, 30 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index cf5cfd6a..423d8f34 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -62,24 +62,6 @@ Controls2.ApplicationWindow {
62 } 62 }
63 63
64 KubeAction.Action { 64 KubeAction.Action {
65 id: editAction
66 actionId: "org.kde.kube.actions.edit"
67 context: maillistcontext
68 }
69
70 KubeAction.Action {
71 id: markAsReadAction
72 actionId: "org.kde.kube.actions.mark-as-read"
73 context: maillistcontext
74 }
75
76 KubeAction.Action {
77 id: deleteAction
78 actionId: "org.kde.kube.actions.move-to-trash"
79 context: maillistcontext
80 }
81
82 KubeAction.Action {
83 id: syncAction 65 id: syncAction
84 actionId: "org.kde.kube.actions.synchronize" 66 actionId: "org.kde.kube.actions.synchronize"
85 context: folderListContext 67 context: folderListContext
@@ -115,6 +97,13 @@ Controls2.ApplicationWindow {
115 */ 97 */
116 //END ActionHandler 98 //END ActionHandler
117 99
100 //Controller
101 KubeFramework.MailController {
102 id: mailController
103 mail: mailListView.currentMail
104 }
105
106
118 //BEGIN Shortcuts 107 //BEGIN Shortcuts
119 Shortcut { 108 Shortcut {
120 sequence: StandardKey.Refresh 109 sequence: StandardKey.Refresh
@@ -123,8 +112,8 @@ Controls2.ApplicationWindow {
123 } 112 }
124 Shortcut { 113 Shortcut {
125 sequence: StandardKey.Delete 114 sequence: StandardKey.Delete
126 onActivated: deleteAction.execute() 115 onActivated: mailController.moveToTrashAction.execute()
127 enabled: deleteAction.ready 116 enabled: mailController.moveToTrashAction.enabled
128 } 117 }
129 Shortcut { 118 Shortcut {
130 sequence: StandardKey.MoveToNextLine 119 sequence: StandardKey.MoveToNextLine
@@ -221,10 +210,10 @@ Controls2.ApplicationWindow {
221 ToolButton { 210 ToolButton {
222 iconName: "mail-mark-unread" 211 iconName: "mail-mark-unread"
223 text: "Mark As Read" 212 text: "Mark As Read"
224 enabled: markAsReadAction.ready 213 enabled: mailController.markAsRead.enabled
225 tooltip: "mark mail as read" 214 tooltip: "mark mail as read"
226 onClicked: { 215 onClicked: {
227 markAsReadAction.execute() 216 mailController.markAsRead.execute()
228 } 217 }
229 } 218 }
230 219
@@ -240,10 +229,10 @@ Controls2.ApplicationWindow {
240 ToolButton { 229 ToolButton {
241 iconName: "edit-delete" 230 iconName: "edit-delete"
242 text: "Delete Mail" 231 text: "Delete Mail"
243 enabled: deleteAction.ready 232 enabled: mailController.moveToTrashAction.enabled
244 tooltip: "delete email" 233 tooltip: "delete email"
245 onClicked: { 234 onClicked: {
246 deleteAction.execute() 235 mailController.moveToTrashAction.execute()
247 } 236 }
248 } 237 }
249 } 238 }
diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml
index 5330cd4e..3a51e51a 100644
--- a/components/package/contents/ui/Outbox.qml
+++ b/components/package/contents/ui/Outbox.qml
@@ -37,11 +37,8 @@ ToolButton {
37 dialog.visible = dialog.visible ? false : true 37 dialog.visible = dialog.visible ? false : true
38 } 38 }
39 39
40 KubeAction.Action { 40 KubeFramework.OutboxController {
41 id: sendNowAction 41 id: outboxController
42 actionId: "org.kde.kube.actions.sendOutbox"
43 context: KubeAction.Context {
44 }
45 } 42 }
46 43
47 //BEGIN Dialog 44 //BEGIN Dialog
@@ -88,7 +85,7 @@ ToolButton {
88 height: Kirigami.Units.gridUnit * 2 85 height: Kirigami.Units.gridUnit * 2
89 text: qsTr("Send now.") 86 text: qsTr("Send now.")
90 onClicked: { 87 onClicked: {
91 sendNowAction.execute() 88 outboxController.sendOutboxAction.execute()
92 } 89 }
93 } 90 }
94 91