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 <[email protected]>
This commit is contained in:
Aleksas Pantechovskis
2012-01-09 22:56:16 +00:00
committed by Siarzhuk Zharski
parent a7c3ac5527
commit 975f024407
+2 -1
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();