Index: calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.221
diff -u -p -r1.221 calendar-component.c
--- calendar/gui/calendar-component.c	21 Sep 2006 05:41:00 -0000	1.221
+++ calendar/gui/calendar-component.c	15 Dec 2006 20:29:46 -0000
@@ -252,7 +252,7 @@ ensure_sources (CalendarComponent *compo
 		}
 
 		g_free (primary_calendar);
-		e_source_set_color (personal_source, 0xBECEDD);
+		e_source_set_color_spec (personal_source, "#BECEDD");
 	}
 
 	if (!on_the_web) {
Index: calendar/gui/calendar-config.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.c,v
retrieving revision 1.90
diff -u -p -r1.90 calendar-config.c
--- calendar/gui/calendar-config.c	3 Dec 2006 17:40:56 -0000	1.90
+++ calendar/gui/calendar-config.c	15 Dec 2006 20:29:47 -0000
@@ -1219,68 +1219,104 @@ on_timezone_dialog_delete_event	(GnomeDi
 
 /**
  * calendar_config_get_tasks_due_today_color:
+ * @color: the location to store the color
  *
  * Queries the color to be used to display tasks that are due today.
- *
- * Return value: An X color specification.
  **/
-const char *
-calendar_config_get_tasks_due_today_color (void)
+void
+calendar_config_get_tasks_due_today_color (GdkColor *color)
 {
-	static char *color = NULL;
+	const gchar *key = CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR;
+	GError *error = NULL;
+	gchar *color_spec;
+
+	g_return_if_fail (color != NULL);
 
-	if (color)
-		g_free (color);
+	color_spec = gconf_client_get_string (config, key, &error);
 
-	color = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR, NULL);
-	return color;
+	if (color_spec != NULL && !gdk_color_parse (color_spec, color))
+		g_warning ("Unknown color \"%s\"", color_spec);
+	else if (error != NULL) {
+		g_warning ("%s", error->message);
+		g_error_free (error);
+	}
+
+	g_free (color_spec);
 }
 
 /**
  * calendar_config_set_tasks_due_today_color:
- * @color: X color specification
+ * @color: a #GdkColor
  *
  * Sets the color to be used to display tasks that are due today.
  **/
 void
-calendar_config_set_tasks_due_today_color (const char *color)
+calendar_config_set_tasks_due_today_color (GdkColor *color)
 {
+	const gchar *key = CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR;
+	GError *error = NULL;
+	gchar color_spec[16];
+
 	g_return_if_fail (color != NULL);
 
-	gconf_client_set_string (config, CALENDAR_CONFIG_TASKS_DUE_TODAY_COLOR, color, NULL);
+	g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+		color->red, color->green, color->blue);
+
+	if (!gconf_client_set_string (config, key, color_spec, &error)) {
+		g_warning ("%s", error->message);
+		g_error_free (error);
+	}
 }
 
 /**
  * calendar_config_get_tasks_overdue_color:
+ * @color: the location to store the color
  *
  * Queries the color to be used to display overdue tasks.
- *
- * Return value: An X color specification.
  **/
-const char *
-calendar_config_get_tasks_overdue_color (void)
+void
+calendar_config_get_tasks_overdue_color (GdkColor *color)
 {
-	static char *color = NULL;
+	const gchar *key = CALENDAR_CONFIG_TASKS_OVERDUE_COLOR;
+	GError *error = NULL;
+	gchar *color_spec;
+
+	g_return_if_fail (color != NULL);
 
-	if (color)
-		g_free (color);
+	color_spec = gconf_client_get_string (config, key, &error);
 
-	color = gconf_client_get_string (config, CALENDAR_CONFIG_TASKS_OVERDUE_COLOR, NULL);
-	return color;
+	if (color_spec != NULL && !gdk_color_parse (color_spec, color))
+		g_warning ("Unknown color \"%s\"", color_spec);
+	else if (error != NULL) {
+		g_warning ("%s", error->message);
+		g_error_free (error);
+	}
+
+	g_free (color_spec);
 }
 
 /**
  * calendar_config_set_tasks_overdue_color:
- * @color: X color specification
+ * @color: a #GdkColor
  *
  * Sets the color to be used to display overdue tasks.
  **/
 void
-calendar_config_set_tasks_overdue_color (const char *color)
+calendar_config_set_tasks_overdue_color (GdkColor *color)
 {
+	const gchar *key = CALENDAR_CONFIG_TASKS_OVERDUE_COLOR;
+	GError *error = NULL;
+	gchar color_spec[16];
+
 	g_return_if_fail (color != NULL);
 
-	gconf_client_set_string (config, CALENDAR_CONFIG_TASKS_OVERDUE_COLOR, color, NULL);
+	g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+		color->red, color->green, color->blue);
+
+	if (!gconf_client_set_string (config, key, color_spec, &error)) {
+		g_warning ("%s", error->message);
+		g_error_free (error);
+	}
 }
 
 /**
Index: calendar/gui/calendar-config.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.h,v
retrieving revision 1.48
diff -u -p -r1.48 calendar-config.h
--- calendar/gui/calendar-config.h	17 Jul 2006 06:01:28 -0000	1.48
+++ calendar/gui/calendar-config.h	15 Dec 2006 20:29:47 -0000
@@ -31,6 +31,7 @@
 #define _CALENDAR_CONFIG_H_
 
 #include <glib.h>
+#include <gdk/gdk.h>
 #include <libecal/e-cal.h>
 #include <gconf/gconf-client.h>
 
@@ -201,11 +202,11 @@ void	  calendar_config_set_primary_memos
 guint	  calendar_config_add_notification_primary_memos (GConfClientNotifyFunc func, gpointer data);
 
 /* Colors for the task list */
-const char *calendar_config_get_tasks_due_today_color	(void);
-void	    calendar_config_set_tasks_due_today_color	(const char *color);
+void      calendar_config_get_tasks_due_today_color (GdkColor *color);
+void	  calendar_config_set_tasks_due_today_color (GdkColor *color);
 
-const char *calendar_config_get_tasks_overdue_color	(void);
-void	    calendar_config_set_tasks_overdue_color	(const char *color);
+void      calendar_config_get_tasks_overdue_color (GdkColor *color);
+void	  calendar_config_set_tasks_overdue_color (GdkColor *color);
 
 /* Settings to hide completed tasks. */
 gboolean  calendar_config_get_hide_completed_tasks	(void);
Index: calendar/gui/e-cal-model-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model-tasks.c,v
retrieving revision 1.39
diff -u -p -r1.39 e-cal-model-tasks.c
--- calendar/gui/e-cal-model-tasks.c	16 Oct 2006 18:13:48 -0000	1.39
+++ calendar/gui/e-cal-model-tasks.c	15 Dec 2006 20:29:50 -0000
@@ -1025,14 +1025,28 @@ ecmt_value_to_string (ETableModel *etm, 
 static const char *
 ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
 {
+	static gchar color_spec[16];
+	GdkColor color;
+
 	g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL);
 	g_return_val_if_fail (comp_data != NULL, NULL);
 
+	/* XXX ECalModel's get_color_for_component() method should really
+	 *     get a GdkColor instead of a color specification string. */
+
 	switch (get_due_status ((ECalModelTasks *) model, comp_data)) {
 	case E_CAL_MODEL_TASKS_DUE_TODAY:
-		return calendar_config_get_tasks_due_today_color ();
+		/* XXX ugly hack */
+		calendar_config_get_tasks_due_today_color (&color);
+		g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+			color.red, color.green, color.blue);
+		return color_spec;
 	case E_CAL_MODEL_TASKS_DUE_OVERDUE:
-		return calendar_config_get_tasks_overdue_color ();
+		/* XXX ugly hack */
+		calendar_config_get_tasks_overdue_color (&color);
+		g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+			color.red, color.green, color.blue);
+		return color_spec;
 	case E_CAL_MODEL_TASKS_DUE_NEVER:
 	case E_CAL_MODEL_TASKS_DUE_FUTURE:
 	case E_CAL_MODEL_TASKS_DUE_COMPLETE:
Index: calendar/gui/e-cal-model.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model.c,v
retrieving revision 1.79
diff -u -p -r1.79 e-cal-model.c
--- calendar/gui/e-cal-model.c	20 Nov 2006 14:16:34 -0000	1.79
+++ calendar/gui/e-cal-model.c	15 Dec 2006 20:29:52 -0000
@@ -947,7 +947,7 @@ static const char *
 ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
 {
 	ESource *source;
-	guint32 source_color;
+	const gchar *color_spec;
 	gint i, first_empty = 0;
 	static AssignedColorData assigned_colors[] = {
 		{ "#BECEDD", NULL }, /* 190 206 221     Blue */
@@ -965,9 +965,10 @@ ecm_get_color_for_component (ECalModel *
 	g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
 
 	source = e_cal_get_source (comp_data->client);
-	if (e_source_get_color (source, &source_color)) {
+	color_spec = e_source_peek_color_spec (source);
+	if (color_spec != NULL) {
 		g_free (comp_data->color);
-		comp_data->color = g_strdup_printf ("#%06x", source_color & 0xffffff);
+		comp_data->color = g_strdup (color_spec);
 		return comp_data->color;
 	}
                                                                    
Index: calendar/gui/memos-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/memos-component.c,v
retrieving revision 1.11
diff -u -p -r1.11 memos-component.c
--- calendar/gui/memos-component.c	16 Oct 2006 18:13:51 -0000	1.11
+++ calendar/gui/memos-component.c	15 Dec 2006 20:29:53 -0000
@@ -213,7 +213,7 @@ ensure_sources (MemosComponent *componen
 			calendar_config_set_memos_selected (&selected);
 		}
 
-		e_source_set_color (source, 0xBECEDD);
+		e_source_set_color_spec (source, "#BECEDD");
 		personal_source = source;
 	}
 
Index: calendar/gui/migration.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/migration.c,v
retrieving revision 1.44
diff -u -p -r1.44 migration.c
--- calendar/gui/migration.c	16 Oct 2006 18:13:51 -0000	1.44
+++ calendar/gui/migration.c	15 Dec 2006 20:29:56 -0000
@@ -406,7 +406,7 @@ create_calendar_contact_source (ESourceL
 	e_source_group_add_source (group, source, -1);
 	g_object_unref (source);
 
-	e_source_set_color (source, 0xFED4D3);
+	e_source_set_color_spec (source, "#FED4D3");
 	e_source_group_set_readonly (group, TRUE);
 
 	return group;
@@ -497,7 +497,7 @@ create_calendar_sources (CalendarCompone
 		}
 
 		g_free (primary_calendar);		
-		e_source_set_color (source, 0xBECEDD);
+		e_source_set_color_spec (source, "#BECEDD");
 		*personal_source = source;
 	}
 
@@ -590,7 +590,7 @@ create_task_sources (TasksComponent *com
 			calendar_config_set_tasks_selected (&selected);
 		}
 
-		e_source_set_color (source, 0xBECEDD);
+		e_source_set_color_spec (source, "#BECEDD");
 		*personal_source = source;
 	}
 
@@ -1098,7 +1098,7 @@ create_memo_sources (MemosComponent *com
 			calendar_config_set_memos_selected (&selected);
 		}
 
-		e_source_set_color (source, 0xBECEDD);
+		e_source_set_color_spec (source, "#BECEDD");
 		*personal_source = source;
 	}
 
@@ -1161,7 +1161,7 @@ add_gw_esource (ESourceList *source_list
 	e_source_set_property (source, "use_ssl", use_ssl);
 	e_source_set_property (source, "offline_sync", offline_sync ? "1" : "0" );
 
-	e_source_set_color (source, 0xEEBC60);
+	e_source_set_color_spec (source, "#EEBC60");
 	e_source_group_add_source (group, source, -1);
 
 	ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, NULL);
Index: calendar/gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.101
diff -u -p -r1.101 tasks-component.c
--- calendar/gui/tasks-component.c	4 Dec 2006 09:43:51 -0000	1.101
+++ calendar/gui/tasks-component.c	15 Dec 2006 20:29:56 -0000
@@ -209,7 +209,7 @@ ensure_sources (TasksComponent *componen
 			calendar_config_set_tasks_selected (&selected);
 		}
 
-		e_source_set_color (source, 0xBECEDD);
+		e_source_set_color_spec (source, "#BECEDD");
 		personal_source = source;
 	}
 
Index: calendar/gui/dialogs/cal-prefs-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.c,v
retrieving revision 1.58
diff -u -p -r1.58 cal-prefs-dialog.c
--- calendar/gui/dialogs/cal-prefs-dialog.c	7 Nov 2006 12:24:27 -0000	1.58
+++ calendar/gui/dialogs/cal-prefs-dialog.c	15 Dec 2006 20:29:57 -0000
@@ -31,7 +31,6 @@
 #include "../e-timezone-entry.h"
 #include "../calendar-config.h"
 #include "cal-prefs-dialog.h"
-#include <libgnomeui/gnome-color-picker.h>
 #include <widgets/misc/e-dateedit.h>
 #include <e-util/e-dialog-widgets.h>
 #include <e-util/e-util-private.h>
