Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv29856/src/mail

Modified Files:
        MailFolderCC.cpp MailFolderCmn.cpp 
Log Message:
Don't show subject while filtering spam (shut up header prefetch)

Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.678
retrieving revision 1.679
diff -b -u -2 -r1.678 -r1.679
--- MailFolderCC.cpp    30 Sep 2003 13:46:21 -0000      1.678
+++ MailFolderCC.cpp    3 Oct 2003 17:08:06 -0000       1.679
@@ -672,9 +672,21 @@
          MGuiLocker locker;
 
+         String from = entry.GetFrom();
+         String subject = entry.GetSubject();
+         
+         if( FilterNewMailContext::IsInStack() )
+         {
+            RefCounter<FilterRule> filter(FilterNewMailContext::GetFilter());
+            if( filter->ContainsSpamTest() )
+            {
+               subject = from = _("(hidden in spam filter)");
+            }
+         }
+
          // construct the label
          String label;
          label << m_msgProgress << '\n'
-               << _("From: ") << entry.GetFrom() << '\n'
-               << _("Subject: ") << entry.GetSubject();
+               << _("From: ") << from << '\n'
+               << _("Subject: ") << subject;
 
          if ( !m_progdlg->Update(m_nRetrieved, label) )

Index: MailFolderCmn.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCmn.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -b -u -2 -r1.123 -r1.124
--- MailFolderCmn.cpp   3 Oct 2003 15:11:21 -0000       1.123
+++ MailFolderCmn.cpp   3 Oct 2003 17:08:06 -0000       1.124
@@ -1590,4 +1590,7 @@
               GetName().c_str(), (unsigned long)uidsNew.GetCount());
 
+   // Shut up some messages down in OverviewData::UpdateProgress
+   FilterNewMailContext context(filterRule);
+
    // we're almost surely going to look at all new messages, so pre-cache them
    // all at once
@@ -2388,2 +2391,3 @@
 static MFSubSystem gs_subsysCmn(MailFolderCmnInit, MailFolderCmnCleanup);
 
+FilterNewMailContext *FilterNewMailContext::m_instance;



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to