[evolution/wip/webkit2] Use UTF-8 default composer-charset, if not set
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Use UTF-8 default composer-charset, if not set
- Date: Thu, 3 Mar 2016 15:25:28 +0000 (UTC)
commit f2288847ec9550f9115f5d084b56c4acfd408b6b
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 11 16:23:34 2016 +0100
Use UTF-8 default composer-charset, if not set
Also do not use the value from the Mail Preferences, because the option
in the Composer Preferences doesn't reflect it, neither the previous
default 'us-ascii', nor whatever the iconv locale returned.
composer/e-composer-private.c | 18 ++++--------------
data/org.gnome.evolution.mail.gschema.xml.in | 2 +-
2 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 90caa1f..6ab5fa0 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -483,25 +483,15 @@ e_composer_get_default_charset (void)
charset = g_settings_get_string (settings, "composer-charset");
- /* See what charset the mailer is using.
- * XXX We should not have to know where this lives in GSettings.
- * Need a mail_config_get_default_charset() that does this. */
- if (!charset || charset[0] == '\0') {
+ if (!charset || !*charset) {
g_free (charset);
- charset = g_settings_get_string (settings, "charset");
- if (charset != NULL && *charset == '\0') {
- g_free (charset);
- charset = NULL;
- }
+ charset = NULL;
}
g_object_unref (settings);
- if (charset == NULL)
- charset = g_strdup (camel_iconv_locale_charset ());
-
- if (charset == NULL)
- charset = g_strdup ("us-ascii");
+ if (!charset)
+ charset = g_strdup ("UTF-8");
return charset;
}
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index bee0845..50b44d2 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -38,7 +38,7 @@
<key name="composer-charset" type="s">
<default>''</default>
<_summary>Default charset in which to compose messages</_summary>
- <_description>Default charset in which to compose messages.</_description>
+ <_description>Default charset in which to compose messages. Uses UTF-8, if not set.</_description>
</key>
<key name="composer-gallery-path" type="s">
<default>''</default>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]