mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
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:
parent
fb97c28bca
commit
d69c7f4776
@ -301,18 +301,9 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel,
|
|||||||
{
|
{
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
|
||||||
name = gtk_accelerator_get_label (keysym, mask);
|
name = gtk_accelerator_get_label_with_keycode (NULL, keysym, keycode, mask);
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
name = gtk_accelerator_name (keysym, mask);
|
name = gtk_accelerator_name_with_keycode (NULL, keysym, keycode, mask);
|
||||||
|
|
||||||
if (keysym == 0)
|
|
||||||
{
|
|
||||||
gchar *tmp;
|
|
||||||
|
|
||||||
tmp = name;
|
|
||||||
name = g_strdup_printf ("%s0x%02x", tmp, keycode);
|
|
||||||
g_free (tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user