[evolution-patches] patch for bug# 228832 [calendar]



 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2714
diff -u -p -r1.2714 ChangeLog
--- ChangeLog	18 Apr 2005 14:32:16 -0000	1.2714
+++ ChangeLog	5 May 2005 09:56:02 -0000
@@ -1,3 +1,10 @@
+2005-05-02  Viren.l <lviren novell com>
+
+	Fixes #228832
+	* gui/gnome-cal.c: (gnome_calendar_new_task):set appropriate values
+	for start and due date by calling icalcomponent_set_dtstart and 
+	icalcomponent_set_due methods.
+	
 2005-04-18  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #274476
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.372
diff -u -p -r1.372 gnome-cal.c
--- gui/gnome-cal.c	7 Apr 2005 18:12:50 -0000	1.372
+++ gui/gnome-cal.c	5 May 2005 09:56:03 -0000
@@ -2783,12 +2783,14 @@ gnome_calendar_new_task		(GnomeCalendar 
 	ECalComponent *comp;
 	icalcomponent *icalcomp;
 	const char *category;
+	time_t dtstart, dtdue;
+	struct icaltimetype itime;
 	
 	g_return_if_fail (gcal != NULL);
 	g_return_if_fail (GNOME_IS_CALENDAR (gcal));
 
 	priv = gcal->priv;
-
+	gnome_calendar_get_current_time_range(gcal,&dtstart,&dtdue);
 	model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
 	ecal = e_cal_model_get_default_client (model);
 	if (!ecal)
@@ -2797,6 +2799,11 @@ gnome_calendar_new_task		(GnomeCalendar 
 	tedit = task_editor_new (ecal, FALSE);
 
 	icalcomp = e_cal_model_create_component_with_defaults (model);
+	itime = icaltime_from_timet_with_zone (dtstart, FALSE, calendar_config_get_icaltimezone()) ;
+	icalcomponent_set_dtstart(icalcomp, itime);
+	itime = icaltime_from_timet_with_zone (dtdue, FALSE, calendar_config_get_icaltimezone());     
+	icalcomponent_set_due (icalcomp, itime);
+
 	comp = e_cal_component_new ();
 	e_cal_component_set_icalcomponent (comp, icalcomp);
 


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