gtk_widget_set_state bug



Hello,

I've noticed that if you call
gtk_widget_set_state( widget, GTK_STATE_INSENSITIVE)
and later
gtk_widget_set_state( widget, GTK_STATE_NORMAL)
than the widget is no made sensitive.

Here a patch that will probably fix this:

--- gtkwidget.c Wed Oct 28 02:59:03 1998
+++  gtkwidget.c    Sat Nov  7 21:41:01 1998
@@ -2490,6 +2490,8 @@

   if (state == GTK_STATE_INSENSITIVE)
     gtk_widget_set_sensitive (widget, FALSE);
+  else if ( !GTK_WIDGET_SENSITIVE(widget) )
+      gtk_widget_set_sensitive (widget, TRUE);
   else
     {
       GtkStateData data;

david



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