@@ -95,21 +94,6 @@ eccp_widget_glade (EConfig *ec, EConfigI
 	return glade_xml_get_widget (prefs->gui, item->label);
 }
 
-/* Returns a pointer to a static string with an X color spec for the current
- * value of a color picker.
- */
-static const char *
-spec_from_picker (GtkWidget *picker)
-{
-	static char spec[8];
-	guint8 r, g, b;
-
-	gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (picker), &r, &g, &b, NULL);
-	g_snprintf (spec, sizeof (spec), "#%02x%02x%02x", r, g, b);
-
-	return spec;
-}
-
 static void
 working_days_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
 {
@@ -276,15 +260,21 @@ hide_completed_tasks_units_changed (GtkW
 }
 
 static void
-tasks_due_today_set_color (GnomeColorPicker *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs)
+tasks_due_today_set_color (GtkColorButton *color_button, CalendarPrefsDialog *prefs)
 {
-	calendar_config_set_tasks_due_today_color (spec_from_picker (prefs->tasks_due_today_color));
+	GdkColor color;
+
+	gtk_color_button_get_color (color_button, &color);
+	calendar_config_set_tasks_due_today_color (&color);
 }
 
 static void
-tasks_overdue_set_color (GnomeColorPicker *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs)
+tasks_overdue_set_color (GtkColorButton *color_button, CalendarPrefsDialog *prefs)
 {
-	calendar_config_set_tasks_overdue_color (spec_from_picker (prefs->tasks_overdue_color));
+	GdkColor color;
+
+	gtk_color_button_get_color (color_button, &color);
+	calendar_config_set_tasks_overdue_color (&color);
 }
 
 static void
@@ -416,22 +406,6 @@ setup_changes (CalendarPrefsDialog *pref
 	g_signal_connect (G_OBJECT (prefs->template_url), "changed", G_CALLBACK (template_url_changed), prefs);
 }
 
-/* Sets the color in a color picker from an X color spec */
-static void
-set_color_picker (GtkWidget *picker, const char *spec)
-{
-	GdkColor color;
-
-	if (!spec || !gdk_color_parse (spec, &color))
-		color.red = color.green = color.blue = 0;
-
-	gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (picker),
-				    color.red,
-				    color.green,
-				    color.blue,
-				    65535);
-}
-
 /* Shows the current Free/Busy settings in the dialog */
 static void
 show_fb_config (CalendarPrefsDialog *prefs)
