Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv30173/src/classes

Modified Files:
        MessageView.cpp 
Log Message:
check if we can set the flags before setting them to deal with the IMAP
folders which don't allow setting of some flags (or are just readonly)
(fixes bug 592)


Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -b -u -2 -r1.90 -r1.91
--- MessageView.cpp     3 Jun 2002 11:09:09 -0000       1.90
+++ MessageView.cpp     12 Jun 2002 17:58:07 -0000      1.91
@@ -3008,7 +3008,13 @@
    if ( !(m_mailMessage->GetStatus() & MailFolder::MSG_STAT_SEEN) )
    {
-      // mark it as seen
-      m_mailMessage->GetFolder()->
-        SetMessageFlag(m_uid, MailFolder::MSG_STAT_SEEN, true);
+      MailFolder *mf = m_mailMessage->GetFolder();
+      CHECK_RET( mf, "mail message without associated folder?" );
+
+      // mark it as seen if we can
+      if ( mf->CanSetFlag(MailFolder::MSG_STAT_SEEN) )
+      {
+         mf->SetMessageFlag(m_uid, MailFolder::MSG_STAT_SEEN, true);
+      }
+      //else: read only folder
 
       // autocollect the addresses from it if configured


_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to