From 1854355195f6124e62aa9bdf42e1bb0d93d9a900 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Apr 2015 16:25:45 +0300 Subject: Add ability to delete mail message. --- src/gui/windows/mailwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp index 61cd80917..a37367f6f 100644 --- a/src/gui/windows/mailwindow.cpp +++ b/src/gui/windows/mailwindow.cpp @@ -123,6 +123,14 @@ void MailWindow::action(const ActionEvent &event) const MailMessage *const mail = mMessages[sel]; mailHandler->readMessage(mail->id); } + else if (eventId == "delete") + { + const int sel = mListBox->getSelected(); + if (sel < 0) + return; + const MailMessage *const mail = mMessages[sel]; + mailHandler->deleteMessage(mail->id); + } } void MailWindow::clear() -- cgit v1.2.3-70-g09d2