diff options
Diffstat (limited to 'components/mail/contents/ui/main.qml')
-rw-r--r-- | components/mail/contents/ui/main.qml | 37 |
1 files changed, 13 insertions, 24 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 | } |