accomodate latest changes in libxklavier: counting on utf-8 in descriptions

svn path=/trunk/; revision=8929
This commit is contained in:
Sergey V. Udaltsov 2008-09-05 23:29:10 +00:00
parent dab7c11694
commit 3db2ae2107
3 changed files with 10 additions and 9 deletions

View file

@ -1,3 +1,9 @@
2008-09-05 Sergey Udaltsov <svu@gnome.org>
* 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 <svu@gnome.org>
* gnome-keyboard-properties-xkbltadd.c: chosing first variant by

View file

@ -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);
}

View file

@ -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