diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-29 16:25:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-29 16:25:45 +0300 |
commit | 1854355195f6124e62aa9bdf42e1bb0d93d9a900 (patch) | |
tree | fdfc21595eee03605da04c638e9318897f820fc7 /src/gui | |
parent | dc88f5c3c406c8bd66fcd8f1f355711f5ef64807 (diff) | |
download | mv-1854355195f6124e62aa9bdf42e1bb0d93d9a900.tar.gz mv-1854355195f6124e62aa9bdf42e1bb0d93d9a900.tar.bz2 mv-1854355195f6124e62aa9bdf42e1bb0d93d9a900.tar.xz mv-1854355195f6124e62aa9bdf42e1bb0d93d9a900.zip |
Add ability to delete mail message.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/mailwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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() |