diff options
author | Not Zed <NotZed@Ximian.com> | 2001-07-19 19:50:49 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-07-19 19:50:49 +0800 |
commit | cdea22d886c2547288e24129b14399eeed08cd17 (patch) | |
tree | cd73b00b4d561f1cb9f2ee4288df284cd7f4b11e /mail/mail-ops.c | |
parent | e20c4b9b33ec0c32fc8f5b5611f9e0412b2bf790 (diff) | |
download | gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar.gz gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar.bz2 gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar.lz gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar.xz gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.tar.zst gsoc2013-evolution-cdea22d886c2547288e24129b14399eeed08cd17.zip |
partial checkin before completing the changes
2001-07-18 Not Zed <NotZed@Ximian.com>
* mail-local.c (reconfigure_folder_reconfigure): Changed to use
camel_operation rathre than mail_status.
(reconfigure_folder_describe): re-enabled this function.
* mail-ops.c (get_messages_get): Changed to use camel-progress for
status reporting.
(save_messages_save): Likewise.
2001-07-17 Not Zed <NotZed@Ximian.com>
* mail-mt.c (struct _mail_msg_priv, destroy_objects, mail_msg_new,
mail_msg_free, do_op_status): Changed to use an EvolutionActivityClient for
progress.
svn path=/trunk/; revision=11223
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index b9553d7570..0dc4cec42b 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1714,16 +1714,21 @@ static void get_messages_get(struct _mail_msg *mm) int i; CamelMimeMessage *message; + camel_operation_register(mm->cancel); + camel_operation_start(mm->cancel, _("Retrieving %d messsage(s)"), m->uids->len); for (i=0; i<m->uids->len; i++) { - mail_statusf(_("Retrieving message number %d of %d (uid \"%s\")"), - i+1, m->uids->len, (char *) m->uids->pdata[i]); + int pc = ((i+1) * 100) / m->uids->len; message = camel_folder_get_message(m->folder, m->uids->pdata[i], &mm->ex); + camel_operation_progress(mm->cancel, pc); if (message == NULL) break; g_ptr_array_add(m->messages, message); } + + camel_operation_end(mm->cancel); + camel_operation_unregister(mm->cancel); } static void get_messages_got(struct _mail_msg *mm) @@ -1878,14 +1883,16 @@ static void save_messages_save(struct _mail_msg *mm) camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter); camel_object_unref((CamelObject *)from_filter); + camel_operation_register(mm->cancel); + camel_operation_start(mm->cancel, _("Saving %d messsage(s)"), m->uids->len); + for (i=0; i<m->uids->len; i++) { CamelMimeMessage *message; + int pc = ((i+1) * 100) / m->uids->len; - mail_statusf(_("Saving message %d of %d (uid \"%s\")"), - i+1, m->uids->len, (char *)m->uids->pdata[i]); - message = camel_folder_get_message(m->folder, m->uids->pdata[i], &mm->ex); - if (!message) + camel_operation_progress(mm->cancel, pc); + if (message == NULL) break; /* we need to flush after each stream write since we are writing to the same fd */ @@ -1906,6 +1913,9 @@ static void save_messages_save(struct _mail_msg *mm) camel_object_unref((CamelObject *)filtered_stream); camel_object_unref((CamelObject *)stream); + + camel_operation_end(mm->cancel); + camel_operation_unregister(mm->cancel); } static void save_messages_saved(struct _mail_msg *mm) |