GNOME Bugzilla – Bug 682851
region: display language independent ibus engine correctly
Last modified: 2012-09-09 21:21:43 UTC
I got the following error when running gnome-control-center region after the blacklist patch (bug 682313) applied: (gnome-control-center:19458): common-cc-panel-CRITICAL **: gdm_get_language_from_name: assertion `*name != '\0'' failed and the engines are displayed as "(null) (latex)". One idea is to add a check before gdm_get_language_from_name() and display it as "Other", but it may break string freeze. How about using ibus_get_language_name() instead?
Created attachment 222609 [details] [review] region: display language independent ibus engine correctly ibus_engine_desc_get_language() may return an empty string for language independent engines such as rawcode or latex. Use ibus_get_language_name() instead of gdm_get_language_from_name() to handle that case properly.
This isn't really a fix to me, and as the patch that creates this bug isn't merged, best discuss this in the original bug. *** This bug has been marked as a duplicate of bug 682313 ***
No, this is not a duplicate of bug 682313, but the potential flaw already there. I agree with that those bugs are related.
And why do you think this doesn't fix the problem? ibus_get_language_name() takes care of the case where the argument is "", unlike gdm_get_language_from_name(). The function is already used in IBus code itself to display engines thus well tested.
I think we don't really want 'latex' and similar in the list...
Sure, then this should be indeed discussed in bug 682313. *** This bug has been marked as a duplicate of bug 682313 ***
I think this patch should go in. Not for the original reason but because it fixes bug 683089 and also because it allows us to have consistent display strings for IBus sources in the gnome-shell menu as well. See bug 683124. I have a WIP set of patches to move gdm-languages into gnome-desktop which would allow us to use it in gnome-shell as well but that won't make it for 3.6 and since IBus conveniently has this functionality readily accessible I think we should use it for now. Longer term we really need a language/iso-codes library that we can use in GNOME.
*** Bug 683089 has been marked as a duplicate of this bug. ***
Review of attachment 222609 [details] [review]: With Rui's OK, the code is good.
Pushed with a different commit summary and message. Thank you Daiki!