diff options
author | Miguel de Icaza <miguel@helixcode.com> | 2000-12-18 14:49:02 +0800 |
---|---|---|
committer | Miguel de Icaza <miguel@src.gnome.org> | 2000-12-18 14:49:02 +0800 |
commit | d89c235bc79ec2263be25144f1b9ed6b3d005821 (patch) | |
tree | 9d776b3201c53aa4369d821d52d13d93d52e6255 /mail/mail-ops.c | |
parent | 4f161c2332035d55870adce47aae2cfadef58156 (diff) | |
download | gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar.gz gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar.bz2 gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar.lz gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar.xz gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.tar.zst gsoc2013-evolution-d89c235bc79ec2263be25144f1b9ed6b3d005821.zip |
Only update display every 2 seconds.
2000-12-18 Miguel de Icaza <miguel@helixcode.com>
* mail-tools.c (mail_tool_move_folder_contents): Only update
display every 2 seconds.
* mail-ops.c (do_view_messages): Only update display every 2 seconds.
svn path=/trunk/; revision=7066
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index baa026acb7..5e0e4a56e7 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -2328,16 +2328,25 @@ do_view_messages (gpointer in_data, gpointer op_data, CamelException *ex) { view_messages_input_t *input = (view_messages_input_t *) in_data; view_messages_data_t *data = (view_messages_data_t *) op_data; - + time_t last_update = 0; int i; data->messages = g_ptr_array_new (); for (i = 0; i < input->uids->len; i++) { CamelMimeMessage *message; + const gboolean last_message = (i+1 == input->uids->len); + time_t now; - mail_op_set_message (_("Retrieving message %d of %d (uid \"%s\")"), - i + 1, input->uids->len, (char *)input->uids->pdata[i]); + /* + * Update display every 2 seconds + */ + time (&now); + if (last_message || ((now - last_update) > 2)) { + mail_op_set_message (_("Retrieving message %d of %d (uid \"%s\")"), + i + 1, input->uids->len, (char *)input->uids->pdata[i]); + last_update = now; + } mail_tool_camel_lock_up (); message = camel_folder_get_message (input->folder, input->uids->pdata[i], ex); |