+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
+Thu Mar 7 10:31:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_timer): Fix problem where
+ there were two copies of the "do an arrow step" code,
+ one correct for rotated notebooks, one not. (#73855,
+ Thomas Leonard.)
+
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
return 0;
}
+static void
+gtk_notebook_do_arrow (GtkNotebook *notebook,
+ GtkArrowType arrow)
+{
+ GtkWidget *widget = GTK_WIDGET (notebook);
+ GtkDirectionType dir;
+
+ if (!notebook->focus_tab ||
+ gtk_notebook_search_page (notebook, notebook->focus_tab,
+ arrow == GTK_ARROW_LEFT ? STEP_PREV : STEP_NEXT,
+ TRUE))
+ {
+ if (notebook->tab_pos == GTK_POS_LEFT ||
+ notebook->tab_pos == GTK_POS_RIGHT)
+ dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_UP : GTK_DIR_DOWN;
+ else
+ dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_LEFT : GTK_DIR_RIGHT;
+ gtk_widget_child_focus (widget, dir);
+ }
+}
+
static gboolean
gtk_notebook_arrow_button_press (GtkNotebook *notebook,
GtkArrowType arrow,
if (event->button == 1)
{
- GtkDirectionType dir;
- if (!notebook->focus_tab ||
- gtk_notebook_search_page (notebook, notebook->focus_tab,
- arrow == GTK_ARROW_LEFT ? STEP_PREV : STEP_NEXT,
- TRUE))
- {
- if (notebook->tab_pos == GTK_POS_LEFT ||
- notebook->tab_pos == GTK_POS_RIGHT)
- dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_UP : GTK_DIR_DOWN;
- else
- dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_LEFT : GTK_DIR_RIGHT;
- gtk_widget_child_focus (widget, dir);
- }
+ gtk_notebook_do_arrow (notebook, arrow);
if (!notebook->timer)
{
gboolean retval = FALSE;
GDK_THREADS_ENTER ();
-
+
if (notebook->timer)
{
- if (notebook->click_child == GTK_ARROW_LEFT)
- {
- if (!notebook->focus_tab ||
- gtk_notebook_search_page (notebook, notebook->focus_tab,
- STEP_PREV, TRUE))
- gtk_widget_child_focus (GTK_WIDGET (notebook), GTK_DIR_LEFT);
- }
- else if (notebook->click_child == GTK_ARROW_RIGHT)
- {
- if (!notebook->focus_tab ||
- gtk_notebook_search_page (notebook, notebook->focus_tab,
- STEP_NEXT, TRUE))
- gtk_widget_child_focus (GTK_WIDGET (notebook), GTK_DIR_RIGHT);
- }
+ gtk_notebook_do_arrow (notebook, notebook->click_child);
+
if (notebook->need_timer)
{
notebook->need_timer = FALSE;