From c3ba13d4240005cb9e7bdaca5977114e74bd0e9a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Mar 2017 09:33:42 +0100 Subject: Support synchronizing individual accounts --- components/mail/contents/ui/Mail.qml | 25 ++++++++++++++++++++++ components/package/contents/ui/AccountSwitcher.qml | 1 + 2 files changed, 26 insertions(+) (limited to 'components') diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml index 3cc0d4f4..acb75554 100644 --- a/components/mail/contents/ui/Mail.qml +++ b/components/mail/contents/ui/Mail.qml @@ -237,6 +237,23 @@ Controls2.ApplicationWindow { Item { id: accountName + KubeFramework.FolderController { + id: accountNameFolderController + accountId: accountSwitcher.accountId + } + + Menu { + id: contextMenu + title: "Edit" + + MenuItem { + text: "Synchronize" + onTriggered: { + accountNameFolderController.synchronizeAction.execute() + } + } + } + anchors { top: newMailButton.bottom topMargin: Kirigami.Units.smallSpacing @@ -245,6 +262,14 @@ Controls2.ApplicationWindow { width: parent.width height: Kirigami.Units.gridUnit * 2 + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton + onClicked: { + contextMenu.popup() + } + } + Text { anchors { bottom: parent.bottom diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml index 48bb2c1b..31c5e6d4 100644 --- a/components/package/contents/ui/AccountSwitcher.qml +++ b/components/package/contents/ui/AccountSwitcher.qml @@ -39,6 +39,7 @@ Controls.ToolButton { KubeFramework.FolderController { id: folderController + accountId: accountId } KubeAccounts.AccountsModel { -- cgit v1.2.3