Fix use_alpha initialization and propagation

We must set use_alpha to TRUE initially, and when passing it
down to the swatches, we must iterate over the custom box, too.
This commit is contained in:
Matthias Clasen 2012-02-08 20:21:10 -05:00
parent 3a7ed2e7bd
commit 7f44feab19

View 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);