[evolution] I#1175 - composer-attribution-language doesn't take effect for C locale
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#1175 - composer-attribution-language doesn't take effect for C locale
- Date: Thu, 22 Oct 2020 08:04:15 +0000 (UTC)
commit a082d77df35e76809067749ab2db0cfbc526dc33
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 22 10:01:15 2020 +0200
I#1175 - composer-attribution-language doesn't take effect for C locale
Covers three things:
* use '.UTF-8' locale suffix instead of '.utf8'
* do not add the suffix for the C locale
* change in Composer Preferences to 'Same as user interface' did not unset the value in GSettings
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1175
src/e-util/e-misc-utils.c | 2 +-
src/mail/em-composer-utils.c | 4 ++--
src/modules/mail/em-composer-prefs.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/e-util/e-misc-utils.c b/src/e-util/e-misc-utils.c
index aa90fc0b12..68e427d260 100644
--- a/src/e-util/e-misc-utils.c
+++ b/src/e-util/e-misc-utils.c
@@ -4506,7 +4506,7 @@ e_util_enum_supported_locales (void)
catalog_filename = g_build_filename (EVOLUTION_LOCALEDIR, e_supported_locales[ii].code,
"LC_MESSAGES", GETTEXT_PACKAGE ".mo", NULL);
if (catalog_filename && g_file_test (catalog_filename, G_FILE_TEST_EXISTS)) {
- g_string_printf (locale, "%s.utf8", e_supported_locales[ii].locale);
+ g_string_printf (locale, "%s.UTF-8", e_supported_locales[ii].locale);
if (!setlocale (category, locale->str)) {
e_supported_locales[ii].locale = NULL;
diff --git a/src/mail/em-composer-utils.c b/src/mail/em-composer-utils.c
index f48bfd9d13..92a6c85c76 100644
--- a/src/mail/em-composer-utils.c
+++ b/src/mail/em-composer-utils.c
@@ -1959,10 +1959,10 @@ emcu_prepare_attribution_locale (ESource *identity_source,
}
if (lang) {
- if (!strchr (lang, '.')) {
+ if (!g_str_equal (lang, "C") && !strchr (lang, '.')) {
gchar *tmp;
- tmp = g_strconcat (lang, ".utf8", NULL);
+ tmp = g_strconcat (lang, ".UTF-8", NULL);
g_free (lang);
lang = tmp;
}
diff --git a/src/modules/mail/em-composer-prefs.c b/src/modules/mail/em-composer-prefs.c
index b411599595..7b4ad40cb5 100644
--- a/src/modules/mail/em-composer-prefs.c
+++ b/src/modules/mail/em-composer-prefs.c
@@ -1337,7 +1337,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
G_SETTINGS_BIND_DEFAULT);
widget = e_builder_get_widget (prefs->builder, "comboboxForwardReplyAttribLanguage");
- gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (widget), NULL, _("Same as user interface"));
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (widget), "", _("Same as user interface"));
em_utils_add_installed_languages (GTK_COMBO_BOX_TEXT (widget));
g_settings_bind (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]