[evolution] Bug 677635 - Vanished message list with filled preview panel
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 677635 - Vanished message list with filled preview panel
- Date: Tue, 24 Jul 2012 08:32:26 +0000 (UTC)
commit 0568c36bde3fde0baaf5602d0a22fcf5749d27d9
Author: Dan VrÃtil <dvratil redhat com>
Date: Tue Jul 24 10:30:52 2012 +0200
Bug 677635 - Vanished message list with filled preview panel
mail/e-mail-reader-utils.c | 7 +++++--
mail/e-mail-reader-utils.h | 1 +
mail/e-mail-reader.c | 5 ++++-
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 3b0b065..ae4a98b 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 4cb427f..7250812 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 487d9ff..2f3a063 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 7cce5f9..9e2a31a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]