From 86ce9fdf04001f732ffcba99124a0cb95c1a9788 Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Sat, 23 Feb 2002 07:56:41 +0000 Subject: [PATCH] lower case the key_val. (gtk_accel_group_connect_by_path) : ditto. 2002-02-23 Jody Goldberg * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the key_val. (gtk_accel_group_connect_by_path) : ditto. (gtk_accel_group_disconnect_key) : ditto. * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. (gtk_widget_real_key_press_event) : ditto. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtkaccelgroup.c | 7 +++++-- gtk/gtkwidget.c | 14 ++------------ 9 files changed, 77 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5d14affe5a..192ba6bd48 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2002-02-23 Jody Goldberg + + * gtk/gtkaccelgroup.c (gtk_accel_group_connect) : lower case the + key_val. + (gtk_accel_group_connect_by_path) : ditto. + (gtk_accel_group_disconnect_key) : ditto. + + * gtk/gtkwidget.c (gtk_widget_real_key_release_event) : simplify. + (gtk_widget_real_key_press_event) : ditto. + Sat Feb 23 00:28:47 2002 Jonathan Blandford * gtk/gtktreeviecolumn.c: Documented undocumented functions. diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 1ceb537e3d..39db5d6330 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -513,7 +513,9 @@ gtk_accel_group_connect (GtkAccelGroup *accel_group, g_object_ref (accel_group); if (!closure->is_invalid) - quick_accel_add (accel_group, accel_key, accel_mods, accel_flags, closure, 0); + quick_accel_add (accel_group, + gdk_keyval_to_lower (accel_key), + accel_mods, accel_flags, closure, 0); g_object_unref (accel_group); } @@ -552,7 +554,7 @@ gtk_accel_group_connect_by_path (GtkAccelGroup *accel_group, if (gtk_accel_map_lookup_entry (accel_path, &key)) { - accel_key = key.accel_key; + accel_key = gdk_keyval_to_lower (key.accel_key), accel_mods = key.accel_mods; } @@ -615,6 +617,7 @@ gtk_accel_group_disconnect_key (GtkAccelGroup *accel_group, g_object_ref (accel_group); + accel_key = gdk_keyval_to_lower (accel_key); entries = quick_accel_find (accel_group, accel_key, accel_mods, &n); while (n--) { diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 45e28c0ce6..b2f89b8228 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -2868,24 +2868,14 @@ static gboolean gtk_widget_real_key_press_event (GtkWidget *widget, GdkEventKey *event) { - gboolean handled = FALSE; - - if (!handled) - handled = _gtk_bindings_activate_event (GTK_OBJECT (widget), event); - - return handled; + return _gtk_bindings_activate_event (GTK_OBJECT (widget), event); } static gboolean gtk_widget_real_key_release_event (GtkWidget *widget, GdkEventKey *event) { - gboolean handled = FALSE; - - if (!handled) - handled = _gtk_bindings_activate_event (GTK_OBJECT (widget), event); - - return handled; + return _gtk_bindings_activate_event (GTK_OBJECT (widget), event); } static gboolean