GNOME Bugzilla – Bug 721006
Some XKB layouts are not needed in gnome-control-center region
Last modified: 2018-02-02 09:12:21 UTC
When open gnome-control-center region and click '+' button to add new sources, some Chinese(China) sources are listed, e.g. Chinese(pinyin), Chinese(cangjie (m17n)), and it also shows 'cn' XKB layout as Chinese. Users expect to be able to type Chinese with 'cn' but actually 'cn' is ASCII layout so they are confused. Since most Chinese users can use 'us' layout, it would be good to remove 'cn' in gnome-control-center. Also the special 'nec_vndr/jp' layout is minor and could be removed.
https://bugzilla.redhat.com/show_bug.cgi?id=885997
Created attachment 264829 [details] [review] Patch for cc-input-chooser.c
Review of attachment 264829 [details] [review]: Is this patch relevant still? Also, I'm not sure I understood the reasoning behind it yet.
Review of attachment 264829 [details] [review]: > Is this patch relevant still? Yes. > Also, I'm not sure I understood the reasoning behind it yet. We don't want to show a Chinese keyboard layout because it's useless (it's an ASCII keyboard layout, which can't type Chinese characters). Users would use an input method instead. ::: panels/region/cc-input-chooser.c @@ +821,3 @@ + if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB)) + for (i = 0; xkb_layout_blacklist[i]; i++) Use g_strv_contains() instead. @@ +836,3 @@ } + +next_table_rows_by_id: This is pretty ugly, I'd rather the while() loop was transformed into a for() loop to avoid this construct.
Now I think it's better to move entries from /usr/share/X11/xkb/rules/evdev.xml to /usr/share/X11/xkb/rules/evdev.extras.xml than the black list. So probably we will take another approach. --- /usr/share/X11/xkb/rules/evdev.xml.orig +++ /usr/share/X11/xkb/rules/evdev.xml @@ -2301,9 +2301,6 @@ <shortDescription>zh</shortDescription> <description>Chinese</description> - <languageList> - <iso639Id>chi</iso639Id> - </languageList> </configItem> <variantList> <variant> --- /usr/share/X11/xkb/rules/evdev.extras.xml.orig +++ /usr/share/X11/xkb/rules/evdev.extras.xml @@ -1360,6 +1360,16 @@ </variant> </variantList> </layout> + <layout> + <configItem> + <name>cn</name> + <shortDescription>zh</shortDescription> + <description>Chinese</description> + <languageList> + <iso639Id>chi</iso639Id> + </languageList> + </configItem> + </layout> </layoutList> <optionList> <group allowMultipleSelection="true">
(In reply to Takao Fujiwara from comment #5) > Now I think it's better to move entries from > /usr/share/X11/xkb/rules/evdev.xml to > /usr/share/X11/xkb/rules/evdev.extras.xml than the black list. > So probably we will take another approach. Do you want to file an fd.o bug about that? And we'll close this one.
Filed the patch and got several replies: https://bugs.freedesktop.org/show_bug.cgi?id=104868