[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    proko2: kdepim/kmail
From:       David Faure <faure () kde ! org>
Date:       2004-07-30 19:58:43
Message-ID: 20040730195843.2CDE899E2 () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

Fixed compilation by applying the latest changes done in HEAD


  M +1 -2      Makefile.am   1.281.2.6
  M +16 -2     imapaccountbase.cpp   1.94.2.3
  M +7 -1      imapaccountbase.h   1.54.2.2
  M +4 -2      kmfoldercachedimap.cpp   1.125.2.11


--- kdepim/kmail/kmfoldercachedimap.cpp  #1.125.2.10:1.125.2.11
@@ -47,5 +47,6 @@
 #include "kmdict.h"
 #include "acljobs.h"
-#include "kmbroadcaststatus.h"
+#include "broadcaststatus.h"
+using KPIM::BroadcastStatus;
 #include "progressmanager.h"
 
@@ -202,6 +203,7 @@ void KMFolderCachedImap::remove()
 
   // Tell the account (see listDirectory2)
-  if (mAccount)
+  if (mAccount) {
     mAccount->addDeletedFolder( imapPath() );
+  }
 
   FolderStorage::remove();

--- kdepim/kmail/imapaccountbase.h  #1.54.2.1:1.54.2.2
@@ -263,5 +263,5 @@ namespace KMail {
      * Returns the root folder of this account
      */
-    virtual FolderStorage* rootFolder() = 0;
+    virtual FolderStorage* const rootFolder() const = 0;
 
     /**
@@ -270,4 +270,10 @@ namespace KMail {
     ProgressItem* listDirProgressItem();
 
+    /**
+     * @return the number of (subscribed, if applicable) folders in this
+     * account.
+     */
+    virtual unsigned int folderCount() const;
+
   private slots:
     /**

--- kdepim/kmail/imapaccountbase.cpp  #1.94.2.2:1.94.2.3
@@ -31,5 +31,6 @@ using KMail::SieveConfig;
 #include "kmacctmgr.h"
 #include "kmfolder.h"
-#include "kmbroadcaststatus.h"
+#include "broadcaststatus.h"
+using KPIM::BroadcastStatus;
 #include "kmmainwin.h"
 #include "kmfolderimap.h"
@@ -46,4 +47,5 @@ using KMail::ImapJob;
 #include "progressmanager.h"
 using KPIM::ProgressManager;
+#include "kmfoldermgr.h"
 
 #include <kapplication.h>
@@ -296,5 +298,5 @@ namespace KMail {
       checkDone( false, CheckOK );
     }
-    KMBroadcastStatus::instance()->setStatusMsgTransmissionCompleted(
+    BroadcastStatus::instance()->setStatusMsgTransmissionCompleted(
         name(), newMails);
   }
@@ -851,8 +853,20 @@ namespace KMail {
           this,
           SLOT( slotAbortRequested( ProgressItem* ) ) );
+      // Start with a guessed value of the old folder count plus 5%. As long
+      // as the list of folders doesn't constantly change, that should be good
+      // enough.
+      unsigned int count = folderCount();
+      mListDirProgressItem->setTotalItems( count + (unsigned int)(count*0.05) );
     }
     return mListDirProgressItem;
   }
 
+  unsigned int ImapAccountBase::folderCount() const
+  {
+    if ( !rootFolder() || !rootFolder()->folder() || !rootFolder()->folder()->child() )
+      return 0;
+    return kmkernel->imapFolderMgr()->folderCount( rootFolder()->folder()->child() );
+  }
+
 } // namespace KMail
 

--- kdepim/kmail/Makefile.am  #1.281.2.5:1.281.2.6
@@ -64,7 +64,6 @@
                 networkaccount.cpp imapaccountbase.cpp \
                 kmservertest.cpp kmacctimap.cpp kmacctcachedimap.cpp \
-                undostack.cpp kmbroadcaststatus.cpp \
                 kmfawidgets.cpp kmfoldermbox.cpp kmfolderimap.cpp \
-                kmfoldercachedimap.cpp \
+                undostack.cpp kmfoldercachedimap.cpp \
                 kmfoldermaildir.cpp kmacctexppop.cpp colorlistbox.cpp \
                 kmkernel.cpp kmailIface.skel kmailicalIface.skel \


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic