]> Pileus Git - ~andy/gtk/commitdiff
Fix use_alpha initialization and propagation
authorMatthias Clasen <mclasen@redhat.com>
Thu, 9 Feb 2012 01:21:10 +0000 (20:21 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Feb 2012 21:36:59 +0000 (16:36 -0500)
We must set use_alpha to TRUE initially, and when passing it
down to the swatches, we must iterate over the custom box, too.

gtk/gtkcolorchooserwidget.c

index 10d29c27c33318b12d4af92997326613182a3c8f..dc48c18ee22de50188521896ca582c5e516ff4c4 100644 (file)
@@ -224,7 +224,7 @@ gtk_color_chooser_widget_set_use_alpha (GtkColorChooserWidget *cc,
     {
       grid = p->data;
 
-      if (!GTK_IS_GRID (grid))
+      if (!GTK_IS_CONTAINER (grid))
         continue;
 
       children = gtk_container_get_children (GTK_CONTAINER (grid));
@@ -399,6 +399,8 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
 
   cc->priv = G_TYPE_INSTANCE_GET_PRIVATE (cc, GTK_TYPE_COLOR_CHOOSER_WIDGET, GtkColorChooserWidgetPrivate);
 
+  cc->priv->use_alpha = TRUE;
+
   gtk_orientable_set_orientation (GTK_ORIENTABLE (cc), GTK_ORIENTATION_VERTICAL);
   cc->priv->palette = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_container_add (GTK_CONTAINER (cc), cc->priv->palette);