Add progress reporting to deleting messages. Dont change the calculation
authorNot Zed <NotZed@Ximian.com>
Wed, 29 Aug 2001 14:05:55 +0000 (14:05 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Wed, 29 Aug 2001 14:05:55 +0000 (14:05 +0000)
2001-08-29  Not Zed  <NotZed@Ximian.com>

        * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
        reporting to deleting messages.  Dont change the calculation to a
        bloody float.  Bug #6189.

camel/ChangeLog
camel/providers/pop3/camel-pop3-folder.c

index a84dd18..5e7c413 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-29  Not Zed  <NotZed@Ximian.com>
+
+       * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
+       reporting to deleting messages.  Dont change the calculation to a
+       bloody float.  Bug #6189.
+
 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
 
        * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
index cee18d5..d18680d 100644 (file)
@@ -255,16 +255,23 @@ pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
        
        pop3_folder = CAMEL_POP3_FOLDER (folder);
        pop3_store = CAMEL_POP3_STORE (folder->parent_store);
+
+       camel_operation_start(NULL, _("Expunging deleted messages"));
        
        for (i = 0; i < pop3_folder->uids->len; i++) {
+               camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
                if (pop3_folder->flags[i] & CAMEL_MESSAGE_DELETED) {
                        status = camel_pop3_command (pop3_store, NULL, ex,
                                                     "DELE %d", i + 1);
-                       if (status != CAMEL_POP3_OK)
+                       if (status != CAMEL_POP3_OK) {
+                               camel_operation_end(NULL);
                                return;
+                       }
                }
        }
-       
+
+       camel_operation_end(NULL);
+
        camel_pop3_store_expunge (pop3_store, ex);
 }