gtk_notebook_map bug




gtk_notebook_map () doesn't check if the tab label is visible before
mapping it (GTK+ 1.2.6):

	  if (page->tab_label && 
	      GTK_WIDGET_VISIBLE (page->child) && 
	      !GTK_WIDGET_MAPPED (page->tab_label))
	    gtk_widget_map (page->tab_label);

This results in warnings when a notebook is used with tabs hidden:

   Gtk-CRITICAL **: file gtkwidget.c: line 1584 (gtk_widget_map):
           assertion `GTK_WIDGET_VISIBLE (widget) == TRUE' failed.


Maybe this would be better (though I'm not sure how GtkNotebook fits
together):

	  if (page->tab_label && 
	      GTK_WIDGET_VISIBLE (page->child) && 
              GTK_WIDGET_VISIBLE (page->tab_label) &&
	      !GTK_WIDGET_MAPPED (page->tab_label))
	    gtk_widget_map (page->tab_label);


(I think there are other similar bugs in GtkNotebook which result in
pages not appearing. I am looking into that now.)


Damon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]