summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorLars Hamann <lars@src.gnome.org>1998-06-02 19:32:33 +0000
committerLars Hamann <lars@src.gnome.org>1998-06-02 19:32:33 +0000
commit7c8ae8a5f5bbbd1f140f2daa3285f173da00085e (patch)
treedad0e3f63aadc2d65933e28dfb83e6bc60431cae /gtk/gtknotebook.c
parent047e9fcf1a71e164ad204381f1df3d89d0a34a81 (diff)
downloadgtk+-7c8ae8a5f5bbbd1f140f2daa3285f173da00085e.tar.gz
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index b5c19f0cf5..d4704506d0 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2650,7 +2650,13 @@ gtk_notebook_focus (GtkContainer *container,
{
if (GTK_WIDGET_VISIBLE (notebook->cur_page->child))
{
- if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
+ if (GTK_IS_CONTAINER (notebook->cur_page->child))
+ {
+ if (gtk_container_focus
+ (GTK_CONTAINER (notebook->cur_page->child), direction))
+ return TRUE;
+ }
+ else if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
{
if (!focus_child)
{
@@ -2658,12 +2664,6 @@ gtk_notebook_focus (GtkContainer *container,
return TRUE;
}
}
- else if (GTK_IS_CONTAINER (notebook->cur_page->child))
- {
- if (gtk_container_focus
- (GTK_CONTAINER (notebook->cur_page->child), direction))
- return TRUE;
- }
}
return FALSE;
}
@@ -2759,17 +2759,17 @@ gtk_notebook_page_select (GtkNotebook *notebook)
if (GTK_WIDGET_VISIBLE (page->child))
{
- if (GTK_WIDGET_CAN_FOCUS (page->child))
- {
- gtk_widget_grab_focus (page->child);
- return TRUE;
- }
- else if (GTK_IS_CONTAINER (page->child))
+ if (GTK_IS_CONTAINER (page->child))
{
if (gtk_container_focus (GTK_CONTAINER (page->child),
GTK_DIR_TAB_FORWARD))
return TRUE;
}
+ else if (GTK_WIDGET_CAN_FOCUS (page->child))
+ {
+ gtk_widget_grab_focus (page->child);
+ return TRUE;
+ }
}
}
return FALSE;