From 8cf790d6bc91e5e9c06651ffe4a193b625207f0d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 1 Jan 2017 23:18:24 +0100 Subject: Outboxcontroller and Mailcontroller --- components/mail/contents/ui/main.qml | 37 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'components/mail') 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 @@ -61,24 +61,6 @@ Controls2.ApplicationWindow { context: maillistcontext } - KubeAction.Action { - id: editAction - actionId: "org.kde.kube.actions.edit" - context: maillistcontext - } - - KubeAction.Action { - id: markAsReadAction - actionId: "org.kde.kube.actions.mark-as-read" - context: maillistcontext - } - - KubeAction.Action { - id: deleteAction - actionId: "org.kde.kube.actions.move-to-trash" - context: maillistcontext - } - KubeAction.Action { id: syncAction actionId: "org.kde.kube.actions.synchronize" @@ -115,6 +97,13 @@ Controls2.ApplicationWindow { */ //END ActionHandler + //Controller + KubeFramework.MailController { + id: mailController + mail: mailListView.currentMail + } + + //BEGIN Shortcuts Shortcut { sequence: StandardKey.Refresh @@ -123,8 +112,8 @@ Controls2.ApplicationWindow { } Shortcut { sequence: StandardKey.Delete - onActivated: deleteAction.execute() - enabled: deleteAction.ready + onActivated: mailController.moveToTrashAction.execute() + enabled: mailController.moveToTrashAction.enabled } Shortcut { sequence: StandardKey.MoveToNextLine @@ -221,10 +210,10 @@ Controls2.ApplicationWindow { ToolButton { iconName: "mail-mark-unread" text: "Mark As Read" - enabled: markAsReadAction.ready + enabled: mailController.markAsRead.enabled tooltip: "mark mail as read" onClicked: { - markAsReadAction.execute() + mailController.markAsRead.execute() } } @@ -240,10 +229,10 @@ Controls2.ApplicationWindow { ToolButton { iconName: "edit-delete" text: "Delete Mail" - enabled: deleteAction.ready + enabled: mailController.moveToTrashAction.enabled tooltip: "delete email" onClicked: { - deleteAction.execute() + mailController.moveToTrashAction.execute() } } } -- cgit v1.2.3