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

Modified Files:
        Filters.cpp 
Log Message:
don't repeast the same string thrice

Index: Filters.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/Filters.cpp,v
retrieving revision 1.150
retrieving revision 1.151
diff -b -u -2 -r1.150 -r1.151
--- Filters.cpp 15 Sep 2003 17:01:40 -0000      1.150
+++ Filters.cpp 16 Sep 2003 21:32:11 -0000      1.151
@@ -459,4 +459,11 @@
    void IndicateDeleted();
 
+   static String GetExecuteProgressString(const String& s)
+   {
+      String msg;
+      msg << _("Executing filter actions...") << '\n' << s;
+      return msg;
+   }
+
    FilterRuleImpl *const m_parent;
    UIdArray& m_msgs;
@@ -3210,6 +3217,6 @@
    // check if Cancel wasn't pressed (we'd exit the loop above by break then)
    if ( m_idx == m_msgs.GetCount() &&
-        (!m_pd || m_pd->Update(m_msgs.GetCount(),
-        _("Executing filter actions..."))) )
+        (!m_pd ||
+            m_pd->Update(m_msgs.GetCount(), GetExecuteProgressString(""))) )
    {
       if ( !LoopCopy() )
@@ -3572,12 +3579,11 @@
    // better than slowing down towards the end, the users really hate
    // this!
-
    if ( m_pd )
    {
-      wxString message = _("Executing filter actions...") + '\n'
-         + wxString::Format(_("Copying messages to '%s'..."),
-            m_destinations[m_idx].c_str());
 
-      if( !m_pd->Update(m_msgs.GetCount() + m_idx, message) )
+      if( !m_pd->Update(m_msgs.GetCount() + m_idx,
+                        GetExecuteProgressString(
+                          wxString::Format(_("Copying messages to '%s'..."),
+                                           m_destinations[m_idx].c_str()))) )
       {
          return false;
@@ -3649,6 +3655,5 @@
    {
       m_pd->Update(2*m_msgs.GetCount(),
-         String(_("Executing filter actions...")) + '\n'
-         + _("Deleting moved messages..."));
+                   GetExecuteProgressString(_("Deleting moved messages...")));
    }
 }



-------------------------------------------------------
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