[gnome-control-center/196-remove-cjk-xkb-based-input-sources-from-the-list] region: Do not show XKB input sources for CJK languages



commit e57a84e5d67df228c7af36352326a1ae3c217e5c
Author: Changwoo Ryu <cwryu debian org>
Date:   Sun Aug 4 16:26:19 2019 +0900

    region: Do not show XKB input sources for CJK languages
    
    Only ibus based input sources should be used for CJK languages.
    
    XKB layouts for CJK languages have their own language or country specific
    features but they can't be used alone for text input of the languages. So
    selecting one of the XKB layouts as an input source does not make sense.
    Showing these lnput sources in the input source selection UI could confuse
    users and lead them to broken input settings.
    
    https://gitlab.gnome.org/GNOME/gnome-control-center/issues/196

 panels/region/cc-input-chooser.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index 74c8e0ca4..95fbafbb7 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -917,6 +917,11 @@ get_locale_infos (CcInputChooser *self)
       g_hash_table_replace (self->locales, g_strdup (simple_locale), info);
       add_locale_to_table (self->locales_by_language, lang_code, info);
 
+      /* Skip XKB input sources for CJK languages. */
+      if (strcmp(lang_code, "ja") == 0 || strcmp(lang_code, "ko") == 0 ||
+         strcmp(lang_code, "zh") == 0)
+       continue;
+
       if (gnome_get_input_source_from_locale (simple_locale, &type, &id) &&
           g_str_equal (type, INPUT_SOURCE_TYPE_XKB))
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]