From 71529100f8d8f5b9e648fd4ec29f18a3a5e5400a Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Tue, 24 May 2005 12:36:05 +0000 Subject: Fixes #272114 Check if the color is present in the source before setting 2005-05-24 Chenthill Palanisamy Fixes #272114 * gui/dialogs/calendar-setup.c: (eccp_commit), (calendar_setup_edit_calendar): Check if the color is present in the source before setting it. svn path=/trunk/; revision=29407 --- calendar/gui/dialogs/calendar-setup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 53c46a0752..0cfc32a217 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -109,8 +109,8 @@ eccp_commit (EConfig *ec, GSList *items, void *data) e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL); xmlFreeNode (xml); - e_source_get_color (sdialog->source, &color); - e_source_set_color (sdialog->original_source, color); + if (e_source_get_color (sdialog->source, &color)) + e_source_set_color (sdialog->original_source, color); } else { e_source_group_add_source (sdialog->source_group, sdialog->source, -1); e_source_list_sync (sdialog->source_list, NULL); @@ -412,8 +412,8 @@ calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source, ESourc 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); + if (e_source_get_color (source, &color)) + e_source_set_color (sdialog->source, color); } else { GConfClient *gconf; GSList *l; -- cgit