gtk: Fix GtkCellRenderer ignoring keycodes

We should use the new helper code rather than invent our own
functions again.

https://bugzilla.gnome.org/show_bug.cgi?id=663761
This commit is contained in:
Bastien Nocera 2011-11-10 10:58:37 +00:00
parent fb97c28bca
commit d69c7f4776

View File

@ -301,18 +301,9 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel,
{
gchar *name;
name = gtk_accelerator_get_label (keysym, mask);
name = gtk_accelerator_get_label_with_keycode (NULL, keysym, keycode, mask);
if (name == NULL)
name = gtk_accelerator_name (keysym, mask);
if (keysym == 0)
{
gchar *tmp;
tmp = name;
name = g_strdup_printf ("%s0x%02x", tmp, keycode);
g_free (tmp);
}
name = gtk_accelerator_name_with_keycode (NULL, keysym, keycode, mask);
return name;
}