[evolution-patches] fix for the bug #314639 [calendar]



Hi, 
   Have attached the fix for the bug. Checks if the default client is
loaded before opening the editor to create a new appointment.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2833
diff -u -p -r1.2833 ChangeLog
--- ChangeLog	21 Oct 2005 10:02:34 -0000	1.2833
+++ ChangeLog	27 Oct 2005 23:27:27 -0000
@@ -1,3 +1,10 @@
+2005-10-28  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #314639
+	* gui/e-calendar-view.c: 
+	(e_calendar_view_new_appointment_for): Check if the default
+	client is loaded before creating the appointment.
+
 2005-10-21  Mubeen Jukaku  <jmubeen novell com>
 
 	Sankar Committting for Mubeen
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.97
diff -u -p -r1.97 e-calendar-view.c
--- gui/e-calendar-view.c	18 Oct 2005 09:58:28 -0000	1.97
+++ gui/e-calendar-view.c	27 Oct 2005 23:27:34 -0000
@@ -1674,12 +1674,20 @@ e_calendar_view_new_appointment_for (ECa
 	ECalComponent *comp;
 	icalcomponent *icalcomp;
 	ECalComponentTransparency transparency;
+	ECal *default_client = NULL;
 	guint32 flags = 0;
 
 	g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
 
 	priv = cal_view->priv;
 
+	default_client = e_cal_model_get_default_client (priv->model);
+
+	if (default_client && e_cal_get_load_state (default_client) != E_CAL_LOAD_LOADED) {
+		g_warning ("Default client not loaded \n");
+		return;
+	}
+	
 	dt.value = &itt;
 	if (all_day)
 		dt.tzid = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]