[evolution] Bug #680577 - [text-highlight] - Failed to load part
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #680577 - [text-highlight] - Failed to load part
- Date: Thu, 26 Jul 2012 19:24:48 +0000 (UTC)
commit 9574b77d639cede8aa38133850c9d4f3e6059a44
Author: Dan VrÃtil <dvratil redhat com>
Date: Thu Jul 26 21:24:23 2012 +0200
Bug #680577 - [text-highlight] - Failed to load part
em-format/e-mail-formatter-text-plain.c | 2 +-
mail/e-mail-request.c | 2 +-
.../e-mail-display-popup-prefer-plain.c | 4 ++++
.../e-mail-display-popup-text-highlight.c | 8 ++++++--
4 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/em-format/e-mail-formatter-text-plain.c b/em-format/e-mail-formatter-text-plain.c
index e2e669d..e7147e8 100644
--- a/em-format/e-mail-formatter-text-plain.c
+++ b/em-format/e-mail-formatter-text-plain.c
@@ -117,7 +117,7 @@ emfe_text_plain_format (EMailFormatterExtension *extension,
content = g_strdup_printf (
"<div class=\"part-container pre\" style=\""
- "border: none; padding: 10px; margin: 0; "
+ "border: none; padding: 8px; margin: 0; "
"background-color: #%06x; color: #%06x;\">\n",
e_color_to_value ((GdkColor *)
e_mail_formatter_get_color (
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
index aee9c9c..28d1c87 100644
--- a/mail/e-mail-request.c
+++ b/mail/e-mail-request.c
@@ -140,7 +140,6 @@ handle_mail_request (GSimpleAsyncResult *res,
g_warning ("Failed to lookup requested part '%s' - this should not happen!", part_id);
}
- g_free (part_id);
} else {
e_mail_formatter_format_sync (
formatter, part_list, request->priv->output_stream,
@@ -162,6 +161,7 @@ handle_mail_request (GSimpleAsyncResult *res,
});
}
+ g_free (part_id);
g_object_unref (part_list);
stream = g_memory_input_stream_new_from_data (
diff --git a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
index 75c74db..fa87357 100644
--- a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
@@ -107,6 +107,10 @@ toggle_part (GtkAction *action,
pp_extension->text_html_id ?
pp_extension->text_html_id :
pp_extension->text_plain_id);
+ g_hash_table_replace (query, g_strdup ("mime_type"),
+ pp_extension->text_html_id ?
+ (gpointer) "text/html" :
+ (gpointer) "text/plain");
soup_uri_set_query_from_form (soup_uri, query);
g_hash_table_destroy (query);
diff --git a/modules/text-highlight/e-mail-display-popup-text-highlight.c b/modules/text-highlight/e-mail-display-popup-text-highlight.c
index 0adea1d..18476c1 100644
--- a/modules/text-highlight/e-mail-display-popup-text-highlight.c
+++ b/modules/text-highlight/e-mail-display-popup-text-highlight.c
@@ -131,16 +131,18 @@ reformat (GtkAction *old,
g_free (uri);
if (!soup_uri)
- return;
+ goto exit;
if (!soup_uri->query) {
soup_uri_free (soup_uri);
- return;
+ goto exit;
}
query = soup_form_decode (soup_uri->query);
g_hash_table_replace (
query, g_strdup ("__formatas"), (gpointer) gtk_action_get_name (action));
+ g_hash_table_replace (
+ query, g_strdup ("mime_type"), (gpointer) "text/plain");
soup_uri_set_query_from_form (soup_uri, query);
g_hash_table_destroy (query);
@@ -157,6 +159,7 @@ reformat (GtkAction *old,
g_free (uri);
/* The frame has been reloaded, the document pointer is invalid now */
+exit:
th_extension->document = NULL;
}
@@ -283,6 +286,7 @@ update_actions (EMailDisplayPopupExtension *extension,
th_extension->action_group = create_group(extension);
}
+ th_extension->document = NULL;
g_object_get (G_OBJECT (context), "inner-node", &node, NULL);
document = webkit_dom_node_get_owner_document (node);
uri = webkit_dom_document_get_document_uri (document);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]