]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcolorbutton.c
Completely removed requisition cache from GtkWidget instance structure.
[~andy/gtk] / gtk / gtkcolorbutton.c
index a164caf508da13ebac758ab0e9b5cd5c2803ac80..0fc7bee88fd420332cb5b108e9d5215302be4438 100644 (file)
@@ -157,7 +157,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
   g_object_class_install_property (gobject_class,
                                    PROP_USE_ALPHA,
                                    g_param_spec_boolean ("use-alpha", P_("Use alpha"), 
-                                                         P_("Whether or not to give the color an alpha value"),
+                                                         P_("Whether to give the color an alpha value"),
                                                          FALSE,
                                                          GTK_PARAM_READWRITE));
 
@@ -309,12 +309,14 @@ expose_event (GtkWidget      *widget,
 
   if (!gtk_widget_is_sensitive (GTK_WIDGET (color_button)))
     {
-      gdk_cairo_set_source_color (cr, &GTK_WIDGET(color_button)->style->bg[GTK_STATE_INSENSITIVE]);
+      gdk_cairo_set_source_color (cr, &gtk_widget_get_style (GTK_WIDGET(color_button))->bg[GTK_STATE_INSENSITIVE]);
       checkered = gtk_color_button_get_checkered ();
       cairo_mask (cr, checkered);
       cairo_pattern_destroy (checkered);
     }
 
+  cairo_destroy (cr);
+
   return FALSE;
 }