aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-model.c8
-rw-r--r--calendar/gui/e-day-view.c8
-rw-r--r--calendar/gui/e-week-view.c10
-rw-r--r--calendar/gui/gnome-cal.c9
-rw-r--r--calendar/gui/tag-calendar.c13
5 files changed, 18 insertions, 30 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 8de47998f3..26d6d5ec7b 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1896,15 +1896,9 @@ e_cal_model_generate_instances (ECalModel *model, time_t start, time_t end,
n = e_table_model_row_count (E_TABLE_MODEL (model));
for (i = 0; i < n; i ++) {
ECalModelComponent *comp_data = e_cal_model_get_component_at (model, i);
- ECalComponent *comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
mdata.comp_data = comp_data;
mdata.cb_data = cb_data;
- e_cal_recur_generate_instances (comp, start, end,
- cb, &mdata,
- e_cal_resolve_tzid_cb, comp_data->client,
- e_cal_model_get_timezone (model));
- g_object_unref (comp);
+ e_cal_generate_instances_for_object (comp_data->client, comp_data->icalcomp, start, end, cb, &mdata);
}
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index d2ad842313..31366bafc2 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -573,11 +573,9 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
/* Add the occurrences of the event */
add_event_data.day_view = day_view;
add_event_data.comp_data = comp_data;
- e_cal_recur_generate_instances (comp, day_view->lower,
- day_view->upper,
- e_day_view_add_event, &add_event_data,
- e_cal_resolve_tzid_cb, comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_generate_instances_for_object (comp_data->client, comp_data->icalcomp, day_view->lower,
+ day_view->upper,
+ e_day_view_add_event, &add_event_data);
g_object_unref (comp);
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 28d3dff4e9..1e11149874 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -392,12 +392,10 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
add_event_data.week_view = week_view;
add_event_data.comp_data = comp_data;
- e_cal_recur_generate_instances (comp,
- week_view->day_starts[0],
- week_view->day_starts[num_days],
- e_week_view_add_event, &add_event_data,
- e_cal_resolve_tzid_cb, comp_data->client,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+ e_cal_generate_instances_for_object (comp_data->client, comp_data->icalcomp,
+ week_view->day_starts[0],
+ week_view->day_starts[num_days],
+ e_week_view_add_event, &add_event_data);
g_object_unref (comp);
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index df5002f65e..0bc4deeb74 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2916,11 +2916,10 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
- e_cal_recur_generate_instances (comp, older_than, -1,
- (ECalRecurInstanceFn) check_instance_cb,
- &remove,
- (ECalRecurResolveTimezoneFn) e_cal_resolve_tzid_cb,
- client, priv->zone);
+ e_cal_generate_instances_for_object (client, m->data,
+ older_than, -1,
+ (ECalRecurInstanceFn) check_instance_cb,
+ &remove);
/* FIXME Better error handling */
if (remove)
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index fa80dd2c39..2009302d2c 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -214,14 +214,13 @@ tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp, ECal *client, icalti
g_print ("DateNavigator generating instances\n");
#endif
if (comp_is_on_server) {
- e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- e_cal_resolve_tzid_cb,
- client, c.zone);
+ e_cal_generate_instances_for_object (ecal, e_cal_component_get_icalcomponent (comp),
+ c.start_time, c.end_time,
+ tag_calendar_cb, &c);
} else {
e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- resolve_tzid_cb,
- client, c.zone);
+ tag_calendar_cb, &c,
+ resolve_tzid_cb,
+ client, c.zone);
}
}