[gnome-control-center] region: Use ibus_get_language_name() to get a language from its code
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Use ibus_get_language_name() to get a language from its code
- Date: Sun, 9 Sep 2012 21:20:18 +0000 (UTC)
commit 8af69625d3373809ffb5e603e69c6979e5e67247
Author: Daiki Ueno <ueno unixuser org>
Date: Tue Aug 28 14:04:34 2012 +0900
region: Use ibus_get_language_name() to get a language from its code
ibus_engine_desc_get_language() may return an empty string or language
codes that gdm_get_language_from_name() doesn't understand. Use
ibus_get_language_name() instead to handle such cases properly.
This also allows us to use the same method in gnome-shell to get
consistent display strings.
https://bugzilla.gnome.org/show_bug.cgi?id=682851
panels/region/gnome-region-panel-input.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/panels/region/gnome-region-panel-input.c b/panels/region/gnome-region-panel-input.c
index 1b7057c..c54fa07 100644
--- a/panels/region/gnome-region-panel-input.c
+++ b/panels/region/gnome-region-panel-input.c
@@ -241,18 +241,15 @@ engine_get_display_name (IBusEngineDesc *engine_desc)
{
const gchar *name;
const gchar *language_code;
- gchar *language;
+ const gchar *language;
gchar *display_name;
name = ibus_engine_desc_get_longname (engine_desc);
language_code = ibus_engine_desc_get_language (engine_desc);
-
- language = gdm_get_language_from_name (language_code, NULL);
+ language = ibus_get_language_name (language_code);
display_name = g_strdup_printf ("%s (%s)", language, name);
- g_free (language);
-
return display_name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]