From 1e1fc9ff9e6c6f140097a5708e3ccb12a34f2d48 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 20 Aug 2008 08:17:35 +0000 Subject: [PATCH] Allow changing page with arrows even on non-focusable notebook. (#528091) 2008-08-05 Milan Crha * gtk/gtknotebook.c: (gtk_notebook_do_arrow): Allow changing page with arrows even on non-focusable notebook. (#528091) svn path=/trunk/; revision=21170 --- ChangeLog | 5 +++++ gtk/gtknotebook.c | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09c0746bae..2bea58f2aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Milan Crha + + * gtk/gtknotebook.c: (gtk_notebook_do_arrow): Allow changing page with + arrows even on non-focusable notebook. (#528091) + 2008-08-19 Federico Mena Quintero http://bugzilla.gnome.org/show_bug.cgi?id=543308 - The file diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 2773471d10..bcfdd19b69 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -2330,7 +2330,6 @@ gtk_notebook_do_arrow (GtkNotebook *notebook, GtkNotebookArrow arrow) { GtkWidget *widget = GTK_WIDGET (notebook); - GtkDirectionType dir; gboolean is_rtl, left; is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; @@ -2342,14 +2341,8 @@ gtk_notebook_do_arrow (GtkNotebook *notebook, left ? STEP_PREV : STEP_NEXT, TRUE)) { - if (notebook->tab_pos == GTK_POS_LEFT || - notebook->tab_pos == GTK_POS_RIGHT) - dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_UP : GTK_DIR_DOWN; - else - dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_LEFT : GTK_DIR_RIGHT; - + gtk_notebook_change_current_page (notebook, left ? -1 : 1); gtk_widget_grab_focus (widget); - gtk_widget_child_focus (widget, dir); } }