diff options
Diffstat (limited to 'src')
-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; }; |