diff options
| author | Rodrigo Moya <rodrigo@ximian.com> | 2004-01-06 13:17:16 +0000 |
|---|---|---|
| committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-01-06 13:17:16 +0000 |
| commit | 9a8cb0c8e7c1eddd980ea4cdb57b5c1bae18028b (patch) | |
| tree | d89a2b9724b0fa5aa05d4e9ad479bb89c0fcaabc | |
| parent | 88535b08fd55c2cdb6e6af0dbd21be6b4f5cd77a (diff) | |
| download | evolution-data-server-9a8cb0c8e7c1eddd980ea4cdb57b5c1bae18028b.tar.gz | |
the list returned by e_cal_get_object_list() contains icalcomponent's
2004-01-06 Rodrigo Moya <rodrigo@ximian.com>
* libecal/e-cal.c (build_component_alarms_list): the list returned
by e_cal_get_object_list() contains icalcomponent's already,
so no need to parse them as strings.
(e_cal_open): fixed warning.
| -rw-r--r-- | calendar/ChangeLog | 7 | ||||
| -rw-r--r-- | calendar/backends/file/e-cal-backend-file.c | 2 | ||||
| -rw-r--r-- | calendar/libecal/e-cal.c | 14 |
3 files changed, 13 insertions, 10 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7d2270fdd..9c6de2e61 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2004-01-06 Rodrigo Moya <rodrigo@ximian.com> + + * libecal/e-cal.c (build_component_alarms_list): the list returned + by e_cal_get_object_list() contains icalcomponent's already, + so no need to parse them as strings. + (e_cal_open): fixed warning. + 2004-01-05 Rodrigo Moya <rodrigo@ximian.com> * backends/groupwise/e-gw-message.[ch] diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c index fa61a89fc..49dbbcc2f 100644 --- a/calendar/backends/file/e-cal-backend-file.c +++ b/calendar/backends/file/e-cal-backend-file.c @@ -1884,7 +1884,7 @@ e_cal_backend_file_remove_object (ECalBackendSync *backend, EDataCal *cal, priv->comp = g_list_remove (priv->comp, comp); e_cal_util_remove_instances (e_cal_component_get_icalcomponent (comp), - icaltime_from_string (rid), mod); + icaltime_from_string (rid), mod); /* now remove all detached instances */ rrdata.cbfile = cbfile; diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 17fba8c63..7b4e9e79c 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -1364,7 +1364,8 @@ e_cal_open (ECal *ecal, gboolean only_if_exists, GError **error) CORBA_Environment ev; ECalendarStatus status; ECalendarOp *our_op; - const char *username = NULL, *password = NULL; + const char *username = NULL; + char *password = NULL; g_return_val_if_fail (ecal != NULL, FALSE); g_return_val_if_fail (E_IS_CAL (ecal), FALSE); @@ -2686,22 +2687,17 @@ build_component_alarms_list (ECal *ecal, GList *object_list, time_t start, time_ for (l = object_list; l != NULL; l = l->next) { ECalComponent *comp; ECalComponentAlarms *alarms; - icalcomponent *icalcomp; ECalComponentAlarmAction omit[] = {-1}; - icalcomp = icalparser_parse_string (l->data); - if (!icalcomp) - continue; - comp = e_cal_component_new (); - if (!e_cal_component_set_icalcomponent (comp, icalcomp)) { - icalcomponent_free (icalcomp); + if (!e_cal_component_set_icalcomponent (comp, (icalcomponent *) l->data)) { + icalcomponent_free (l->data); g_object_unref (G_OBJECT (comp)); continue; } alarms = e_cal_util_generate_alarms_for_comp (comp, start, end, omit, e_cal_resolve_tzid_cb, - icalcomp, ecal->priv->default_zone); + l->data, ecal->priv->default_zone); if (alarms) comp_alarms = g_slist_prepend (comp_alarms, alarms); } |
