Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
(gtk_notebook_key_press): call select page function for
GDK_DOWN key in case of tab_pos == TOP. Changed other
positions accordingly.
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
+Thu Jan 21 02:47:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_focus): few cleanups.
+ (gtk_notebook_key_press): call select page function for
+ GDK_DOWN key in case of tab_pos == TOP. Changed other
+ positions accordingly.
+
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
Wed Jan 20 19:57:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_begin): Start off with the
switch (event->keyval)
{
case GDK_Up:
switch (event->keyval)
{
case GDK_Up:
- direction = GTK_DIR_UP;
+ switch (notebook->tab_pos)
+ {
+ case GTK_POS_BOTTOM:
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
+ return TRUE;
+ case GTK_POS_TOP:
+ return FALSE;
+ default:
+ direction = GTK_DIR_UP;
+ break;
+ }
- direction = GTK_DIR_LEFT;
+ switch (notebook->tab_pos)
+ {
+ case GTK_POS_RIGHT:
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
+ return TRUE;
+ case GTK_POS_LEFT:
+ return FALSE;
+ default:
+ direction = GTK_DIR_LEFT;
+ break;
+ }
- direction = GTK_DIR_DOWN;
+ switch (notebook->tab_pos)
+ {
+ case GTK_POS_TOP:
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
+ return TRUE;
+ case GTK_POS_BOTTOM:
+ return FALSE;
+ default:
+ direction = GTK_DIR_DOWN;
+ break;
+ }
- direction = GTK_DIR_RIGHT;
+ switch (notebook->tab_pos)
+ {
+ case GTK_POS_LEFT:
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
+ return TRUE;
+ case GTK_POS_RIGHT:
+ return FALSE;
+ default:
+ direction = GTK_DIR_RIGHT;
+ break;
+ }
break;
case GDK_Tab:
case GDK_ISO_Left_Tab:
break;
case GDK_Tab:
case GDK_ISO_Left_Tab:
GtkDirectionType direction)
{
GtkNotebook *notebook;
GtkDirectionType direction)
{
GtkNotebook *notebook;
- GtkWidget *focus_child;
GtkNotebookPage *page = NULL;
GtkNotebookPage *old_page = NULL;
GtkNotebookPage *page = NULL;
GtkNotebookPage *old_page = NULL;
notebook = GTK_NOTEBOOK (container);
notebook = GTK_NOTEBOOK (container);
- if (!GTK_WIDGET_DRAWABLE (notebook) || !GTK_WIDGET_IS_SENSITIVE (container) ||
- !notebook->children || !notebook->cur_page)
+ if (!GTK_WIDGET_DRAWABLE (notebook) ||
+ !GTK_WIDGET_IS_SENSITIVE (container) ||
+ !notebook->children ||
+ !notebook->cur_page)
- focus_child = container->focus_child;
- gtk_container_set_focus_child (container, NULL);
-
if (!notebook->show_tabs)
{
if (GTK_WIDGET_DRAWABLE (notebook->cur_page->child) &&
if (!notebook->show_tabs)
{
if (GTK_WIDGET_DRAWABLE (notebook->cur_page->child) &&
}
else if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
{
}
else if (GTK_WIDGET_CAN_FOCUS (notebook->cur_page->child))
{
+ if (!container->focus_child)
{
gtk_widget_grab_focus (notebook->cur_page->child);
return TRUE;
{
gtk_widget_grab_focus (notebook->cur_page->child);
return TRUE;
if (notebook->focus_tab)
old_page = notebook->focus_tab->data;
if (notebook->focus_tab)
old_page = notebook->focus_tab->data;
- if (focus_child && old_page && focus_child == old_page->child &&
- notebook->child_has_focus)
+ if (container->focus_child && old_page &&
+ container->focus_child == old_page->child && notebook->child_has_focus)
- if (GTK_WIDGET_DRAWABLE (old_page->child))
+ if (GTK_WIDGET_DRAWABLE (container->focus_child))
- if (GTK_IS_CONTAINER (old_page->child) &&
- !GTK_WIDGET_HAS_FOCUS (old_page->child))
+ if (GTK_IS_CONTAINER (container->focus_child) &&
+ !GTK_WIDGET_HAS_FOCUS (container->focus_child))
- if (gtk_container_focus (GTK_CONTAINER (old_page->child),
+ if (gtk_container_focus (GTK_CONTAINER (container->focus_child),
direction))
return TRUE;
}
gtk_widget_grab_focus (GTK_WIDGET(notebook));
return TRUE;
}
direction))
return TRUE;
}
gtk_widget_grab_focus (GTK_WIDGET(notebook));
return TRUE;
}
+ notebook->focus_tab = NULL;
+ if (!GTK_WIDGET_HAS_FOCUS (container))
+ notebook->focus_tab = NULL;
+
switch (direction)
{
case GTK_DIR_TAB_FORWARD:
switch (direction)
{
case GTK_DIR_TAB_FORWARD: