summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangwoo Ryu <cwryu@debian.org>2019-08-04 16:26:19 +0900
committerChangwoo Ryu <cwryu@debian.org>2019-08-08 12:14:28 +0900
commit8612d3362d13154364a36a0ff256c496ec7dafc7 (patch)
treeea7fca8313d1672bd603e1cbe6d5a9f55f74a4f5
parent1d0ad6ea0bbba44ae5254a5e33b7e9f481c3a138 (diff)
downloadgnome-control-center-196-remove-cjk-xkb-based-input-sources-from-the-list.tar.gz
region: Do not show XKB input sources for CJK in language rows196-remove-cjk-xkb-based-input-sources-from-the-list
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. It removes the CJK XKB input sources from the language rows. But they are kept in the "Other" row, as they often seem to be used workarounds for settings desired XKB layouts for other input sources. https://gitlab.gnome.org/GNOME/gnome-control-center/issues/196
-rw-r--r--panels/region/cc-input-chooser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index 74c8e0ca4..159ac1514 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -930,6 +930,11 @@ get_locale_infos (CcInputChooser *self)
info->engine_rows_by_id = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_object_unref);
+ /* Skip XKB input sources for CJK languages. */
+ if (strcmp(lang_code, "ja") == 0 || strcmp(lang_code, "ko") == 0 ||
+ strcmp(lang_code, "zh") == 0)
+ continue;
+
language_layouts = gnome_xkb_info_get_layouts_for_language (self->xkb_info, lang_code);
add_rows_to_table (self, info, language_layouts, INPUT_SOURCE_TYPE_XKB, id);
add_ids_to_set (layouts_with_locale, language_layouts);