aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-01-19 01:34:56 +0800
committerMilan Crha <mcrha@redhat.com>2013-01-19 01:34:56 +0800
commit722a27e8507541e64ca2a436a7f10069b9e01223 (patch)
treeeefaf16cd84524a8c3ee68ad4edd5937b8a16f1d /modules
parent590b4711b78b94cac68a6c52e09a62628b5648d8 (diff)
downloadgsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.gz
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.bz2
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.lz
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.xz
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.zst
gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.zip
Bug #692005 - Changing character encoding doesn't work
Diffstat (limited to 'modules')
-rw-r--r--modules/itip-formatter/e-mail-formatter-itip.c11
-rw-r--r--modules/text-highlight/e-mail-formatter-text-highlight.c10
-rw-r--r--modules/vcard-inline/e-mail-formatter-vcard-inline.c10
3 files changed, 31 insertions, 0 deletions
diff --git a/modules/itip-formatter/e-mail-formatter-itip.c b/modules/itip-formatter/e-mail-formatter-itip.c
index ca2a0c6f24..500810b639 100644
--- a/modules/itip-formatter/e-mail-formatter-itip.c
+++ b/modules/itip-formatter/e-mail-formatter-itip.c
@@ -82,6 +82,7 @@ emfe_itip_format (EMailFormatterExtension *extension,
CamelFolder *folder;
CamelMimeMessage *message;
const gchar *message_uid;
+ const gchar *default_charset, *charset;
gchar *uri;
folder = e_mail_part_list_get_folder (context->part_list);
@@ -102,10 +103,20 @@ emfe_itip_format (EMailFormatterExtension *extension,
itip_part->uid = g_strdup (message_uid);
itip_part->msg = g_object_ref (message);
+ default_charset = e_mail_formatter_get_default_charset (formatter);
+ charset = e_mail_formatter_get_charset (formatter);
+
+ if (!default_charset)
+ default_charset = "";
+ if (!charset)
+ charset = "";
+
uri = e_mail_part_build_uri (
folder, message_uid,
"part_id", G_TYPE_STRING, part->id,
"mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW,
+ "formatter_default_charset", G_TYPE_STRING, default_charset,
+ "formatter_charset", G_TYPE_STRING, charset,
NULL);
buffer = g_string_sized_new (256);
diff --git a/modules/text-highlight/e-mail-formatter-text-highlight.c b/modules/text-highlight/e-mail-formatter-text-highlight.c
index d180d60af7..5e8c15c16c 100644
--- a/modules/text-highlight/e-mail-formatter-text-highlight.c
+++ b/modules/text-highlight/e-mail-formatter-text-highlight.c
@@ -312,11 +312,19 @@ emfe_text_highlight_format (EMailFormatterExtension *extension,
} else {
CamelFolder *folder;
const gchar *message_uid;
+ const gchar *default_charset, *charset;
gchar *uri, *str;
gchar *syntax;
folder = e_mail_part_list_get_folder (context->part_list);
message_uid = e_mail_part_list_get_message_uid (context->part_list);
+ default_charset = e_mail_formatter_get_default_charset (formatter);
+ charset = e_mail_formatter_get_charset (formatter);
+
+ if (!default_charset)
+ default_charset = "";
+ if (!charset)
+ charset = "";
syntax = get_syntax (part, NULL);
@@ -325,6 +333,8 @@ emfe_text_highlight_format (EMailFormatterExtension *extension,
"part_id", G_TYPE_STRING, part->id,
"mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW,
"__formatas", G_TYPE_STRING, syntax,
+ "formatter_default_charset", G_TYPE_STRING, default_charset,
+ "formatter_charset", G_TYPE_STRING, charset,
NULL);
g_free (syntax);
diff --git a/modules/vcard-inline/e-mail-formatter-vcard-inline.c b/modules/vcard-inline/e-mail-formatter-vcard-inline.c
index f7dc88e5b0..bcced23351 100644
--- a/modules/vcard-inline/e-mail-formatter-vcard-inline.c
+++ b/modules/vcard-inline/e-mail-formatter-vcard-inline.c
@@ -84,6 +84,7 @@ emfe_vcard_inline_format (EMailFormatterExtension *extension,
} else {
CamelFolder *folder;
const gchar *message_uid;
+ const gchar *default_charset, *charset;
gchar *str, *uri;
gint length;
const gchar *label = NULL;
@@ -97,6 +98,13 @@ emfe_vcard_inline_format (EMailFormatterExtension *extension,
folder = e_mail_part_list_get_folder (context->part_list);
message_uid = e_mail_part_list_get_message_uid (context->part_list);
+ default_charset = e_mail_formatter_get_default_charset (formatter);
+ charset = e_mail_formatter_get_charset (formatter);
+
+ if (!default_charset)
+ default_charset = "";
+ if (!charset)
+ charset = "";
if (vcard_part->message_uid == NULL && message_uid != NULL)
vcard_part->message_uid = g_strdup (message_uid);
@@ -108,6 +116,8 @@ emfe_vcard_inline_format (EMailFormatterExtension *extension,
folder, message_uid,
"part_id", G_TYPE_STRING, part->id,
"mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW,
+ "formatter_default_charset", G_TYPE_STRING, default_charset,
+ "formatter_charset", G_TYPE_STRING, charset,
NULL);
mode = eab_contact_formatter_get_display_mode (vcard_part->formatter);