Commit ae730afd authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent de7cc34d
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
they are used by glade, pointed out by Damon Chaplin.
......
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
they are used by glade, pointed out by Damon Chaplin.
......
......@@ -124,7 +124,7 @@ enum {
#define PAGE_TOP_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y)
#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 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
{
......@@ -4303,7 +4303,8 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data;
if (page->pack == flag &&
(!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;
old_list = list;
list = list->next;
......@@ -4320,7 +4321,8 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data;
if (page->pack != flag &&
(!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;
old_list = list;
list = list->prev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment