Commit e5e5a521 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Add GDK_ISO_Next_Group/Prev_Group/Level3_Shift/ First_Group/Last_Group to

Thu Feb 21 16:51:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
        GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
        First_Group/Last_Group to list of invalid accelerators.
        (A lot more that should be added, but probably would
        want a range mechanism. These are the ones found in
        the standard XFree86 config files.)

        * gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
        that broke bindings for menus.

        * gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
        privately.

        * gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
        _gtk_window_activate_key(), gtk_bindings_activate_event().
parent 196c1f5a
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Thu Feb 21 12:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkctree.c (gtk_ctree_class_init): Remove some workarounds
......
......@@ -805,6 +805,8 @@ gtk_accelerator_valid (guint keyval,
GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock,
GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R,
GDK_Alt_L, GDK_Alt_R, GDK_Super_L, GDK_Super_R, GDK_Hyper_L, GDK_Hyper_R,
GDK_ISO_Level3_Shift, GDK_ISO_Next_Group, GDK_ISO_Prev_Group,
GDK_ISO_First_Group, GDK_ISO_Last_Group,
GDK_Mode_switch, GDK_Num_Lock, GDK_Multi_key,
GDK_Scroll_Lock, GDK_Sys_Req,
GDK_Up, GDK_Down, GDK_Left, GDK_Right, GDK_Tab, GDK_ISO_Left_Tab,
......
......@@ -1075,7 +1075,7 @@ gtk_bindings_activate (GtkObject *object,
if (!GTK_IS_WIDGET (object))
return FALSE;
is_release = (BINDING_MOD_MASK () & GDK_RELEASE_MASK) != 0;
is_release = (modifiers & GDK_RELEASE_MASK) != 0;
modifiers = modifiers & BINDING_MOD_MASK () & ~GDK_RELEASE_MASK;
key_hash = binding_key_hash_for_keymap (gdk_keymap_get_default ());
......
......@@ -551,21 +551,14 @@ gtk_menu_shell_key_press (GtkWidget *widget,
if (!menu_shell->active_menu_item && menu_shell->parent_menu_shell)
return gtk_widget_event (menu_shell->parent_menu_shell, (GdkEvent *)event);
if (gtk_bindings_activate (GTK_OBJECT (widget),
event->keyval,
event->state))
if (_gtk_bindings_activate_event (GTK_OBJECT (widget), event))
return TRUE;
toplevel = gtk_widget_get_toplevel (widget);
if (GTK_IS_WINDOW (toplevel) &&
gtk_window_mnemonic_activate (GTK_WINDOW (toplevel),
event->keyval,
event->state))
_gtk_window_activate_key (GTK_WINDOW (toplevel), event))
return TRUE;
if (gtk_accel_groups_activate (G_OBJECT (widget), event->keyval, event->state))
return TRUE;
return FALSE;
}
......
......@@ -226,8 +226,6 @@ static void gtk_window_realize_icon (GtkWindow *window);
static void gtk_window_unrealize_icon (GtkWindow *window);
static void gtk_window_notify_keys_changed (GtkWindow *window);
static gboolean gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event);
static GtkKeyHash *gtk_window_get_key_hash (GtkWindow *window);
static void gtk_window_free_key_hash (GtkWindow *window);
......@@ -3534,7 +3532,7 @@ gtk_window_key_press_event (GtkWidget *widget,
/* Check for mnemonics and accelerators
*/
if (!handled)
handled = gtk_window_activate_key (window, event);
handled = _gtk_window_activate_key (window, event);
if (!handled)
{
......@@ -5812,9 +5810,18 @@ gtk_window_free_key_hash (GtkWindow *window)
}
}
static gboolean
gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event)
/**
* _gtk_window_activate_key:
* @window: a #GtkWindow
* @event: a #GdkEventKey
*
* Activates mnemonics and accelerators for this #GtKWindow
*
* Return value: %TRUE if a mnemonic or accelerator was found and activated.
**/
gboolean
_gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event)
{
GtkKeyHash *key_hash = g_object_get_data (G_OBJECT (window), "gtk-window-key-hash");
GtkWindowKeyEntry *found_entry = NULL;
......
......@@ -325,6 +325,8 @@ void _gtk_window_constrain_size (GtkWindow *window,
gint *new_width,
gint *new_height);
GtkWindowGroup *_gtk_window_get_group (GtkWindow *window);
gboolean _gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event);
/* --- internal (GtkAcceleratable) --- */
gboolean _gtk_window_query_nonaccels (GtkWindow *window,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment