[gtk+] gtk: Fix GtkCellRenderer ignoring keycodes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: Fix GtkCellRenderer ignoring keycodes
- Date: Thu, 10 Nov 2011 14:33:49 +0000 (UTC)
commit d69c7f4776506efd0c66dccf7e16bb9461f040c0
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 10 10:58:37 2011 +0000
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
gtk/gtkcellrendereraccel.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index 08c61d7..037aaa1 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]