@@ -448,11 +422,18 @@ show_fb_config (CalendarPrefsDialog *pre
 static void
 show_task_list_config (CalendarPrefsDialog *prefs)
 {
+	GtkColorButton *color_button;
+	GdkColor color;
 	CalUnits units;
 	gboolean hide_completed_tasks = FALSE;
 
-	set_color_picker (prefs->tasks_due_today_color, calendar_config_get_tasks_due_today_color ());
-	set_color_picker (prefs->tasks_overdue_color, calendar_config_get_tasks_overdue_color ());
+	color_button = GTK_COLOR_BUTTON (prefs->tasks_due_today_color);
+	calendar_config_get_tasks_due_today_color (&color);
+	gtk_color_button_set_color (color_button, &color);
+
+	color_button = GTK_COLOR_BUTTON (prefs->tasks_overdue_color);
+	calendar_config_get_tasks_overdue_color (&color);
+	gtk_color_button_set_color (color_button, &color);
 
 	/* Hide Completed Tasks. */
 	e_dialog_toggle_set (prefs->tasks_hide_completed, calendar_config_get_hide_completed_tasks ());
Index: calendar/gui/dialogs/cal-prefs-dialog.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.glade,v
retrieving revision 1.39
diff -u -p -r1.39 cal-prefs-dialog.glade
--- calendar/gui/dialogs/cal-prefs-dialog.glade	10 Jul 2006 10:42:58 -0000	1.39
+++ calendar/gui/dialogs/cal-prefs-dialog.glade	15 Dec 2006 20:29:59 -0000
@@ -1231,10 +1231,9 @@ Days</property>
 		      </child>
 
 		      <child>
-			<widget class="GnomeColorPicker" id="tasks_due_today_color">
+			<widget class="GtkColorButton" id="tasks_due_today_color">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
-			  <property name="dither">True</property>
 			  <property name="use_alpha">False</property>
 			  <property name="title" translatable="yes">Pick a color</property>
 			  <property name="focus_on_click">True</property>
@@ -1250,10 +1249,9 @@ Days</property>
 		      </child>
 
 		      <child>
-			<widget class="GnomeColorPicker" id="tasks_overdue_color">
+			<widget class="GtkColorButton" id="tasks_overdue_color">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
-			  <property name="dither">True</property>
 			  <property name="use_alpha">False</property>
 			  <property name="title" translatable="yes">Pick a color</property>
 			  <property name="focus_on_click">True</property>
Index: calendar/gui/dialogs/calendar-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.c,v
retrieving revision 1.44
diff -u -p -r1.44 calendar-setup.c
--- calendar/gui/dialogs/calendar-setup.c	19 Jul 2006 13:04:45 -0000	1.44
+++ calendar/gui/dialogs/calendar-setup.c	15 Dec 2006 20:29:59 -0000
@@ -73,44 +73,22 @@ eccp_check_complete (EConfig *ec, const 
 }
 
 static void
-colorpicker_set_color (GnomeColorPicker *color, guint32 rgb)
-{
-	gnome_color_picker_set_i8 (color, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff);
-}
-
-static guint32
-colorpicker_get_color (GnomeColorPicker *color)
-{
-	guint8 r, g, b, a;
-	guint32 rgb = 0;
-
-	gnome_color_picker_get_i8 (color, &r, &g, &b, &a);
-
-	rgb = r;
-	rgb <<= 8;
-	rgb |= g;
-	rgb <<= 8;
-	rgb |= b;
-
-	return rgb;
-}
-
-static void
 eccp_commit (EConfig *ec, GSList *items, void *data)
 {
 	CalendarSourceDialog *sdialog = data;
 	xmlNodePtr xml;
 
 	if (sdialog->original_source) {
-		guint32 color;
+		const gchar *color_spec;
 
 		xml = xmlNewNode (NULL, "dummy");
 		e_source_dump_to_xml_node (sdialog->source, xml);
 		e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL);
 		xmlFreeNode (xml);
 
-		if (e_source_get_color (sdialog->source, &color))
-			e_source_set_color (sdialog->original_source, color);
+		color_spec = e_source_peek_color_spec (sdialog->source);
+		if (color_spec != NULL)
+			e_source_set_color_spec (sdialog->original_source, color_spec);
 	} else {
 		e_source_group_add_source (sdialog->source_group, sdialog->source, -1);
 		e_source_list_sync (sdialog->source_list, NULL);
@@ -304,63 +282,80 @@ eccp_general_offline (EConfig *ec, EConf
 }
 
 static void
-color_changed (GnomeColorPicker *picker, guint r, guint g, guint b, guint a, ECalConfigTargetSource *t)
+color_changed (GtkColorButton *color_button, ECalConfigTargetSource *target)
 {
-	ESource *source = t->source;
-	e_source_set_color (source, colorpicker_get_color (picker));
+	ESource *source = target->source;
+	gchar color_spec[16];
+	GdkColor color;
+
+	gtk_color_button_get_color (color_button, &color);
+	g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+		color.red, color.green, color.blue);
+	e_source_set_color_spec (source, color_spec);
+}
+
+static const gchar *
+choose_initial_color (void)
+{
+	static const gchar *colors[] = {
+		"#BECEDD", /* 190 206 221     Blue */
+		"#E2F0EF", /* 226 240 239     Light Blue */
+		"#C6E2B7", /* 198 226 183     Green */
+		"#E2F0D3", /* 226 240 211     Light Green */
+		"#E2D4B7", /* 226 212 183     Khaki */
+		"#EAEAC1", /* 234 234 193     Light Khaki */
+		"#F0B8B7", /* 240 184 183     Pink */
+		"#FED4D3", /* 254 212 211     Light Pink */
+		"#E2C6E1", /* 226 198 225     Purple */
+		"#F0E2EF"  /* 240 226 239     Light Purple */
+	};
+
+	return colors[g_random_int_range (0, G_N_ELEMENTS (colors))];
 }
 
 static GtkWidget *
 eccp_get_source_color (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
 {
 	CalendarSourceDialog *sdialog = data;
-	static GtkWidget *label, *picker;
-	int row;
-	ECalConfigTargetSource *t = (ECalConfigTargetSource *) ec->target;
-	static guint32 assigned_colors[] = {
-		0xBECEDD, /* 190 206 221     Blue */
-		0xE2F0EF, /* 226 240 239     Light Blue */
-		0xC6E2B7, /* 198 226 183     Green */
-		0xE2F0D3, /* 226 240 211     Light Green */
-		0xE2D4B7, /* 226 212 183     Khaki */
-		0xEAEAC1, /* 234 234 193     Light Khaki */
-		0xF0B8B7, /* 240 184 183     Pink */
-		0xFED4D3, /* 254 212 211     Light Pink */
-		0xE2C6E1, /* 226 198 225     Purple */
-		0xF0E2EF  /* 240 226 239     Light Purple */
-	};
-	GRand *rand = g_rand_new ();
-	guint32 color;
+	static GtkWidget *label, *color_button;
+	guint row = GTK_TABLE (parent)->nrows;
+	const gchar *color_spec = NULL;
+	GdkColor color;
 
 	if (old)
 		gtk_widget_destroy (label);
 
-	row = ((GtkTable*)parent)->nrows;
+	if (sdialog->original_source)
+		color_spec = e_source_peek_color_spec (sdialog->original_source);
+
+	if (color_spec == NULL) {
+		color_spec = choose_initial_color ();
+		e_source_set_color_spec (sdialog->source, color_spec);
+	}
 
-	color = assigned_colors[g_rand_int_range (rand, 0, 9)];
-	g_rand_free (rand);
+	if (!gdk_color_parse (color_spec, &color))
+		g_warning ("Unknown color \"%s\" in calendar \"%s\"",
+			color_spec, e_source_peek_name (sdialog->source));
 
 	label = gtk_label_new_with_mnemonic (_("C_olor:"));
 	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	gtk_table_attach (
+		GTK_TABLE (parent), label,
+		0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
 	gtk_widget_show (label);
-	gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
-
-	picker = gnome_color_picker_new ();
-	gtk_widget_show (picker);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), picker);
-	gtk_table_attach (GTK_TABLE (parent), picker, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
-	g_signal_connect (G_OBJECT (picker), "color-set", G_CALLBACK (color_changed), t);
-
-	if (sdialog->original_source)
-		e_source_get_color (sdialog->original_source, &color);
-	else
-		/* since we don't have an original source here, we want to set
-		 * the initial color */
-		e_source_set_color (sdialog->source, color);
 
-	colorpicker_set_color (GNOME_COLOR_PICKER (picker), color);
+	color_button = gtk_color_button_new_with_color (&color);
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), color_button);
+	gtk_table_attach (
+		GTK_TABLE (parent), color_button,
+		1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+	gtk_widget_show (color_button);
+
+	g_signal_connect (
+		G_OBJECT (color_button), "color-set",
+		G_CALLBACK (color_changed), ec->target);
 
-	return picker;
+	return color_button;
 }
 
 static ECalConfigItem eccp_items[] = {
@@ -414,7 +409,7 @@ calendar_setup_edit_calendar (struct _Gt
 	ECalConfigTargetSource *target;
 
 	if (source) {
-		guint32 color;
+		const gchar *color_spec;
 
 		sdialog->original_source = source;
 		g_object_ref (source);
@@ -423,8 +418,9 @@ calendar_setup_edit_calendar (struct _Gt
 		sdialog->source = e_source_new_from_standalone_xml (xml);
 		g_free (xml);
 
-		if (e_source_get_color (source, &color))
-			e_source_set_color (sdialog->source, color);
+		color_spec = e_source_peek_color_spec (source);
+		if (color_spec != NULL)
+			e_source_set_color_spec (sdialog->source, color_spec);
 	} else {
 		GConfClient *gconf;
 		GSList *l, *ptr, *temp = NULL;
@@ -504,7 +500,7 @@ calendar_setup_edit_task_list (struct _G
 	ECalConfigTargetSource *target;
 
 	if (source) {
-		guint32 color;
+		const gchar *color_spec;
 
 		sdialog->original_source = source;
 		g_object_ref (source);
@@ -513,8 +509,8 @@ calendar_setup_edit_task_list (struct _G
 		sdialog->source = e_source_new_from_standalone_xml (xml);
 		g_free (xml);
 
-		e_source_get_color (source, &color);
-		e_source_set_color (sdialog->source, color);
+		color_spec = e_source_peek_color_spec (source);
+		e_source_set_color_spec (sdialog->source, color_spec);
 	} else {
 		GConfClient *gconf;
 		GSList *l, *ptr, *temp = NULL;
@@ -589,7 +585,7 @@ calendar_setup_edit_memo_list (struct _G
 	ECalConfigTargetSource *target;
 
 	if (source) {
-		guint32 color;
+		const gchar *color_spec;
 
 		sdialog->original_source = source;
 		g_object_ref (source);
@@ -598,8 +594,8 @@ calendar_setup_edit_memo_list (struct _G
 		sdialog->source = e_source_new_from_standalone_xml (xml);
 		g_free (xml);
 
-		e_source_get_color (source, &color);
-		e_source_set_color (sdialog->source, color);
+		color_spec = e_source_peek_color_spec (source);
+		e_source_set_color_spec (sdialog->source, color_spec);
 	} else {
 		GConfClient *gconf;
 		GSList *l;
Index: calendar/gui/dialogs/calendar-setup.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.glade,v
retrieving revision 1.15
diff -u -p -r1.15 calendar-setup.glade
--- calendar/gui/dialogs/calendar-setup.glade	18 Jul 2006 22:32:36 -0000	1.15
+++ calendar/gui/dialogs/calendar-setup.glade	15 Dec 2006 20:30:00 -0000
@@ -338,10 +338,9 @@
 	  </child>
 
 	  <child>
-	    <widget class="GnomeColorPicker" id="source-color">
+	    <widget class="GtkColorButton" id="source-color">
 	      <property name="visible">True</property>
 	      <property name="can_focus">True</property>
-	      <property name="dither">True</property>
 	      <property name="use_alpha">False</property>
 	      <property name="title" translatable="yes">Pick a color</property>
 	      <property name="focus_on_click">True</property>
@@ -587,10 +586,9 @@
 	  </child>
 
 	  <child>
-	    <widget class="GnomeColorPicker" id="source-color">
+	    <widget class="GtkColorButton" id="source-color">
 	      <property name="visible">True</property>
 	      <property name="can_focus">True</property>
-	      <property name="dither">True</property>
 	      <property name="use_alpha">False</property>
 	      <property name="title" translatable="yes">Pick a color</property>
 	      <property name="focus_on_click">True</property>
Index: filter/filter-colour.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-colour.c,v
retrieving revision 1.12
diff -u -p -r1.12 filter-colour.c
--- filter/filter-colour.c	3 Dec 2004 03:41:39 -0000	1.12
+++ filter/filter-colour.c	15 Dec 2006 20:30:00 -0000
@@ -26,7 +26,7 @@
 #endif
 
 #include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-color-picker.h>
+#include <gtk/gtkcolorbutton.h>
 
 #include "libedataserver/e-sexp.h"
 #include "filter-colour.h"
@@ -120,13 +120,11 @@ filter_colour_new (void)
 static int
 colour_eq (FilterElement *fe, FilterElement *cm)
 {
-	FilterColour *fc = (FilterColour *)fe, *cc = (FilterColour *)cm;
-	
-        return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
-		&& fc->r == cc->r
-		&& fc->g == cc->g
-		&& fc->b == cc->b
-		&& fc->a == cc->a;
+	FilterColour *fc = (FilterColour *) fe;
+	FilterColour *cc = (FilterColour *) cm;
+
+	return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
+		&& gdk_color_equal (&fc->color, &cc->color);
 }
 
 static void
@@ -139,76 +137,70 @@ xml_create (FilterElement *fe, xmlNodePt
 static xmlNodePtr
 xml_encode (FilterElement *fe)
 {
-	xmlNodePtr value;
 	FilterColour *fc = (FilterColour *)fe;
-	char hex[16];
-	
-	d(printf("Encoding colour as xml\n"));
+	xmlNodePtr value;
+	gchar spec[16];
+
+	g_snprintf (spec, sizeof (spec), "#%04x%04x%04x",
+		fc->color.red, fc->color.green, fc->color.blue);
+
 	value = xmlNewNode(NULL, "value");
 	xmlSetProp(value, "name", fe->name);
 	xmlSetProp(value, "type", "colour");
-	
-	sprintf(hex, "%04x", fc->r);
-	xmlSetProp(value, "red", hex);
-	sprintf(hex, "%04x", fc->g);
-	xmlSetProp(value, "green", hex);
-	sprintf(hex, "%04x", fc->b);
-	xmlSetProp(value, "blue", hex);
-	sprintf(hex, "%04x", fc->a);
-	xmlSetProp(value, "alpha", hex);
-	
-	return value;
-}
+	xmlSetProp(value, "spec", spec);
 
-static guint16
-get_value (xmlNodePtr node, char *name)
-{
-	unsigned int ret;
-	char *value;
-	
-	value = xmlGetProp(node, name);
-	sscanf(value, "%04x", &ret);
-	xmlFree(value);
-	return ret;
+	return value;
 }
 
-
 static int
 xml_decode (FilterElement *fe, xmlNodePtr node)
 {
 	FilterColour *fc = (FilterColour *)fe;
-	
+	xmlChar *prop;
+
 	xmlFree (fe->name);
 	fe->name = xmlGetProp(node, "name");
-	fc->r = get_value(node, "red");
-	fc->g = get_value(node, "green");
-	fc->b = get_value(node, "blue");
-	fc->a = get_value(node, "alpha");
-	
+
+	prop = xmlGetProp(node, "spec");
+	if (prop != NULL) {
+		gdk_color_parse(prop, &fc->color);
+		xmlFree (prop);
+	} else {
+		/* try reading the old RGB properties */
+		prop = xmlGetProp(node, "red");
+		sscanf(prop, "%" G_GINT16_MODIFIER "x", &fc->color.red);
+		xmlFree (prop);
+		prop = xmlGetProp(node, "green");
+		sscanf(prop, "%" G_GINT16_MODIFIER "x", &fc->color.green);
+		xmlFree (prop);
+		prop = xmlGetProp(node, "blue");
+		sscanf(prop, "%" G_GINT16_MODIFIER "x", &fc->color.blue);
+		xmlFree (prop);
+	}
+
 	return 0;
 }
 
 static void
-set_colour (GnomeColorPicker *cp, guint r, guint g, guint b, guint a, FilterColour *fc)
+set_color (GtkColorButton *color_button, FilterColour *fc)
 {
-	fc->r = r;
-	fc->g = g;
-	fc->b = b;
-	fc->a = a;
+	gtk_color_button_get_color (color_button, &fc->color);
 }
 
 static GtkWidget *
 get_widget (FilterElement *fe)
 {
 	FilterColour *fc = (FilterColour *) fe;
-	GnomeColorPicker *cp;
-	
-	cp = (GnomeColorPicker *) gnome_color_picker_new ();
-	gnome_color_picker_set_i16 (cp, fc->r, fc->g, fc->b, fc->a);
-	gtk_widget_show ((GtkWidget *) cp);
-	g_signal_connect (cp, "color_set", G_CALLBACK (set_colour), fe);
+	GtkWidget *color_button;
+
+	color_button = gtk_color_button_new_with_color (&fc->color);
+	gtk_widget_show (color_button);
+
+	g_signal_connect (
+		G_OBJECT (color_button), "color_set",
+		G_CALLBACK (set_color), fe);
 	
-	return (GtkWidget *) cp;
+	return color_button;
 }
 
 static void
@@ -221,9 +213,9 @@ static void
 format_sexp (FilterElement *fe, GString *out)
 {
 	FilterColour *fc = (FilterColour *)fe;
-	char *str;
-	
-	str = g_strdup_printf ("#%02x%02x%02x", (fc->r >> 8) & 0xff, (fc->g >> 8) & 0xff, (fc->b >> 8) & 0xff);
-	e_sexp_encode_string (out, str);
-	g_free (str);
+	gchar spec[16];
+
+	g_snprintf (spec, sizeof (spec), "#%04x%04x%04x",
+		fc->color.red, fc->color.green, fc->color.blue);
+	e_sexp_encode_string (out, spec);
 }
Index: filter/filter-colour.h
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-colour.h,v
retrieving revision 1.5
diff -u -p -r1.5 filter-colour.h
--- filter/filter-colour.h	1 Nov 2002 22:07:46 -0000	1.5
+++ filter/filter-colour.h	15 Dec 2006 20:30:00 -0000
@@ -39,7 +39,7 @@ typedef struct _FilterColourClass Filter
 struct _FilterColour {
 	FilterElement parent_object;
 	
-	guint16 r, g, b, a;
+	GdkColor color;
 };
 
 struct _FilterColourClass {
Index: filter/filter-element.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-element.c,v
retrieving revision 1.35
diff -u -p -r1.35 filter-element.c
--- filter/filter-element.c	8 Feb 2006 11:44:27 -0000	1.35
+++ filter/filter-element.c	15 Dec 2006 20:30:01 -0000
@@ -293,12 +293,10 @@ copy_value(FilterElement *de, FilterElem
 		}
 	} else if (IS_FILTER_COLOUR(se)) {
 		if (IS_FILTER_COLOUR(de)) {
-			FilterColour *s = (FilterColour *)se, *d = (FilterColour *)de;
+			FilterColour *s = (FilterColour *)se;
+			FilterColour *d = (FilterColour *)de;
 
-			d->r = s->r;
-			d->g = s->g;
-			d->b = s->b;
-			d->a = s->a;
+			d->color = s->color;
 		}
 	} else if (IS_FILTER_DATESPEC(se)) {
 		if (IS_FILTER_DATESPEC(de)) {
Index: mail/em-composer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-prefs.c,v
retrieving revision 1.34
diff -u -p -r1.34 em-composer-prefs.c
--- mail/em-composer-prefs.c	11 Jul 2006 16:47:09 -0000	1.34
+++ mail/em-composer-prefs.c	15 Dec 2006 20:30:02 -0000
@@ -56,9 +56,8 @@
 #include <gtk/gtkcellrenderertext.h>
 #include <gtk/gtkimage.h>
 #include <gtk/gtkstock.h>
-
+#include <gtk/gtkcolorbutton.h>
 #include <gtk/gtkfilechooserbutton.h>
-#include <libgnomeui/gnome-color-picker.h>
 
 #include <gtkhtml/gtkhtml.h>
 
@@ -545,7 +544,7 @@ spell_set_ui (EMComposerPrefs *prefs)
 	GtkTreeIter iter;
 	GError *err = NULL;
 	char **strv = NULL;
-	guint r, g, b;
+	GdkColor color;
 	gboolean go;
 	char *lang;
 	int i;
@@ -580,21 +579,33 @@ spell_set_ui (EMComposerPrefs *prefs)
 	if (strv != NULL)
 		g_strfreev (strv);
 	
-	r = gconf_client_get_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_red", NULL);
-	g = gconf_client_get_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_green", NULL);
-	b = gconf_client_get_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_blue", NULL);
-	
-	gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (prefs->colour), r, g, b, 0xffff);
+	color.red = gconf_client_get_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_red", NULL);
+	color.green = gconf_client_get_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_green", NULL);
+	color.blue = gconf_client_get_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_blue", NULL);
+	gtk_color_button_set_color (GTK_COLOR_BUTTON (prefs->color), &color);
 	
 	prefs->spell_active = TRUE;
 }
 
 static void
-spell_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, EMComposerPrefs *prefs)
+spell_color_set (GtkColorButton *color_button, EMComposerPrefs *prefs)
 {
-	gconf_client_set_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_red", r, NULL);
-	gconf_client_set_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_green", g, NULL);
-	gconf_client_set_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_blue", b, NULL);
+	GdkColor color;
+
+	gtk_color_button_get_color (GTK_COLOR_BUTTON (color_button), &color);
+
+	gconf_client_set_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_red",
+		color.red, NULL);
+	gconf_client_set_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_green",
+		color.green, NULL);
+	gconf_client_set_int (prefs->gconf,
+		GNOME_SPELL_GCONF_DIR "/spell_error_color_blue",
+		color.blue, NULL);
 }
 
 static char *
@@ -676,7 +687,7 @@ spell_setup (EMComposerPrefs *prefs)
 	
 	spell_set_ui (prefs);
 	
-	widget = glade_xml_get_widget (prefs->gui, "colorpickerSpellCheckColor");
+	widget = glade_xml_get_widget (prefs->gui, "colorButtonSpellCheckColor");
 	g_signal_connect (widget, "color_set", G_CALLBACK (spell_color_set), prefs);
 }
 
@@ -922,7 +933,7 @@ em_composer_prefs_construct (EMComposerP
 	g_free (buf);
 	
 	/* Spell Checking: GNOME Spell part */
-	prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor"));
+	prefs->color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, "colorButtonSpellCheckColor"));
 	prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "listSpellCheckLanguage"));
 	model = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
 	gtk_tree_view_set_model (prefs->language, (GtkTreeModel *) model);
@@ -942,7 +953,7 @@ em_composer_prefs_construct (EMComposerP
 	info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo");
 	gtk_image_set_from_stock (GTK_IMAGE (info_pixmap), GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_BUTTON);
 	if (!spell_setup_check_options (prefs)) {
-		gtk_widget_hide (GTK_WIDGET (prefs->colour));
+		gtk_widget_hide (GTK_WIDGET (prefs->color));
 		gtk_widget_hide (GTK_WIDGET (prefs->language));
 	}
 	
Index: mail/em-composer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-prefs.h,v
retrieving revision 1.12
diff -u -p -r1.12 em-composer-prefs.h
--- mail/em-composer-prefs.h	24 Jan 2005 21:11:07 -0000	1.12
+++ mail/em-composer-prefs.h	15 Dec 2006 20:30:02 -0000
@@ -48,7 +48,6 @@ struct _GtkOptionMenu;
 struct _GdkPixbuf;
 struct _GtkWidget;
 struct _GladeXML;
-struct _GnomeColorPicker;
 struct _GConfClient;
 struct _GtkButton;
 struct _GtkTreeView;
@@ -71,7 +70,7 @@ struct _EMComposerPrefs {
 	struct _GtkOptionMenu *charset;
 	
 	struct _GtkToggleButton *spell_check;
-	struct _GnomeColorPicker *colour;
+	struct _GtkColorButton *color;
 	struct _GtkTreeView *language;
 	CORBA_sequence_GNOME_Spell_Language *language_seq;
 	gboolean spell_active;
Index: mail/em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.40
diff -u -p -r1.40 em-mailer-prefs.c
--- mail/em-mailer-prefs.c	26 Nov 2006 18:30:15 -0000	1.40
+++ mail/em-mailer-prefs.c	15 Dec 2006 20:30:03 -0000
@@ -35,7 +35,7 @@
 #include "misc/e-charset-picker.h"
 #include <bonobo/bonobo-generic-factory.h>
 
-#include <libgnomeui/gnome-color-picker.h>
+#include <gtk/gtkcolorbutton.h>
 #include <libgnomeui/gnome-font-picker.h>
 #include <gtk/gtkfilechooserbutton.h>
 
@@ -157,49 +157,27 @@ em_mailer_prefs_finalise (GObject *obj)
 
 
 static void
-colorpicker_set_color (GnomeColorPicker *color, const char *str)
+color_button_set_color (GtkColorButton *color_button, const gchar *spec)
 {
-	GdkColor colour;
-	guint32 rgb;
-	
-	gdk_color_parse (str, &colour);
-	rgb = ((colour.red & 0xff00) << 8) | (colour.green & 0xff00) | ((colour.blue & 0xff00) >> 8);
-	
-	gnome_color_picker_set_i8 (color, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff);
-}
+	GdkColor color;
 
-static guint32
-colorpicker_get_color (GnomeColorPicker *color)
-{
-	guint8 r, g, b, a;
-	guint32 rgb = 0;
-	
-	gnome_color_picker_get_i8 (color, &r, &g, &b, &a);
-	
-	rgb   = r;
-	rgb <<= 8;
-	rgb  |= g;
-	rgb <<= 8;
-	rgb  |= b;
-	
-	return rgb;
+	if (gdk_color_parse (spec, &color))
+		gtk_color_button_set_color (color_button, &color);
 }
 
 static void
-citation_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, EMMailerPrefs *prefs)
+citation_color_set (GtkColorButton *color_button, EMMailerPrefs *prefs)
 {
-	guint32 rgb = 0;
-	char buf[20];
-	
-	rgb   = r & 0xff;
-	rgb <<= 8;
-	rgb  |= g & 0xff;
-	rgb <<= 8;
-	rgb  |= b & 0xff;
-	
-	sprintf (buf, "#%06x", rgb & 0xffffff);
-	
-	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", buf, NULL);
+	GdkColor color;
+	gchar spec[16];
+
+	gtk_color_button_get_color (color_button, &color);
+	g_snprintf (spec, sizeof (spec), "#%04x%04x%04x",
+		color.red, color.green, color.blue);
+
+	gconf_client_set_string (prefs->gconf,
+		"/apps/evolution/mail/display/citation_colour",
+		spec, NULL);
 }
 
 static void
@@ -212,9 +190,12 @@ labels_changed (EMMailerPrefs *prefs)
 	int i;
 	
 	for (i = 4; i >= 0; i--) {
+		GdkColor color;
+
 		cstring = gtk_entry_get_text (prefs->labels[i].name);
-		rgb = colorpicker_get_color (prefs->labels[i].color);
-		string = g_strdup_printf ("%s:#%06x", cstring, rgb & 0xffffff);
+		gtk_color_button_get_color (prefs->labels[i].color, &color);
+		string = g_strdup_printf ("%s:#%04x%04x%04x", cstring,
+			color.red, color.green, color.blue);
 		list = g_slist_prepend (list, string);
 	}
 	
@@ -249,7 +230,7 @@ restore_labels_clicked (GtkWidget *widge
 	
 	for (i = 0; i < 5; i++) {
 		gtk_entry_set_text (prefs->labels[i].name, _(label_defaults[i].name));
-		colorpicker_set_color (prefs->labels[i].color, label_defaults[i].colour);
+		color_button_set_color (prefs->labels[i].color, label_defaults[i].colour);
 		atk_object_set_name(gtk_widget_get_accessible((GtkWidget *)prefs->labels[i].color), _(label_defaults[i].name));
 	}
 }
@@ -810,9 +791,9 @@ em_mailer_prefs_construct (EMMailerPrefs
 			    "/apps/evolution/mail/display/mark_citations",
 			    G_CALLBACK (toggle_button_toggled));
 	
-	prefs->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerHighlightCitations"));
+	prefs->citation_color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, "colorButtonHighlightCitations"));
 	buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
-	colorpicker_set_color (prefs->citation_color, buf ? buf : "#737373");
+	color_button_set_color (prefs->citation_color, buf ? buf : "#737373");
 	g_signal_connect (prefs->citation_color, "color-set", G_CALLBACK (citation_color_set), prefs);
 	if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL))
 		gtk_widget_set_sensitive ((GtkWidget *) prefs->citation_color, FALSE);
@@ -933,14 +914,14 @@ em_mailer_prefs_construct (EMMailerPrefs
 		g_free (widget_name);
 		
 		widget_name = g_strdup_printf ("colorLabel%d", i);
-		prefs->labels[i].color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, widget_name));
+		prefs->labels[i].color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, widget_name));
 		gtk_widget_set_sensitive ((GtkWidget *) prefs->labels[i].color, !locked);
 		g_free (widget_name);
 		
 		gtk_entry_set_text (prefs->labels[i].name, label->name);
 		g_signal_connect (prefs->labels[i].name, "changed", G_CALLBACK (label_entry_changed), prefs);
 		
