After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682313 - input: expand the IBus engines whitelist, provide an option to show all
input: expand the IBus engines whitelist, provide an option to show all
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on: 683232
Blocks: 683697
 
 
Reported: 2012-08-21 00:54 UTC by Matthias Clasen
Modified: 2012-09-10 06:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region: Drop the whitelist of supported IBus engines (1.92 KB, patch)
2012-08-25 12:25 UTC, Mathieu Bridon
rejected Details | Review
region: Exclude IBus XKB engines (875 bytes, patch)
2012-08-25 12:26 UTC, Mathieu Bridon
rejected Details | Review
region: Replace the IBus engines whitelist with a blacklist instead (3.44 KB, patch)
2012-08-25 19:48 UTC, Rui Matos
none Details | Review
blacklist m17n engines that are actually duplicated (3.83 KB, patch)
2012-08-28 01:30 UTC, Daiki Ueno
none Details | Review
merge patch from bug 682851 (4.63 KB, patch)
2012-08-29 01:12 UTC, Daiki Ueno
none Details | Review
region: Honor the 'ibus-use-extra-engines' gsettings key (1.77 KB, patch)
2012-09-02 23:53 UTC, Rui Matos
none Details | Review
region: Honor the 'show-all-sources' gsettings key (1.72 KB, patch)
2012-09-03 22:36 UTC, Rui Matos
committed Details | Review
region: Expand the supported IBus engines whitelist (3.19 KB, patch)
2012-09-04 13:25 UTC, Rui Matos
committed Details | Review

Description Matthias Clasen 2012-08-21 00:54:25 UTC
We agreed at guadec to switch from a whitelist that just allows a handful of input methods to a blacklist that excludes xkb (and m17n ?) engines, but lets all others through.
Comment 1 Mathieu Bridon 2012-08-25 12:25:30 UTC
Created attachment 222390 [details] [review]
region: Drop the whitelist of supported IBus engines

This is the first patch of the series, dropping the whitelist. Next one filters out the XKB engines.

I hope I'm not stepping on anyone's toes with this, I just wanted this bug to make some progress, as it's necessary for bug 680840. :)
Comment 2 Mathieu Bridon 2012-08-25 12:26:13 UTC
Created attachment 222391 [details] [review]
region: Exclude IBus XKB engines
Comment 3 Mathieu Bridon 2012-08-25 12:27:31 UTC
Please review carefully though, I'm a Python developer and have almost zero experience in C. :)
Comment 4 Rui Matos 2012-08-25 19:43:35 UTC
Hey, thanks for the patches!

