From 3db2ae21074cb08c1cbeb8800099352f2bc16917 Mon Sep 17 00:00:00 2001 From: "Sergey V. Udaltsov" Date: Fri, 5 Sep 2008 23:29:10 +0000 Subject: [PATCH] accomodate latest changes in libxklavier: counting on utf-8 in descriptions svn path=/trunk/; revision=8929 --- capplets/keyboard/ChangeLog | 6 ++++++ capplets/keyboard/gnome-keyboard-properties-xkb.c | 6 +++--- capplets/keyboard/gnome-keyboard-properties-xkblt.c | 7 +------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/capplets/keyboard/ChangeLog b/capplets/keyboard/ChangeLog index c41e6d66d..155e48c54 100644 --- a/capplets/keyboard/ChangeLog +++ b/capplets/keyboard/ChangeLog @@ -1,3 +1,9 @@ +2008-09-05 Sergey Udaltsov + + * gnome-keyboard-properties-xkb.c, gnome-keyboard-properties-xkblt.c: + using the fact that latest libxklavier returns descriptions in UTF-8, + no need to convert in 8-bit locales + 2008-09-03 Sergey Udaltsov * gnome-keyboard-properties-xkbltadd.c: chosing first variant by diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c index 4ac249d4f..c025ee49e 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkb.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkb.c @@ -48,8 +48,7 @@ char * xci_desc_to_utf8 (XklConfigItem * ci) { char *sd = g_strstrip (ci->description); - return sd[0] == 0 ? g_strdup (ci->name) : - g_locale_to_utf8 (sd, -1, NULL, NULL, NULL); + return sd[0] == 0 ? g_strdup (ci->name) : g_strdup (sd); } static void @@ -88,7 +87,8 @@ static void model_key_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GladeXML * dialog) { - set_model_text (WID ("xkb_model_pick"), gconf_entry_get_value (entry)); + set_model_text (WID ("xkb_model_pick"), + gconf_entry_get_value (entry)); enable_disable_restoring (dialog); } diff --git a/capplets/keyboard/gnome-keyboard-properties-xkblt.c b/capplets/keyboard/gnome-keyboard-properties-xkblt.c index 767096876..8612969df 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkblt.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkblt.c @@ -365,15 +365,10 @@ gchar * xkb_layout_description_utf8 (const gchar * visible) { char *l, *sl, *v, *sv; - char *v1, *utf_visible; if (gkbd_keyboard_config_get_descriptions (config_registry, visible, &sl, &l, &sv, &v)) visible = gkbd_keyboard_config_format_full_layout (l, v); - v1 = g_strdup (visible); - utf_visible = - g_locale_to_utf8 (g_strstrip (v1), -1, NULL, NULL, NULL); - g_free (v1); - return utf_visible; + return g_strstrip (g_strdup (visible)); } void