Handle tab_label being NULL better. (#341455, William Jon McCann, patch by

2006-05-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c: Handle tab_label being NULL better.
	(#341455, William Jon McCann, patch by Carlos Garnacho Parro)
This commit is contained in:
Matthias Clasen 2006-05-13 02:56:04 +00:00 committed by Matthias Clasen
parent de7cc34dde
commit ae730afdbb
3 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2006-05-12 Matthias Clasen <mclasen@redhat.com> 2006-05-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c: Handle tab_label being NULL better.
(#341455, William Jon McCann, patch by Carlos Garnacho Parro)
* gtk/gtkruler.c: Reinstate the ruler metrics strings, since * gtk/gtkruler.c: Reinstate the ruler metrics strings, since
they are used by glade, pointed out by Damon Chaplin. they are used by glade, pointed out by Damon Chaplin.

View File

@ -1,5 +1,8 @@
2006-05-12 Matthias Clasen <mclasen@redhat.com> 2006-05-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c: Handle tab_label being NULL better.
(#341455, William Jon McCann, patch by Carlos Garnacho Parro)
* gtk/gtkruler.c: Reinstate the ruler metrics strings, since * gtk/gtkruler.c: Reinstate the ruler metrics strings, since
they are used by glade, pointed out by Damon Chaplin. they are used by glade, pointed out by Damon Chaplin.

View File

@ -124,7 +124,7 @@ enum {
#define PAGE_TOP_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y) #define PAGE_TOP_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y)
#define PAGE_BOTTOM_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height) #define PAGE_BOTTOM_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height)
#define PAGE_MIDDLE_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height / 2) #define PAGE_MIDDLE_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height / 2)
#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) ((_page_)->tab_label != NULL && ((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_))) #define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) (((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_)))
struct _GtkNotebookPage struct _GtkNotebookPage
{ {
@ -4303,7 +4303,8 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data; page = list->data;
if (page->pack == flag && if (page->pack == flag &&
(!find_visible || (!find_visible ||
(NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) && GTK_WIDGET_VISIBLE (page->child)))) (GTK_WIDGET_VISIBLE (page->child) &&
(!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
return list; return list;
old_list = list; old_list = list;
list = list->next; list = list->next;
@ -4320,7 +4321,8 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data; page = list->data;
if (page->pack != flag && if (page->pack != flag &&
(!find_visible || (!find_visible ||
(NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) && GTK_WIDGET_VISIBLE (page->child)))) (GTK_WIDGET_VISIBLE (page->child) &&
(!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
return list; return list;
old_list = list; old_list = list;
list = list->prev; list = list->prev;