diff options
Diffstat (limited to 'src/gui/windows/mailwindow.cpp')
-rw-r--r-- | src/gui/windows/mailwindow.cpp | 11 |
1 files changed, 11 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() |