diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-25 03:49:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-25 03:49:54 +0300 |
commit | d11a1f693cd1c43c4d1977f65ef16eba11d872b1 (patch) | |
tree | 8b03625817f2ecc09b4145f321d63845a12d6fa3 /src/gui/windows | |
parent | b68c40d34eecf9da09a00101286b046d93927161 (diff) | |
download | mv-d11a1f693cd1c43c4d1977f65ef16eba11d872b1.tar.gz mv-d11a1f693cd1c43c4d1977f65ef16eba11d872b1.tar.bz2 mv-d11a1f693cd1c43c4d1977f65ef16eba11d872b1.tar.xz mv-d11a1f693cd1c43c4d1977f65ef16eba11d872b1.zip |
Show message information in mail list.
Show signs for item and money.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/mailwindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/mailwindow.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp index ec107f3a6..647eb17f5 100644 --- a/src/gui/windows/mailwindow.cpp +++ b/src/gui/windows/mailwindow.cpp @@ -169,7 +169,7 @@ void MailWindow::clear() mListBox->setSelected(-1); } -std::string MailWindow::getMailHeader(MailMessage *const message) +std::string MailWindow::getMailHeader(MailMessage *const message) const { if (mUseMail2) { @@ -178,6 +178,16 @@ std::string MailWindow::getMailHeader(MailMessage *const message) header.append(" "); else header.append("U"); + const MailMessageType::Type type = message->type; + if ((type & MailMessageType::Money) != 0) + header.append("M"); + else + header.append(" "); + if ((type & MailMessageType::Item) != 0) + header.append("I"); + else + header.append(" "); + header.append(" ").append(message->title); return STD_MOVE(header); } else diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h index b356b0666..7c808379d 100644 --- a/src/gui/windows/mailwindow.h +++ b/src/gui/windows/mailwindow.h @@ -75,7 +75,8 @@ class MailWindow final : public Window, private: void refreshMails(); - std::string getMailHeader(MailMessage *const message) A_NONNULL(2); + std::string getMailHeader(MailMessage *const message) const + A_WARN_UNUSED A_NONNULL(2); STD_VECTOR<MailMessage*> mMessages; std::map<int, MailMessage*> mMessagesMap; |