[evolution-patches] fix for bug # 306017



hi

  please review the following fix.
  for bug #306017
  For constructing the correct rid inorder to 
  remove selected occurence of a recurring
  event, zone is obtained from e_calendar_view_get_timezone()
  
 regards.
 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2782
diff -u -p -r1.2782 ChangeLog
--- ChangeLog	29 Jul 2005 05:10:11 -0000	1.2782
+++ ChangeLog	2 Aug 2005 08:26:16 -0000
@@ -1,5 +1,11 @@
-2005-07-29  Chenthill Palanisamy  <pchenthill novell com>
+2005-08-02  P. S. Chakravarthi	<pchakravarthi novell com>
+
+	Fixes #306017
+	* gui/e-calendar-view.c: (e_calendar_view_delete_selected_occurrence):
+	Obtain the default zone information from cal-view and eventually use it to 
+	determine the correct rid for an all-day event.
 
+2005-07-29  Chenthill Palanisamy  <pchenthill novell com>
 
 	* gui/e-day-view.c: (e_day_view_update_event_label),
 	(e_day_view_update_long_event_label):
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.88
diff -u -p -r1.88 e-calendar-view.c
--- gui/e-calendar-view.c	25 Jul 2005 04:55:59 -0000	1.88
+++ gui/e-calendar-view.c	2 Aug 2005 08:26:17 -0000
@@ -923,7 +923,7 @@ e_calendar_view_delete_selected_occurren
 	ECalComponent *comp;
 	struct icaltimetype itt;
 	ECalComponentDateTime dt;
-	icaltimezone *zone;
+	icaltimezone *zone = NULL;
 		
 	selected = e_calendar_view_get_selected_events (cal_view);
 	if (!selected)
@@ -936,13 +936,22 @@ e_calendar_view_delete_selected_occurren
 	e_cal_component_get_uid (comp, &uid);
 
 	e_cal_component_get_dtstart (comp, &dt);
-	e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL);
+
+	if (dt.tzid)
+		e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL);
 
 	if (!e_cal_get_recurrences_no_master (event->comp_data->client)) {
 		if (zone)
 			itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone);
-		else
-			itt = icaltime_from_timet (event->comp_data->instance_start, TRUE);
+		else {
+			zone = e_calendar_view_get_timezone (cal_view);
+			if(zone)
+				itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone);
+			else{
+				zone = icaltimezone_get_utc_timezone ();
+				itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone);
+			}
+		}
 		rid = icaltime_as_ical_string (itt);
 	} else
 		rid = e_cal_component_get_recurid_as_string (comp);


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