diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-27 21:01:10 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-27 21:01:10 +0800 |
commit | 555c178a7d52ae4aa5a52fa78bbbc0f70f4cc576 (patch) | |
tree | 938d1b7f190318d9e40b295df7c8c411da608b34 /mail/e-mail-reader.c | |
parent | d00a56d4cc6f3185004f6babdb1a5f7aad729b5e (diff) | |
download | gsoc2013-evolution-555c178a7d52ae4aa5a52fa78bbbc0f70f4cc576.tar.gz gsoc2013-evolution-555c178a7d52ae4aa5a52fa78bbbc0f70f4cc576.tar.zst gsoc2013-evolution-555c178a7d52ae4aa5a52fa78bbbc0f70f4cc576.zip |
Bug #571039 - Shows all selected messages in a preview pane on a slow network
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r-- | mail/e-mail-reader.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index cdb3761d60..c60054b266 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -1845,12 +1845,17 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader) html_display_visible = GTK_WIDGET_MAPPED (widget); selected_uid_changed = g_strcmp0 (cursor_uid, format_uid); - if (html_display_visible && selected_uid_changed) - mail_get_messagex ( + if (html_display_visible && selected_uid_changed) { + gint op_id; + + op_id = mail_get_messagex ( message_list->folder, cursor_uid, mail_reader_message_loaded_cb, g_object_ref (reader), mail_msg_fast_ordered_push); + + g_object_set_data (G_OBJECT (reader), "preview-get-message-op-id", GINT_TO_POINTER (op_id)); + } } else em_format_format (EM_FORMAT (html_display), NULL, NULL, NULL); @@ -1866,6 +1871,12 @@ mail_reader_message_selected_cb (EMailReader *reader, { GSource *source; const gchar *key; + gint op_id; + + /* cancel previous message fetching, if any, first */ + op_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (reader), "preview-get-message-op-id")); + if (op_id) + mail_msg_cancel (op_id); /* XXX This is kludgy, but we have no other place to store timeout * state information. Addendum: See EAttachmentView for an example |