From 708e1a95749ad61cb0167f729a77e951a30388cf Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 21 Feb 2002 17:14:10 +0000 Subject: Implement "fuzzy" key binding lookups; allow matches on key and level but Wed Feb 20 14:26:47 2002 Owen Taylor * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups; allow matches on key and level but not group. Also, implement ignoring "consumed modifiers correctly." * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using GtkKeyHash. * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in the group for key release events as well as key press events. * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Rename unused_modifiers to consumed_modifiers, make the docs and non-Xkb implementation match the Xkb implementation. * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate doc and parameter name changes. * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): XkbTranslateKeyCode doesn't handle LockMask, we need to handle it ourselves. * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force Tab to give GDK_ISO_Left_Tab, since we need consistency to allow dealing with ISO_Left_Tab. * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c gtk/gtkpaned.c gtk/gtkcombo.c gtk/gtknotebook.c: Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab or Tab both are equivalent as a binding specifier.) * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate GTK_RUN_ACTION, so you can bind an accelerator to it. * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call gdk_unicode_to_keyval on the mnemonic character. * tests/testgtk.c: Add a test for the new fuzzy key binding matching. --- gtk/gtkwindow.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gtk/gtkwindow.h') diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index 2ebfaea759..d6c97376dc 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -125,7 +125,8 @@ struct _GtkWindowClass void (* activate_focus) (GtkWindow *window); void (* activate_default) (GtkWindow *window); void (* move_focus) (GtkWindow *window, - GtkDirectionType direction); + GtkDirectionType direction); + void (*keys_changed) (GtkWindow *window); }; -- cgit v1.2.1