Add <Control>Tab bindings for "move-focus" so that Control-Tab to escape

Tue Jan 29 14:24:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
        bindings for "move-focus" so that Control-Tab to escape from
        something that eats Tab just works if not otherwise overriden.

        * gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
        * gtk/gtkvscale.c (gtk_vscale_new_with_range)
        * gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
        of zero for the adjustment, since at times we think that the range
        is lower to upper - page_size. A page size equally to the
        step_increment is, in any case, not meaningful.
This commit is contained in:
Owen Taylor 2002-01-29 19:44:49 +00:00 committed by Owen Taylor
parent cac17ab7b4
commit 854372b9be
11 changed files with 114 additions and 22 deletions

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -1,3 +1,16 @@
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-29 Tor Lillqvist <tml@iki.fi>
* README.win32: Add comment about gtk-1-3-win32-production branch

View File

@ -129,7 +129,7 @@ gtk_hscale_new_with_range (gdouble min,
g_return_val_if_fail (min < max, NULL);
g_return_val_if_fail (step != 0.0, NULL);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, step);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
scale = g_object_new (GTK_TYPE_HSCALE,
"adjustment", adj,

View File

@ -1607,7 +1607,7 @@ gtk_spin_button_new_with_range (gdouble min,
spin = gtk_type_new (GTK_TYPE_SPIN_BUTTON);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, step);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
if (fabs (step) >= 1.0 || step == 0.0)
digits = 0;

View File

@ -131,7 +131,7 @@ gtk_vscale_new_with_range (gdouble min,
g_return_val_if_fail (min < max, NULL);
g_return_val_if_fail (step != 0.0, NULL);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, step);
adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
scale = g_object_new (GTK_TYPE_VSCALE,
"adjustment", adj,

View File

@ -297,6 +297,22 @@ gtk_window_get_type (void)
return window_type;
}
static void
add_tab_bindings (GtkBindingSet *binding_set,
GdkModifierType modifiers,
GtkDirectionType direction)
{
gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, modifiers,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
}
static void
gtk_window_class_init (GtkWindowClass *klass)
{
@ -555,25 +571,10 @@ gtk_window_class_init (GtkWindowClass *klass)
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_RIGHT);
gtk_binding_entry_add_signal (binding_set, GDK_Tab, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, 0,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set, GDK_Tab, GDK_SHIFT_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, GDK_SHIFT_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, GDK_SHIFT_MASK,
"move_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
add_tab_bindings (binding_set, 0, GTK_DIR_TAB_FORWARD);
add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
add_tab_bindings (binding_set, GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
}
static void