[gnome-control-center/196-remove-cjk-xkb-based-input-sources-from-the-list] region: Do not show XKB input sources for CJK in language rows
- From: Changwoo Ryu <cwryu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/196-remove-cjk-xkb-based-input-sources-from-the-list] region: Do not show XKB input sources for CJK in language rows
- Date: Thu, 8 Aug 2019 03:17:36 +0000 (UTC)
commit 8612d3362d13154364a36a0ff256c496ec7dafc7
Author: Changwoo Ryu <cwryu debian org>
Date: Sun Aug 4 16:26:19 2019 +0900
region: Do not show XKB input sources for CJK in language rows
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
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..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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]