aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. S. Chakravarthi <pchakravarthi@novell.com>2005-08-03 14:03:39 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-03 14:03:39 +0800
commit733f748b38e3f7b0c4e7a6293c7226dc8231b411 (patch)
tree1ba517da5d9f30b0646d06707a170787029c8be9
parent7652b7495730d95babc4d7c94886d12c29e7a2c7 (diff)
downloadgsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar.gz
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar.bz2
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar.lz
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar.xz
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.tar.zst
gsoc2013-evolution-733f748b38e3f7b0c4e7a6293c7226dc8231b411.zip
Fixes #306017 Obtain the default zone information from cal-view and
2005-08-03 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. svn path=/trunk/; revision=29961
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-calendar-view.c25
2 files changed, 23 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 480e58699b..46eddb896e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-03 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-08-01 Shakti Sen <shprasad@novell.com>
* gui/tasks-control.c (tasks_control_sensitize_commands): Added support
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 88c1743738..c143faa2cd 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -923,7 +923,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
ECalComponent *comp;
struct icaltimetype itt;
ECalComponentDateTime dt;
- icaltimezone *zone;
+ icaltimezone *zone = NULL;
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
@@ -936,19 +936,26 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
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 (!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);
+ if (dt.tzid) {
+ GError *error = NULL;
+
+ e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, &error);
+ if (error) {
+ zone = e_calendar_view_get_timezone (cal_view);
+ g_clear_error(&error);
+ }
+ } else
+ zone = e_calendar_view_get_timezone (cal_view);
+
+ itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone ? zone : icaltimezone_get_utc_timezone ());
+
+ if (!e_cal_get_recurrences_no_master (event->comp_data->client))
rid = icaltime_as_ical_string (itt);
- } else
+ else
rid = e_cal_component_get_recurid_as_string (comp);
e_cal_component_free_datetime (&dt);
-
if (rid) {
if (delete_component_dialog (comp, FALSE, 1, e_cal_component_get_vtype (comp), GTK_WIDGET (cal_view))) {