summaryrefslogtreecommitdiffstats
path: root/framework/domain/mailcontroller.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-02 10:27:44 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-02 10:28:07 +0100
commit7037e7270a2a06e726871d953061213b26d66ea7 (patch)
tree3c83724cb62c368477188b786d82437c3b73ce71 /framework/domain/mailcontroller.cpp
parent1ef70a4c8c2bb9fd70d5bc73614b09177b6b970c (diff)
downloadkube-7037e7270a2a06e726871d953061213b26d66ea7.tar.gz
kube-7037e7270a2a06e726871d953061213b26d66ea7.zip
Move to trash from mailview
Diffstat (limited to 'framework/domain/mailcontroller.cpp')
-rw-r--r--framework/domain/mailcontroller.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/domain/mailcontroller.cpp b/framework/domain/mailcontroller.cpp
index 4c5ae5c6..3d29ba22 100644
--- a/framework/domain/mailcontroller.cpp
+++ b/framework/domain/mailcontroller.cpp
@@ -32,6 +32,16 @@ MailController::MailController()
32 QObject::connect(markAsReadAction(), &Kube::ControllerAction::triggered, this, &MailController::markAsRead); 32 QObject::connect(markAsReadAction(), &Kube::ControllerAction::triggered, this, &MailController::markAsRead);
33 QObject::connect(moveToTrashAction(), &Kube::ControllerAction::triggered, this, &MailController::moveToTrash); 33 QObject::connect(moveToTrashAction(), &Kube::ControllerAction::triggered, this, &MailController::moveToTrash);
34 QObject::connect(removeAction(), &Kube::ControllerAction::triggered, this, &MailController::remove); 34 QObject::connect(removeAction(), &Kube::ControllerAction::triggered, this, &MailController::remove);
35
36 QObject::connect(this, &MailController::mailChanged, &MailController::updateActions);
37 updateActions();
38}
39
40void MailController::updateActions()
41{
42 if (auto mail = getMail()) {
43 action_moveToTrash->setEnabled(!mail->getTrash());
44 }
35} 45}
36 46
37void MailController::markAsRead() 47void MailController::markAsRead()