diff options
author | Bastien Nocera <hadess@hadess.net> | 2011-11-10 10:58:37 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-11-10 14:33:28 +0000 |
commit | d69c7f4776506efd0c66dccf7e16bb9461f040c0 (patch) | |
tree | 7370724b2b7daee49f07dcfeed9ee7902ba12d34 /gtk/gtkcellrendereraccel.c | |
parent | fb97c28bcad7b7d78149f8b02fe4d36944d2ec41 (diff) | |
download | gtk+-d69c7f4776506efd0c66dccf7e16bb9461f040c0.tar.gz |
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
Diffstat (limited to 'gtk/gtkcellrendereraccel.c')
-rw-r--r-- | gtk/gtkcellrendereraccel.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c index 08c61d7c27..037aaa10c5 100644 --- a/gtk/gtkcellrendereraccel.c +++ b/gtk/gtkcellrendereraccel.c @@ -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; } |