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

Convert to using binding set for doing key bindings. (#62622, Requested by

Thu Feb  7 19:00:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
        to using  binding set for doing key bindings. (#62622,
        Requested by Skip Montaro)

        * gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
        bindings as overrides along with control-tab bindings.

        * gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
        type for ::focus_tab signal.
parent 67046197
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
Thu Feb 7 19:39:27 2002 Kristian Rietveld <kris@gtk.org>
Fixes #70782 and some drag dest rectangle/line issues
......
......@@ -449,7 +449,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
G_STRUCT_OFFSET (GtkNotebookClass, focus_tab),
NULL, NULL,
_gtk_marshal_BOOLEAN__ENUM,
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN, 1,
GTK_TYPE_NOTEBOOK_TAB);
notebook_signals[SELECT_PAGE] =
g_signal_new ("select_page",
......
This diff is collapsed.
......@@ -313,6 +313,28 @@ add_tab_bindings (GtkBindingSet *binding_set,
GTK_TYPE_DIRECTION_TYPE, direction);
}
static void
add_arrow_bindings (GtkBindingSet *binding_set,
guint keysym,
GtkDirectionType direction)
{
guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
gtk_binding_entry_add_signal (binding_set, keysym, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
gtk_binding_entry_add_signal (binding_set, keypad_keysym, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
gtk_binding_entry_add_signal (binding_set, keypad_keysym, GDK_CONTROL_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
}
static void
gtk_window_class_init (GtkWindowClass *klass)
{
......@@ -543,33 +565,10 @@ gtk_window_class_init (GtkWindowClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate_default", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_UP);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_LEFT);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_LEFT);
gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_RIGHT);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_RIGHT);
add_arrow_bindings (binding_set, GDK_Up, GTK_DIR_UP);
add_arrow_bindings (binding_set, GDK_Down, GTK_DIR_DOWN);
add_arrow_bindings (binding_set, GDK_Left, GTK_DIR_LEFT);
add_arrow_bindings (binding_set, GDK_Right, GTK_DIR_RIGHT);
add_tab_bindings (binding_set, 0, GTK_DIR_TAB_FORWARD);
add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
......
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