(In reply to comment #1)
> I hope I'm not stepping on anyone's toes with this, I just wanted this bug to
> make some progress, as it's necessary for bug 680840. :)

Sure, I just hadn't gotten around to it yet. You provided the extra motivation bit ;-)

(In reply to comment #3)
> Please review carefully though, I'm a Python developer and have almost zero
> experience in C. :)

I see, that explains why the memory management isn't right :-)

Also, I wanted to change this code to use the async ibus API to fetch the engines so I basically ended up re-doing the patch.
Comment 5 Rui Matos 2012-08-25 19:44:58 UTC
Review of attachment 222390 [details] [review]:

Removing from the patch queue.
Comment 6 Rui Matos 2012-08-25 19:45:17 UTC
Review of attachment 222391 [details] [review]:

Removing from the patch queue.
Comment 7 Rui Matos 2012-08-25 19:48:44 UTC
Created attachment 222429 [details] [review]
region: Replace the IBus engines whitelist with a blacklist instead

This also switches to the async engines getter.

--

I'm also blacklisting the m17n engines since those also add a lot of
noise to the list... We might have to let some of them through if
people come up with use cases for them.
Comment 8 Daiki Ueno 2012-08-27 09:23:06 UTC
Review of attachment 222429 [details] [review]:

::: panels/region/gnome-region-panel-input.c
@@ +187,3 @@
+
+      if (strncmp ("xkb:", engine_id, 4) == 0 ||
+          strncmp ("m17n:", engine_id, 5) == 0)

I would suggest to blacklist only "m17n:*:kbd" and a few duplicates: "m17n:zh:py", "m17n:ja:anthy", "m17n:ko:han2", and "m17n:ko:romaja".

They have been already hidden in Fedora quite a while and I can upstream the change if urgent.
Comment 9 Daiki Ueno 2012-08-27 12:55:58 UTC
I mean, s/upstream/fix in ibus-m17n side/.  Just filed a patch:

https://codereview.appspot.com/6485073/

Anyway, I don't think it is a good idea to hide all the m17n engines, because there are non-trivial m17n engines used (as default) in Southeast Asian countries like Thailand or Sri Lanka.  Currently those engines have no alternatives and cannot be replaced with XKB, since they use surrounding text natively:

https://bugzilla.redhat.com/show_bug.cgi?id=435880

and also some keycode might be assigned to multiple keysyms.
Comment 10 Matthias Clasen 2012-08-27 23:09:42 UTC
Thanks for the feedback. The main motivation here is to reduce duplication, while still letting all the actually used engines through. So, we should probably follow your proposal and tighten the m17n part of the blacklist.
Comment 11 Daiki Ueno 2012-08-28 01:30:34 UTC
Created attachment 222603 [details] [review]
blacklist m17n engines that are actually duplicated
Comment 12 Bastien Nocera 2012-08-28 17:54:47 UTC
*** Bug 682851 has been marked as a duplicate of this bug. ***
Comment 13 Bastien Nocera 2012-08-28 17:55:42 UTC
From bug 682851, you can see that it apparently causes problems with certain ibus engine names.
Comment 14 Daiki Ueno 2012-08-29 01:12:23 UTC
Created attachment 222694 [details] [review]
merge patch from bug 682851

It now switched back to use gdm_get_language_from_name() so that the code be consistent with other part of the region panel.  Sorry for the noise on 682851.

I'm not sure this is the best solution.  Other possible options are:

- use "English" (or locale language) instead of "Other" 
  as I wrote in 682851, "Other" needs to be translated

- simply skip the engines whose language is ""
  perhaps this might work since the most of such engines are kind of utilities which I expect not be used so often, though some people might use the latex input method daily to write mathematical papers
Comment 15 Daiki Ueno 2012-08-30 08:14:56 UTC
*** Bug 682851 has been marked as a duplicate of this bug. ***
Comment 16 Rui Matos 2012-08-30 14:31:51 UTC
The more I think about this the less I like changing this to a blacklist.

The way I see it, we are not doing an IBus UI, we are doing the Gnome input methods UI. The fact that there are engines for IBus like 'latex' and 'compose' doesn't mean that they make sense to expose from the Gnome point of view. They might make sense and be very useful but we really need a design on how to expose them. Just throwing everything into the "Region & Language" input sources chooser doesn't seem like the best decision IMHO.

So, I think that, at least for 3.6, we should keep using the whitelist. We should add more engines to it of course, at least the ones Mathieu mentioned in bug 680840 for traditional Chinese and make sure that the ones that we expose are actually usable and maybe even do specific tweaks to the way we present them on a case by case basis.

Daiki, do you known which engines are the most useful and work relatively well? Maybe "Thai (kesmanee (m17n))" is needed. Anything else?

Anyway, I'm sure users will report the lack of engines and we can keep adding them later if they really are important to a large enough population.

BTW, I separated the change to the async ibus engines getter into a different patch. That's bug 683035.
Comment 17 Matthias Clasen 2012-08-30 16:38:41 UTC
Sure, i guess thats a reasonable position and probably safer for 3.6.
Lets grow the whitelist, then.
Comment 18 Daiki Ueno 2012-08-30 21:03:34 UTC
FYI, Chromium OS has such a whitelist:

http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob;f=chrome/browser/chromeos/input_method/input_methods.txt

But beware that, engines written in python (anthy and ibus-table) are not there, since they do not ship python in CrOS.  Instead, "mozc" (their product) and "m17n*" are used for CJK.
Comment 19 Jens Petersen 2012-08-31 04:25:07 UTC
I agree having a default list of recommended IMEs is good,
but it really need to be made configurable.  If control-center
needs to be patched and rebuilt to add engines that is
really not nice for users and will make life extra hard
for distros - so I really hope the list can be handled
with gsettings?  Is that the plan or maybe I am missing something?
Comment 20 Parag AN 2012-08-31 05:02:25 UTC
For Indic languages we have a page here -> https://fedoraproject.org/wiki/I18N/Indic#Keyboard_Layouts

there default m17n keymaps mean those are used more for that language but I don't think we should restrict to single map for Indic languages. We should add all the keymaps listed there.
Comment 21 Mathieu Bridon 2012-08-31 05:09:36 UTC
(In reply to comment #19)
> I agree having a default list of recommended IMEs is good,
> but it really need to be made configurable.  If control-center
> needs to be patched and rebuilt to add engines that is
> really not nice for users and will make life extra hard
> for distros

Why would distros patch GNOME Control Center? Shouldn't they try to with upstream so sad needed engines become "well supported" and get added to the whitelist?

> - so I really hope the list can be handled
> with gsettings?  Is that the plan or maybe I am missing something?

Being able to add to the whitelist with GSettings might be overkill, perhaps a simple "disable_input_sources_whitelist" setting would be enough?

Or rather, couldn't GNOME Tweak Tool provide a list of "everything provided by IBus which is not in the whitelist" ?

This would keep the list in the Control Center short, simple, and only with "well supported" engines, while offering an easy path for users of "unsupported" engines. (until they become "well supported"?)
Comment 22 Matthias Clasen 2012-08-31 16:33:26 UTC
We already have a bug open to add a hidden gsettings for 'show extra xkb layouts' which would add all the fringe and exotic items to the add dialog. 
Should we reuse the same approach for ibus layouts ? Ie have a relatively small whitelist of engines that we know to work well, and then look at a gsetting to decide whether to let everything else in as well ?
Comment 23 Rui Matos 2012-08-31 16:38:39 UTC
I agree with Matthias. The bug he refers to is bug 682240 btw.
Comment 24 Rui Matos 2012-09-02 23:53:27 UTC
Created attachment 223232 [details] [review]
region: Honor the 'ibus-use-extra-engines' gsettings key

This setting overrides our supported IBus engines whitelist and makes
us show every engine installed on the system when enabled.
Comment 25 Rui Matos 2012-09-03 22:36:54 UTC
Created attachment 223382 [details] [review]
region: Honor the 'show-all-sources' gsettings key

--

Updated for the key change.
Comment 26 Matthias Clasen 2012-09-04 01:15:54 UTC
Review of attachment 223382 [details] [review]:

Looks good to me.

::: panels/region/gnome-region-panel-input.c
@@ +212,3 @@
     }
 
+  use_extra_engines = g_settings_get_boolean (input_sources_settings, "show-all-sources");

Pedantic nit: Might be nicer to rename to variable ot show_all_sources, to match the key name.
Comment 27 Bastien Nocera 2012-09-04 10:26:46 UTC
Review of attachment 223382 [details] [review]:

Same comment as Matthias.
Comment 28 Rui Matos 2012-09-04 12:07:58 UTC
Pushed with a renamed variable. Thanks

Attachment 223382 [details] pushed as 2a87480 - region: Honor the 'show-all-sources' gsettings key
Comment 29 Rui Matos 2012-09-04 13:24:48 UTC
I didn't mean to close this just yet.
Comment 30 Rui Matos 2012-09-04 13:25:16 UTC
Created attachment 223428 [details] [review]
region: Expand the supported IBus engines whitelist

Thanks to Daiki Ueno for assembling the list.
Comment 31 Matthias Clasen 2012-09-04 14:03:00 UTC
Review of attachment 223428 [details] [review]:

Looks good to me
Comment 32 Matthias Clasen 2012-09-04 14:03:10 UTC
Review of attachment 223428 [details] [review]:

Looks good to me
Comment 33 Rui Matos 2012-09-04 14:12:58 UTC
Thanks for the review.

Attachment 223428 [details] pushed as 9d46f83 - region: Expand the supported IBus engines whitelist
Comment 34 Parag AN 2012-09-04 14:19:59 UTC
We got 61 m17n keymaps in this patch out of 169 keymaps provided by m17n* packages in Fedora. That's good but we are still missing at least single keymap for some other languages like Russia, Thai, Esperanto. Are we leaving it for now and planning to add in some later release or use "Show all" option for them?
Comment 35 Bastien Nocera 2012-09-05 16:10:08 UTC
(In reply to comment #34)
> We got 61 m17n keymaps in this patch out of 169 keymaps provided by m17n*
> packages in Fedora. That's good but we are still missing at least single keymap
> for some other languages like Russia, Thai, Esperanto. Are we leaving it for
> now and planning to add in some later release or use "Show all" option for
> them?

File a separate bug if particular keymaps are missing. For Esperanto and Russian at least, I'd expect them to be covered by XKB bindings.
Comment 36 Bastien Nocera 2012-09-06 15:10:30 UTC
*** Bug 680840 has been marked as a duplicate of this bug. ***