diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-07-24 16:30:52 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-07-24 16:30:52 +0800 |
commit | 0568c36bde3fde0baaf5602d0a22fcf5749d27d9 (patch) | |
tree | 3306204122b4ae98c225dea0387099daddca4e7c | |
parent | bb3487625b354038f490fdf30ffc4490fd31c035 (diff) | |
download | gsoc2013-evolution-0568c36bde3fde0baaf5602d0a22fcf5749d27d9.tar.gz gsoc2013-evolution-0568c36bde3fde0baaf5602d0a22fcf5749d27d9.tar.zst gsoc2013-evolution-0568c36bde3fde0baaf5602d0a22fcf5749d27d9.zip |
Bug 677635 - Vanished message list with filled preview panel
-rw-r--r-- | mail/e-mail-reader-utils.c | 7 | ||||
-rw-r--r-- | mail/e-mail-reader-utils.h | 1 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 5 | ||||
-rw-r--r-- | mail/message-list.c | 6 |
4 files changed, 15 insertions, 4 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 3b0b0655b4..ae4a98b664 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -980,7 +980,7 @@ mail_reader_get_message_to_print_ready_cb (GObject *object, e_mail_reader_parse_message ( context->reader, context->folder, context->message_uid, - message, mail_reader_do_print_message, context); + message, NULL, mail_reader_do_print_message, context); } void @@ -1300,7 +1300,7 @@ mail_reader_get_message_ready_cb (CamelFolder *folder, g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message)); e_mail_reader_parse_message (context->reader, context->folder, - context->message_uid, message, + context->message_uid, message, NULL, mail_reader_reply_message_parsed, context); } @@ -1995,6 +1995,7 @@ e_mail_reader_parse_message (EMailReader *reader, CamelFolder *folder, const gchar *message_uid, CamelMimeMessage *message, + GCancellable *cancellable, GAsyncReadyCallback ready_callback, gpointer user_data) { @@ -2007,6 +2008,8 @@ e_mail_reader_parse_message (EMailReader *reader, data = g_new0 (struct mail_reader_parse_message_run_data_, 1); data->activity = e_mail_reader_new_activity (reader); e_activity_set_text (data->activity, _("Parsing message")); + if (cancellable) + e_activity_set_cancellable (data->activity, cancellable); data->folder = g_object_ref (folder); data->message = g_object_ref (message); data->message_uid = g_strdup (message_uid); diff --git a/mail/e-mail-reader-utils.h b/mail/e-mail-reader-utils.h index 4cb427f8b8..7250812ccf 100644 --- a/mail/e-mail-reader-utils.h +++ b/mail/e-mail-reader-utils.h @@ -92,6 +92,7 @@ void e_mail_reader_parse_message CamelFolder *folder, const gchar *message_uid, CamelMimeMessage *message, + GCancellable *cancellable, GAsyncReadyCallback ready_callback, gpointer user_data); diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 487d9ff275..2f3a063686 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -72,7 +72,7 @@ ((EMailReaderPrivate *) g_object_get_qdata \ (G_OBJECT (obj), quark_private)) -#define d(x) x +#define d(x) typedef struct _EMailReaderClosure EMailReaderClosure; typedef struct _EMailReaderPrivate EMailReaderPrivate; @@ -3140,8 +3140,10 @@ mail_reader_set_display_formatter_for_message (EMailReader *reader, { CamelObjectBag *registry; EMailPartList *parts; + EMailReaderPrivate *priv; gchar *mail_uri; + priv = E_MAIL_READER_GET_PRIVATE (reader); mail_uri = e_mail_part_build_uri (folder, message_uid, NULL, NULL); registry = e_mail_part_list_get_registry (); parts = camel_object_bag_peek (registry, mail_uri); @@ -3151,6 +3153,7 @@ mail_reader_set_display_formatter_for_message (EMailReader *reader, e_mail_reader_parse_message ( reader, folder, message_uid, message, + priv->retrieving_message, set_mail_display_part_list, NULL); } else { diff --git a/mail/message-list.c b/mail/message-list.c index 7cce5f9899..9e2a31acc8 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -3924,9 +3924,13 @@ message_list_set_folder (MessageList *message_list, if (message_list->cursor_uid) { g_free (message_list->cursor_uid); message_list->cursor_uid = NULL; - g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL); } + /* Always emit message-selected, event when an account node + * (folder == NULL) is selected, so that views know what happened and + * can stop all running operations etc. */ + g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL); + if (CAMEL_IS_FOLDER (folder)) { CamelStore *store; gboolean non_trash_folder; |