Bug in gtk_widget_set_style_recurse




With gtk+970925, after you call gtk_main(), gtk_widget_set_name() calls
will no longer take effect because gtk_widget_set_style_recurse() has
called gtk_widget_set_style for you, which disables using styles out of
the rc files.

The fix is to call gtk_widget_set_style_internal() so that it doesn't
lock you out of your gtkrc file unless you want to be locked out.

I don't know if this happens in every instance, but it happens for me
with buttons in a table in a viewport.  I didn't investigate much further
except to make sure that my fix didn't break anything obvious.

michaelkjohnson

"Magazines all too frequently lead to books and should be regarded by the
 prudent as the heavy petting of literature."            -- Fran Lebowitz


--- gtk+970925/gtk/gtkwidget.c.style	Thu Sep 25 03:11:40 1997
+++ gtk+970925/gtk/gtkwidget.c	Fri Oct  3 19:50:32 1997
@@ -3119,7 +3119,7 @@
 
   style = gtk_rc_get_style (widget);
   if (style != widget->style)
-    gtk_widget_set_style (widget, style);
+    gtk_widget_set_style_internal (widget, style);
 
   if (GTK_IS_CONTAINER (widget))
     gtk_container_foreach (GTK_CONTAINER (widget),




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