Fix [Read|Unread] buttons behaviour

* Allow displaying of "Read" button only for Incoming e-mails.
  Fixes #4773;
* Move to the next message after pressing "Unread" button that
  is consistent with corresponding "Unread" button case.
  Fixes #4774;
* Those problems were fixed during completing GCI 2011 task.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>
This commit is contained in:
Aleksas Pantechovskis 2012-01-09 22:56:16 +00:00 committed by Siarzhuk Zharski
parent a7c3ac5527
commit 975f024407
1 changed files with 2 additions and 1 deletions

View File

@ -1478,6 +1478,7 @@ TMailWindow::MessageReceived(BMessage *msg)
case M_UNREAD:
MarkMessageRead(fRef, B_SEEN);
_UpdateReadButton();
PostMessage(M_NEXTMSG);
break;
case M_READ:
wasReadMsg = true;
@ -3190,7 +3191,7 @@ TMailWindow::_UpdateReadButton()
if (fApp->ShowButtonBar()) {
fButtonBar->RemoveButton(fReadButton);
fReadButton = NULL;
if (!fAutoMarkRead)
if (!fAutoMarkRead && fIncoming)
_AddReadButton();
}
UpdateViews();