calendar-server: Fetch default zone from client
We are already setting the default zone on the client, no need to pass it around. https://bugzilla.gnome.org/show_bug.cgi?id=748226
This commit is contained in:
parent
8994d53355
commit
0d862181f2
@ -377,10 +377,11 @@ calendar_appointment_free (CalendarAppointment *appointment)
|
|||||||
static void
|
static void
|
||||||
calendar_appointment_init (CalendarAppointment *appointment,
|
calendar_appointment_init (CalendarAppointment *appointment,
|
||||||
icalcomponent *ical,
|
icalcomponent *ical,
|
||||||
ECalClient *cal,
|
ECalClient *cal)
|
||||||
icaltimezone *default_zone)
|
|
||||||
{
|
{
|
||||||
const char *source_uid;
|
icaltimezone *default_zone;
|
||||||
|
|
||||||
|
default_zone = e_cal_client_get_default_timezone (cal);
|
||||||
|
|
||||||
appointment->uid = get_ical_uid (ical);
|
appointment->uid = get_ical_uid (ical);
|
||||||
appointment->rid = get_ical_rid (ical);
|
appointment->rid = get_ical_rid (ical);
|
||||||
@ -443,13 +444,15 @@ calendar_appointment_generate_occurrences (CalendarAppointment *appointment,
|
|||||||
icalcomponent *ical,
|
icalcomponent *ical,
|
||||||
ECalClient *cal,
|
ECalClient *cal,
|
||||||
time_t start,
|
time_t start,
|
||||||
time_t end,
|
time_t end)
|
||||||
icaltimezone *default_zone)
|
|
||||||
{
|
{
|
||||||
ECalComponent *ecal;
|
ECalComponent *ecal;
|
||||||
|
icaltimezone *default_zone;
|
||||||
|
|
||||||
g_assert (appointment->occurrences == NULL);
|
g_assert (appointment->occurrences == NULL);
|
||||||
|
|
||||||
|
default_zone = e_cal_client_get_default_timezone (cal);
|
||||||
|
|
||||||
ecal = e_cal_component_new ();
|
ecal = e_cal_component_new ();
|
||||||
e_cal_component_set_icalcomponent (ecal,
|
e_cal_component_set_icalcomponent (ecal,
|
||||||
icalcomponent_new_clone (ical));
|
icalcomponent_new_clone (ical));
|
||||||
@ -470,17 +473,13 @@ calendar_appointment_generate_occurrences (CalendarAppointment *appointment,
|
|||||||
|
|
||||||
static CalendarAppointment *
|
static CalendarAppointment *
|
||||||
calendar_appointment_new (icalcomponent *ical,
|
calendar_appointment_new (icalcomponent *ical,
|
||||||
ECalClient *cal,
|
ECalClient *cal)
|
||||||
icaltimezone *default_zone)
|
|
||||||
{
|
{
|
||||||
CalendarAppointment *appointment;
|
CalendarAppointment *appointment;
|
||||||
|
|
||||||
appointment = g_new0 (CalendarAppointment, 1);
|
appointment = g_new0 (CalendarAppointment, 1);
|
||||||
|
|
||||||
calendar_appointment_init (appointment,
|
calendar_appointment_init (appointment, ical, cal);
|
||||||
ical,
|
|
||||||
cal,
|
|
||||||
default_zone);
|
|
||||||
return appointment;
|
return appointment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,13 +695,12 @@ app_load_events (App *app)
|
|||||||
icalcomponent *ical = j->data;
|
icalcomponent *ical = j->data;
|
||||||
CalendarAppointment *appointment;
|
CalendarAppointment *appointment;
|
||||||
|
|
||||||
appointment = calendar_appointment_new (ical, cal, app->zone);
|
appointment = calendar_appointment_new (ical, cal);
|
||||||
calendar_appointment_generate_occurrences (appointment,
|
calendar_appointment_generate_occurrences (appointment,
|
||||||
ical,
|
ical,
|
||||||
cal,
|
cal,
|
||||||
app->since,
|
app->since,
|
||||||
app->until,
|
app->until);
|
||||||
app->zone);
|
|
||||||
g_hash_table_insert (app->appointments, g_strdup (appointment->uid), appointment);
|
g_hash_table_insert (app->appointments, g_strdup (appointment->uid), appointment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user