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

Modified Files:
        wxMsgCmdProc.cpp 
Log Message:
don't expunge the messages after move if the (source) folder is not configured to use 
trash

Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -2 -r1.20 -r1.21
--- wxMsgCmdProc.cpp    6 May 2002 11:52:52 -0000       1.20
+++ wxMsgCmdProc.cpp    17 May 2002 19:04:43 -0000      1.21
@@ -187,4 +187,7 @@
    //@}
 
+   /// access the m_TicketsToDeleteList creating it if necessary
+   void AddTicketToDelete(Ticket t);
+
 private:
    /// our folder (may be NULL)
@@ -552,7 +555,7 @@
 
    m_TicketList = ASTicketList::Create();
-   m_TicketsToDeleteList = ASTicketList::Create();
 
    // these are created on demand
+   m_TicketsToDeleteList = NULL;
    m_TicketsDroppedList = NULL;
    m_TicketsToEditList = NULL;
@@ -579,4 +582,8 @@
 }
 
+// ----------------------------------------------------------------------------
+// MsgCmdProcImpl misc operations
+// ----------------------------------------------------------------------------
+
 void MsgCmdProcImpl::SetFolder(ASMailFolder *asmf)
 {
@@ -590,4 +597,16 @@
 }
 
+void MsgCmdProcImpl::AddTicketToDelete(Ticket t)
+{
+   if ( !m_TicketsToDeleteList )
+      m_TicketsToDeleteList = ASTicketList::Create();
+
+   m_TicketsToDeleteList->Add(t);
+}
+
+// ----------------------------------------------------------------------------
+// MsgCmdProcImpl command dispatcher
+// ----------------------------------------------------------------------------
+
 bool MsgCmdProcImpl::ProcessCommand(int cmd,
                                     const UIdArray& messages,
@@ -1126,5 +1145,5 @@
    {
       // delete messages once they're successfully saved
-      m_TicketsToDeleteList->Add(t);
+      AddTicketToDelete(t);
    }
 }
@@ -1292,5 +1311,5 @@
                // the message hasn't been saved yet, wait with deletion
                // until it is copied successfully
-               m_TicketsToDeleteList->Add(t);
+               AddTicketToDelete(t);
             }
 
@@ -1435,5 +1454,6 @@
                String msg;
 
-               bool toDelete = m_TicketsToDeleteList->Contains(t);
+               bool toDelete = m_TicketsToDeleteList &&
+                                    m_TicketsToDeleteList->Contains(t);
                bool wasDropped = m_TicketsDroppedList &&
                                     m_TicketsDroppedList->Contains(t);
@@ -1496,5 +1516,5 @@
                      (
                         // true => expunge as well
-                        m_asmf->DeleteMessages(seq, true, this)
+                        m_asmf->DeleteOrTrashMessages(seq, this)
                      );
 


_______________________________________________________________

Hundreds of nodes, one monster rendering program.
Now that�s a super model! Visit http://clustering.foundries.sf.net/
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to