From b3223155b178427354b44f05167d0afba0926cbd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 24 Apr 2017 21:51:24 +0200 Subject: Another bunch of controllers gone --- framework/qml/AccountSwitcher.qml | 8 +------- framework/qml/Messages.qml | 1 + framework/qml/Outbox.qml | 18 +++++------------- 3 files changed, 7 insertions(+), 20 deletions(-) (limited to 'framework/qml') diff --git a/framework/qml/AccountSwitcher.qml b/framework/qml/AccountSwitcher.qml index 7a1e7592..a8151712 100644 --- a/framework/qml/AccountSwitcher.qml +++ b/framework/qml/AccountSwitcher.qml @@ -36,11 +36,6 @@ Controls.ToolButton { width: parent.width iconName: Kube.Icons.menu_inverted - Kube.FolderController { - id: folderController - accountId: accountId - } - Kube.AccountsModel { id: accountsModel } @@ -74,9 +69,8 @@ Controls.ToolButton { //iconName: "view-refresh" text: "Sync" - enabled: folderController.synchronizeAction.enabled onClicked: { - folderController.synchronizeAction.execute() + Kube.Fabric.postMessage(Kube.Messages.synchronize, {"accountId": accountSwitcher.accountId}) popup.close() } } diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml index 1b384bfa..26a3ea3e 100644 --- a/framework/qml/Messages.qml +++ b/framework/qml/Messages.qml @@ -32,6 +32,7 @@ Item { property string markAsUnread: "markAsUnread" property string toggleImportant: "toggleImportant" property string moveToFolder: "moveToFolder" + property string moveToDrafts: "moveToDrafts" property string notification: "notification" property string search: "search" diff --git a/framework/qml/Outbox.qml b/framework/qml/Outbox.qml index fc960667..46368294 100644 --- a/framework/qml/Outbox.qml +++ b/framework/qml/Outbox.qml @@ -30,9 +30,6 @@ Controls.ToolButton { visible: outboxModel.count > 0 - Kube.OutboxController { - id: outboxController - } Kube.OutboxModel { id: outboxModel } @@ -134,10 +131,7 @@ Controls.ToolButton { iconName: Kube.Icons.moveToTrash text: qsTr("Delete Mail") tooltip: text - onClicked: { - outboxController.mail = model.domainObject - outboxController.moveToTrashAction.execute() - } + onClicked: Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": model.domainObject}) } Controls.ToolButton { @@ -145,8 +139,9 @@ Controls.ToolButton { text: qsTr("Edit") tooltip: text onClicked: { - outboxController.mail = model.domainObject - outboxController.editAction.execute() + Kube.Fabric.postMessage(Kube.Messages.moveToDrafts, {"mail": model.domainObject}) + //TODO stage upon completion + //Kube.Fabric.postMessage(Kube.Messages.edit, {"mail": model.domainObject}) } } } @@ -167,10 +162,7 @@ Controls.ToolButton { visible: listView.count != 0 text: qsTr("Send now") - enabled: outboxController.sendOutboxAction.enabled - onClicked: { - outboxController.sendOutboxAction.execute() - } + onClicked: Kube.Fabric.postMessage(Kube.Messages.sendOutbox, {}) } Kube.Label { -- cgit v1.2.3