-		colorpicker_set_color (prefs->labels[i].color, label->colour);
+		color_button_set_color (prefs->labels[i].color, label->colour);
 		g_signal_connect (prefs->labels[i].color, "color-set", G_CALLBACK (label_color_set), prefs);
 		
 		atk_object_set_name(gtk_widget_get_accessible((GtkWidget *)prefs->labels[i].color), label->name);
Index: mail/em-mailer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.h,v
retrieving revision 1.16
diff -u -p -r1.16 em-mailer-prefs.h
--- mail/em-mailer-prefs.h	26 Nov 2006 18:32:18 -0000	1.16
+++ mail/em-mailer-prefs.h	15 Dec 2006 20:30:03 -0000
@@ -37,7 +37,6 @@ struct _GtkOptionMenu;
 struct _GdkPixbuf;
 struct _GtkWidget;
 struct _GladeXML;
-struct _GnomeColorPicker;
 struct _GtkFileChooserbutton;
 struct _GnomeFontPicker;
 struct _GConfClient;
@@ -80,7 +79,7 @@ struct _EMMailerPrefs {
 	struct _GtkSpinButton *mlimit_count;
 	struct _GtkOptionMenu *charset;
 	struct _GtkToggleButton *citation_highlight;
-	struct _GnomeColorPicker *citation_color;
+	struct _GtkColorButton *citation_color;
 	
 	/* Deleting Mail */
 	struct _GtkToggleButton *empty_trash;
@@ -110,7 +109,7 @@ struct _EMMailerPrefs {
 	/* Labels and Colours tab */
 	struct {
 		struct _GtkEntry *name;
-		struct _GnomeColorPicker *color;
+		struct _GtkColorButton *color;
 	} labels[5];
 	struct _GtkButton *restore_labels;
 
Index: mail/mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.175
diff -u -p -r1.175 mail-config.glade
--- mail/mail-config.glade	26 Nov 2006 18:30:16 -0000	1.175
+++ mail/mail-config.glade	15 Dec 2006 20:30:11 -0000
@@ -5139,10 +5139,9 @@ For example: &quot;Work&quot; or &quot;P
 			      </child>
 
 			      <child>
-				<widget class="GnomeColorPicker" id="colorpickerHighlightCitations">
+				<widget class="GtkColorButton" id="colorButtonHighlightCitations">
 				  <property name="visible">True</property>
 				  <property name="can_focus">True</property>
-				  <property name="dither">True</property>
 				  <property name="use_alpha">False</property>
 				  <property name="title" translatable="yes">Pick a color</property>
 				  <property name="focus_on_click">True</property>
@@ -6080,10 +6079,9 @@ For example: &quot;Work&quot; or &quot;P
 		  <property name="column_spacing">6</property>
 
 		  <child>
-		    <widget class="GnomeColorPicker" id="colorLabel0">
+		    <widget class="GtkColorButton" id="colorLabel0">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="dither">True</property>
 		      <property name="use_alpha">False</property>
 		      <property name="title" translatable="yes">Pick a color</property>
 		      <property name="focus_on_click">True</property>
@@ -6099,10 +6097,9 @@ For example: &quot;Work&quot; or &quot;P
 		  </child>
 
 		  <child>
-		    <widget class="GnomeColorPicker" id="colorLabel1">
+		    <widget class="GtkColorButton" id="colorLabel1">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="dither">True</property>
 		      <property name="use_alpha">False</property>
 		      <property name="title" translatable="yes">Pick a color</property>
 		      <property name="focus_on_click">True</property>
@@ -6118,10 +6115,9 @@ For example: &quot;Work&quot; or &quot;P
 		  </child>
 
 		  <child>
-		    <widget class="GnomeColorPicker" id="colorLabel2">
+		    <widget class="GtkColorButton" id="colorLabel2">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="dither">True</property>
 		      <property name="use_alpha">False</property>
 		      <property name="title" translatable="yes">Pick a color</property>
 		      <property name="focus_on_click">True</property>
@@ -6137,10 +6133,9 @@ For example: &quot;Work&quot; or &quot;P
 		  </child>
 
 		  <child>
-		    <widget class="GnomeColorPicker" id="colorLabel3">
+		    <widget class="GtkColorButton" id="colorLabel3">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="dither">True</property>
 		      <property name="use_alpha">False</property>
 		      <property name="title" translatable="yes">Pick a color</property>
 		      <property name="focus_on_click">True</property>
@@ -6156,10 +6151,9 @@ For example: &quot;Work&quot; or &quot;P
 		  </child>
 
 		  <child>
-		    <widget class="GnomeColorPicker" id="colorLabel4">
+		    <widget class="GtkColorButton" id="colorLabel4">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="dither">True</property>
 		      <property name="use_alpha">False</property>
 		      <property name="title" translatable="yes">Pick a color</property>
 		      <property name="focus_on_click">True</property>
@@ -8316,7 +8310,7 @@ For example: &quot;Work&quot; or &quot;P
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">colorpickerSpellCheckColor</property>
+			      <property name="mnemonic_widget">colorButtonSpellCheckColor</property>
 			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 			      <property name="width_chars">-1</property>
 			      <property name="single_line_mode">False</property>
@@ -8330,10 +8324,9 @@ For example: &quot;Work&quot; or &quot;P
 			  </child>
 
 			  <child>
-			    <widget class="GnomeColorPicker" id="colorpickerSpellCheckColor">
+			    <widget class="GtkColorButton" id="colorButtonSpellCheckColor">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="dither">True</property>
 			      <property name="use_alpha">False</property>
 			      <property name="title" translatable="yes">Pick a color</property>
 			      <property name="focus_on_click">True</property>
Index: plugins/groupwise-account-setup/camel-gw-listener.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-account-setup/camel-gw-listener.c,v
retrieving revision 1.48
diff -u -p -r1.48 camel-gw-listener.c
--- plugins/groupwise-account-setup/camel-gw-listener.c	3 Dec 2006 17:47:06 -0000	1.48
+++ plugins/groupwise-account-setup/camel-gw-listener.c	15 Dec 2006 20:30:12 -0000
@@ -213,10 +213,10 @@ add_esource (const char *conf_key, const
 	e_source_set_property (source, "offline_sync", offline_sync ? "1" : "0" );
 	if (parent_id_name) {
 		e_source_set_property (source, "parent_id_name", parent_id_name);
-		e_source_set_color (source, 0xFF00FF);
+		e_source_set_color_spec (source, "#FF00FF");
 	}
 	else
-		e_source_set_color (source, 0xEEBC60);
+		e_source_set_color_spec (source, "#EEBC60");
 	e_source_group_add_source (group, source, -1);
 	e_source_list_sync (source_list, NULL);
 
