]> Pileus Git - ~andy/gtk/commitdiff
Avoid a 10th custom color
authorMatthias Clasen <mclasen@redhat.com>
Thu, 9 Feb 2012 03:12:31 +0000 (22:12 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Feb 2012 21:37:00 +0000 (16:37 -0500)
gtk/gtkcolorchooserwidget.c

index 7ca4f9f531fbbaa588265771284d21008b2c2636..d91e1495eea91eb4f42c09f654941ed017f5d57c 100644 (file)
@@ -133,7 +133,7 @@ swatch_customize (GtkColorSwatch        *swatch,
 
   gtk_widget_hide (cc->priv->palette);
   gtk_widget_show (cc->priv->editor);
-  g_object_notify (cc, "show-editor");
+  g_object_notify (G_OBJECT (cc), "show-editor");
 }
 
 static void
@@ -164,7 +164,7 @@ button_activate (GtkColorSwatch        *swatch,
 
   gtk_widget_hide (cc->priv->palette);
   gtk_widget_show (cc->priv->editor);
-  g_object_notify (cc, "show-editor");
+  g_object_notify (G_OBJECT (cc), "show-editor");
 }
 
 static void
@@ -599,7 +599,7 @@ add_custom_color (GtkColorChooserWidget *cc,
   GList *children;
 
   children = gtk_container_get_children (GTK_CONTAINER (cc->priv->custom));
-  if (g_list_length (children) == 8)
+  if (g_list_length (children) >= 8)
     {
       last = g_list_last (children)->data;
       gtk_widget_destroy (last);