Show progress when reading MIME body parts.
authorChris Hanson <org/chris-hanson/cph>
Fri, 2 Jun 2000 01:52:46 +0000 (01:52 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 2 Jun 2000 01:52:46 +0000 (01:52 +0000)
v7/src/imail/imail-imap.scm

index 3e3c69ade43cf96d1d4ff22b87a40b406887e97b..c904763a4936a1ee276d867874173fde14e6065b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-imap.scm,v 1.99 2000/06/01 20:08:26 cph Exp $
+;;; $Id: imail-imap.scm,v 1.100 2000/06/02 01:52:46 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
                    x))
              selector)))
     (imap:response:fetch-body-part
-     (imap:command:uid-fetch
-      (imap-folder-connection (message-folder message))
-      (imap-message-uid message)
-      `(',(string-append "body["
-                        (decorated-string-append
-                         "" "." ""
-                         (map (lambda (x)
-                                (if (exact-nonnegative-integer? x)
-                                    (number->string x)
-                                    (symbol->string x)))
-                              section))
-                        "]")))
+     (let ((suffix 
+           (string-append
+            " body part for message "
+            (number->string (+ (message-index message) 1)))))
+       ((imail-message-wrapper "Reading" suffix)
+       (lambda ()
+         (imap:read-literal-progress-hook imail-progress-meter
+           (lambda ()
+             (imap:command:uid-fetch
+              (imap-folder-connection (message-folder message))
+              (imap-message-uid message)
+              `(',(string-append "body["
+                                 (decorated-string-append
+                                  "" "." ""
+                                  (map (lambda (x)
+                                         (if (exact-nonnegative-integer? x)
+                                             (number->string x)
+                                             (symbol->string x)))
+                                       section))
+                                 "]"))))))))
      section
      #f)))
 \f