Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1:/tmp/cvs-serv17053/include

Modified Files:
        MailFolder.h MailFolderCmn.h miscutil.h 
Log Message:
Final fix for bug #808 (cancelling Pop3 download)

Index: MailFolder.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolder.h,v
retrieving revision 1.189
retrieving revision 1.190
diff -b -u -2 -r1.189 -r1.190
--- MailFolder.h        18 Sep 2003 16:30:41 -0000      1.189
+++ MailFolder.h        3 Oct 2003 11:05:15 -0000       1.190
@@ -1016,4 +1016,16 @@
 };
 
+class SuspendFolderUpdates
+{
+public:
+   SuspendFolderUpdates(MailFolder *mf)
+      : m_mf(mf)
+      { m_mf->SuspendUpdates(); }
+   ~SuspendFolderUpdates()
+      { m_mf->ResumeUpdates(); }
+private:
+   MailFolder *m_mf;
+};
+
 // MailFolder_obj is a smart reference to MailFolder
 DECLARE_AUTOPTR_WITH_CONVERSION(MailFolder);

Index: MailFolderCmn.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolderCmn.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -b -u -2 -r1.82 -r1.83
--- MailFolderCmn.h     18 Sep 2003 16:30:41 -0000      1.82
+++ MailFolderCmn.h     3 Oct 2003 11:05:15 -0000       1.83
@@ -171,5 +171,5 @@
 
    virtual void SuspendUpdates() { m_suspendUpdates++; }
-   virtual void ResumeUpdates() { if ( !--m_suspendUpdates ) RequestUpdate(); }
+   virtual void ResumeUpdates();
    virtual void RequestUpdate();
 

Index: miscutil.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/miscutil.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -2 -r1.20 -r1.21
--- miscutil.h  2 Oct 2003 14:53:44 -0000       1.20
+++ miscutil.h  3 Oct 2003 11:05:15 -0000       1.21
@@ -100,5 +100,7 @@
    \
       void Initialize(); \
+      void Initialize(HostType *pointer); \
       type *operator->() { return m_pointer; } \
+      operator bool() const { return m_pointer != NULL; } \
    \
    private: \
@@ -108,12 +110,24 @@
    }
 
-#define IMPLEMENT_BOUND_POINTER(name) \
+#define IMPLEMENT_BOUND_POINTER_COMMON(name) \
    void name::Destroy() { delete m_pointer; } \
    \
-   void name::Initialize() \
+   void name::Initialize(name::HostType *pointer) \
    { \
       ASSERT( !m_pointer ); \
-      m_pointer = new name::HostType; \
+      m_pointer = pointer; \
    } \
+
+#define IMPLEMENT_BOUND_POINTER_DEFAULT(name) \
+   IMPLEMENT_BOUND_POINTER_COMMON(name) \
+   \
+   void name::Initialize() \
+      { Initialize(new name::HostType); } \
+
+#define IMPLEMENT_BOUND_POINTER(name) \
+   IMPLEMENT_BOUND_POINTER_COMMON(name) \
+   \
+   void name::Initialize() \
+      { FAIL_MSG(_T("No default constructor")); } \
 
 



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