* Add the new custom color as the first custom color in the custom color rows
* and shift all of the others 'one step down'
*
- * Also take care of setting up the GnomeColorPicker 'display'
+ * Also take care of setting up the GtkColorButton 'display'
*/
static void
color_palette_change_custom_color (ColorPalette *P, GdkColor const * const new)
"fill_color_gdk", new,
"outline_color_gdk", new,
NULL);
- gnome_color_picker_set_i16 (P->picker,
- new->red,
- new->green,
- new->blue,
- 0);
+ gtk_color_button_set_color (P->picker, new);
}
/*
* And add it to the custom color row
*/
static void
-cust_color_set (GtkWidget *color_picker, guint r, guint g, guint b, guint a,
- ColorPalette *P)
+cust_color_set (GtkWidget *color_picker, ColorPalette *P)
{
GdkColor c_color;
- c_color.red = (gushort)r;
- c_color.green = (gushort)g;
- c_color.blue = (gushort)b;
+ gtk_color_button_get_color (GTK_COLOR_BUTTON (color_picker), &c_color);
e_color_alloc_gdk (NULL, &c_color);
emit_color_changed (P, &c_color, TRUE, TRUE, FALSE);
P->total = total;
- /* "Custom" color - we'll pop up a GnomeColorPicker */
+ /* "Custom" color - we'll pop up a GtkColorButton */
cust_label = gtk_label_new (_("Custom Color:"));
gtk_table_attach (GTK_TABLE (table), cust_label, 0, ncols - 3 ,
row + 1, row + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
/*
- Keep a poier to the picker so that we can update it's color
+ Keep a pointer to the picker so that we can update it's color
to keep it in synch with that of other members of the group
*/
- P->picker = GNOME_COLOR_PICKER (gnome_color_picker_new ());
- gnome_color_picker_set_title (P->picker, _("Choose Custom Color"));
+ P->picker = GTK_COLOR_BUTTON (gtk_color_button_new ());
+ gtk_color_button_set_title (P->picker, _("Choose Custom Color"));
gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (P->picker), ncols - 3, ncols,
row + 1, row + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
- g_signal_connect (P->picker, "color_set",
+ g_signal_connect (P->picker, "color-set",
G_CALLBACK (cust_color_set), P);
return table;
}