diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-29 17:18:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-29 17:18:55 +0300 |
commit | 8e0bbcbabb8752d8c28618e98a1ea46309252f3a (patch) | |
tree | a2fd55724d70fca908e75a6ca35ae0397be8d965 | |
parent | 1854355195f6124e62aa9bdf42e1bb0d93d9a900 (diff) | |
download | plus-8e0bbcbabb8752d8c28618e98a1ea46309252f3a.tar.gz plus-8e0bbcbabb8752d8c28618e98a1ea46309252f3a.tar.bz2 plus-8e0bbcbabb8752d8c28618e98a1ea46309252f3a.tar.xz plus-8e0bbcbabb8752d8c28618e98a1ea46309252f3a.zip |
Add ability for return mail message to sender.
-rw-r--r-- | src/gui/windows/mailwindow.cpp | 11 | ||||
-rw-r--r-- | src/gui/windows/mailwindow.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp index a37367f6f..15faf779a 100644 --- a/src/gui/windows/mailwindow.cpp +++ b/src/gui/windows/mailwindow.cpp @@ -61,6 +61,8 @@ MailWindow::MailWindow() : // TRANSLATORS: mail window button mDeleteButton(new Button(this, _("Delete"), "delete", this)), // TRANSLATORS: mail window button + mReturnButton(new Button(this, _("Return"), "return", this)), + // TRANSLATORS: mail window button mOpenButton(new Button(this, _("Open"), "open", this)) { mListBox->postInit(); @@ -87,6 +89,7 @@ MailWindow::MailWindow() : placer(4, 1, mOpenButton); placer(4, 2, mNewButton); placer(4, 3, mDeleteButton); + placer(4, 4, mReturnButton); Layout &layout = getLayout(); layout.setRowHeight(0, LayoutType::SET); @@ -131,6 +134,14 @@ void MailWindow::action(const ActionEvent &event) const MailMessage *const mail = mMessages[sel]; mailHandler->deleteMessage(mail->id); } + else if (eventId == "return") + { + const int sel = mListBox->getSelected(); + if (sel < 0) + return; + const MailMessage *const mail = mMessages[sel]; + mailHandler->returnMessage(mail->id); + } } void MailWindow::clear() diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h index 236b3c7e1..15964aafe 100644 --- a/src/gui/windows/mailwindow.h +++ b/src/gui/windows/mailwindow.h @@ -64,6 +64,7 @@ class MailWindow final : public Window, Button *mRefreshButton; Button *mNewButton; Button *mDeleteButton; + Button *mReturnButton; Button *mOpenButton; }; |