Dekko
Loading...
Searching...
No Matches
MessageActionPopover.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import Lomiri.Components 1.3
20import Lomiri.Components.Popups 1.3
21import Dekko.Mail 1.0
22import Dekko.Mail.API 1.0
23import Dekko.Components 1.0
24import Dekko.Lomiri.Components 1.0
26Popover {
27 id: actionPopover
28 property var msg
29
30 contentWidth: units.gu(25)
31
32 Column {
33 id: containerLayout
34
35 anchors {
36 left: parent.left
37 top: parent.top
38 right: parent.right
39 }
40
41 ContextGroup {
42 contextActions: [
43 ContextAction {
44 description: qsTr("Reply all")
45 actionIcon: Icons.MailRepliedIcon
46 onTriggered: {
47 ComposerActions.respondToMessage(SubmissionManager.ReplyAll, msg.messageId)
48 PopupUtils.close(actionPopover)
49 }
50 },
52 description: qsTr("Forward")
53 actionIcon: Icons.MailForwardedIcon
54 onTriggered: {
55 ComposerActions.forwardMessage(SubmissionManager.ForwardInline, msg.messageId)
56 PopupUtils.close(actionPopover)
57 }
58 },
60 description: qsTr("Forward As Attachment")
61 actionIcon: Icons.MailForwardedIcon
62 onTriggered: {
63 ComposerActions.forwardMessage(SubmissionManager.ForwardAsAttachment, msg.messageId)
64 PopupUtils.close(actionPopover)
65 }
66 }
67 ]
68 }
70 divider.visible: false // last group so we don't need divider
71 contextActions: [
73 description: qsTr("Move")
74 actionIcon: Icons.InboxIcon
75 onTriggered: {
76 MailboxActions.moveMessage(msg.parentAccountId, msg.messageId)
77 PopupUtils.close(actionPopover)
78 }
79 }
80 ]
81 }
82 }
83}