diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-07-27 03:24:23 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-07-27 03:24:23 +0800 |
commit | 9574b77d639cede8aa38133850c9d4f3e6059a44 (patch) | |
tree | 286a41cd6e5f0abc19e0c4313610986bd728608d /modules | |
parent | 7878c06f05c0aa1a66b380fd4f31ddde227c7db1 (diff) | |
download | gsoc2013-evolution-9574b77d639cede8aa38133850c9d4f3e6059a44.tar.gz gsoc2013-evolution-9574b77d639cede8aa38133850c9d4f3e6059a44.tar.zst gsoc2013-evolution-9574b77d639cede8aa38133850c9d4f3e6059a44.zip |
Bug #680577 - [text-highlight] - Failed to load part
Diffstat (limited to 'modules')
-rw-r--r-- | modules/prefer-plain/e-mail-display-popup-prefer-plain.c | 4 | ||||
-rw-r--r-- | modules/text-highlight/e-mail-display-popup-text-highlight.c | 8 |
2 files changed, 10 insertions, 2 deletions
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 75c74db71e..fa87357eb9 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 0adea1dac7..18476c17bc 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); |