reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER

This commit is contained in:
Lars Hamann 1998-06-02 19:32:33 +00:00
parent 047e9fcf1a
commit 7c8ae8a5f5
9 changed files with 61 additions and 19 deletions

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1,3 +1,9 @@
Tue Jun 2 20:04:45 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_page_select) (gtk_notebook_focus)
* gtk/gtkcontainer.c (gtk_container_focus_move):
reversed test sequence for GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto

View File

@ -1044,16 +1044,16 @@ gtk_container_focus_move (GtkContainer *container,
}
else if (GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_CAN_FOCUS (child))
{
gtk_widget_grab_focus (child);
return TRUE;
}
else if (GTK_IS_CONTAINER (child))
if (GTK_IS_CONTAINER (child))
{
if (gtk_container_focus (GTK_CONTAINER (child), direction))
return TRUE;
}
else if (GTK_WIDGET_CAN_FOCUS (child))
{
gtk_widget_grab_focus (child);
return TRUE;
}
}
}

View File

@ -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;