diff options
author | JP Rosevear <jpr@ximian.com> | 2001-01-24 04:58:23 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-01-24 04:58:23 +0800 |
commit | 34e6621ac12bc290cea08041e25b07f0ac3c51c9 (patch) | |
tree | 4b2326cfec7cfa6737b014f3f9436036f7df1d4d /calendar | |
parent | 5d7f815b3eede63ce843c7de7a3d2302c6b93586 (diff) | |
download | gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar.gz gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar.bz2 gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar.lz gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar.xz gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.tar.zst gsoc2013-evolution-34e6621ac12bc290cea08041e25b07f0ac3c51c9.zip |
libical import cleanup
2001-01-23 JP Rosevear <jpr@ximian.com>
* libical import cleanup
svn path=/trunk/; revision=7753
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 4 | ||||
-rw-r--r-- | calendar/cal-util/cal-component.c | 6 | ||||
-rw-r--r-- | calendar/cal-util/cal-recur.c | 2 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 10 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 4 | ||||
-rw-r--r-- | calendar/gui/calendar-model.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 32 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 16 | ||||
-rw-r--r-- | calendar/gui/event-editor.c | 8 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 4 | ||||
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 4 |
12 files changed, 52 insertions, 48 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8eadcfec22..8b2fc410db 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,9 @@ 2001-01-23 JP Rosevear <jpr@ximian.com> + * libical import cleanup + +2001-01-23 JP Rosevear <jpr@ximian.com> + * conduits/todo/todo-conduit.c (local_record_from_comp): properly ref the cal component when we use it, prevents double free diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c index 7b61aab7f5..100af1d77e 100644 --- a/calendar/cal-util/cal-component.c +++ b/calendar/cal-util/cal-component.c @@ -795,7 +795,7 @@ ensure_mandatory_properties (CalComponent *comp) struct icaltimetype t; tim = time (NULL); - t = icaltime_from_timet (tim, FALSE, TRUE); + t = icaltime_from_timet (tim, FALSE); priv->dtstamp = icalproperty_new_dtstamp (t); icalcomponent_add_property (priv->icalcomp, priv->dtstamp); @@ -3807,7 +3807,7 @@ void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger) { icalparameter *param; - union icaltriggertype t; + struct icaltriggertype t; gboolean relative; g_return_if_fail (alarm != NULL); @@ -3890,7 +3890,7 @@ cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trig void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger) { - union icaltriggertype t; + struct icaltriggertype t; icalparameter *param; icalparameter_value value_type; icalparameter_related related; diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c index 9b4a7f9ceb..0b4f114484 100644 --- a/calendar/cal-util/cal-recur.c +++ b/calendar/cal-util/cal-recur.c @@ -3733,7 +3733,7 @@ cal_recur_set_rule_end_date (icalproperty *prop, struct icaltimetype icaltime; const char *end_date_string, *xname; - icaltime = icaltime_from_timet (end_date, FALSE, TRUE); + icaltime = icaltime_from_timet (end_date, FALSE); value = icalvalue_new_datetime (icaltime); end_date_string = icalvalue_as_ical_string (value); icalvalue_free (value); diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 1df6a2c8fd..155813d65e 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -531,7 +531,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, { CalComponent *comp; struct Appointment appt; - struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE, TRUE), it; + struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE), it; struct icalrecurrencetype recur; int pos, i; CalComponentText summary = {NULL, NULL}; @@ -575,7 +575,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, } if (!is_empty_time (appt.begin)) { - it = icaltime_from_timet (mktime (&appt.begin), FALSE, TRUE); + it = icaltime_from_timet (mktime (&appt.begin), FALSE); dt.value = ⁢ cal_component_set_dtstart (comp, &dt); } @@ -584,11 +584,11 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, time_t t = mktime (&appt.begin); t = time_day_end (t); - it = icaltime_from_timet (t, FALSE, TRUE); + it = icaltime_from_timet (t, FALSE); dt.value = ⁢ cal_component_set_dtend (comp, &dt); } else if (!is_empty_time (appt.end)) { - it = icaltime_from_timet (mktime (&appt.end), FALSE, TRUE); + it = icaltime_from_timet (mktime (&appt.end), FALSE); dt.value = ⁢ cal_component_set_dtend (comp, &dt); } @@ -648,7 +648,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, if (!appt.repeatForever) { time_t t = mktime (&appt.repeatEnd); t = time_add_day (t, 1); - recur.until = icaltime_from_timet (t, FALSE, TRUE); + recur.until = icaltime_from_timet (t, FALSE); } list = g_slist_append (list, &recur); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 482737c4a5..f812532616 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -418,7 +418,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, { CalComponent *comp; struct ToDo todo; - struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE, TRUE); + struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE); CalComponentText summary = {NULL, NULL}; CalComponentDateTime dt = {NULL, NULL}; struct icaltimetype due; @@ -466,7 +466,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, } if (!is_empty_time (todo.due)) { - due = icaltime_from_timet (mktime (&todo.due), FALSE, TRUE); + due = icaltime_from_timet (mktime (&todo.due), FALSE); dt.value = &due; cal_component_set_due (comp, &dt); } diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 2ab801cdf3..3721366cf0 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -1004,7 +1004,7 @@ set_datetime (CalendarModel *model, CalComponent *comp, const char *value, CalComponentDateTime dt; struct icaltimetype itt; - itt = icaltime_from_timet (t, FALSE, TRUE); + itt = icaltime_from_timet (t, FALSE); dt.value = &itt; dt.tzid = NULL; @@ -2001,7 +2001,7 @@ ensure_task_complete (CalComponent *comp, } if (set_completed) { - new_completed = icaltime_from_timet (completed_date, FALSE, TRUE); + new_completed = icaltime_from_timet (completed_date, FALSE); cal_component_set_completed (comp, &new_completed); } diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index f58a9fbdb6..43a0f0265b 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -957,7 +957,7 @@ dialog_to_comp_object (TaskEditor *tedit) /* Due Date. */ t = e_date_edit_get_time (E_DATE_EDIT (priv->due_date)); if (t != -1) { - *date.value = icaltime_from_timet (t, FALSE, TRUE); + *date.value = icaltime_from_timet (t, FALSE); cal_component_set_due (comp, &date); } else { cal_component_set_due (comp, NULL); @@ -966,7 +966,7 @@ dialog_to_comp_object (TaskEditor *tedit) /* Start Date. */ t = e_date_edit_get_time (E_DATE_EDIT (priv->start_date)); if (t != -1) { - *date.value = icaltime_from_timet (t, FALSE, TRUE); + *date.value = icaltime_from_timet (t, FALSE); cal_component_set_dtstart (comp, &date); } else { cal_component_set_dtstart (comp, NULL); @@ -975,7 +975,7 @@ dialog_to_comp_object (TaskEditor *tedit) /* Completed Date. */ t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date)); if (t != -1) { - *date.value = icaltime_from_timet (t, FALSE, TRUE); + *date.value = icaltime_from_timet (t, FALSE); cal_component_set_completed (comp, date.value); } else { cal_component_set_completed (comp, NULL); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 9943e86066..059d477285 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -3088,10 +3088,10 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data) date.value = &itt; date.tzid = NULL; - *date.value = icaltime_from_timet (dtstart, FALSE, TRUE); + *date.value = icaltime_from_timet (dtstart, FALSE); cal_component_set_dtstart (comp, &date); - *date.value = icaltime_from_timet (dtend, FALSE, TRUE); + *date.value = icaltime_from_timet (dtend, FALSE); cal_component_set_dtend (comp, &date); cal_component_commit_sequence (comp); @@ -3140,7 +3140,7 @@ e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data) /* We must duplicate the CalComponent, or we won't know it has changed when we get the "update_event" callback. */ comp = cal_component_clone (event->comp); - cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE, TRUE)); + cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE)); if (!cal_client_update_object (day_view->client, comp)) g_message ("e_day_view_on_delete_occurrence(): Could not update the object!"); @@ -3199,7 +3199,7 @@ e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) instance. */ comp = cal_component_clone (event->comp); - cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE, TRUE)); + cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE)); /* For the unrecurred instance we duplicate the original object, create a new uid for it, get rid of the recurrence rules, and set @@ -3214,9 +3214,9 @@ e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) date.value = &itt; date.tzid = NULL; - *date.value = icaltime_from_timet (event->start, FALSE, TRUE); + *date.value = icaltime_from_timet (event->start, FALSE); cal_component_set_dtstart (new_comp, &date); - *date.value = icaltime_from_timet (event->end, FALSE, TRUE); + *date.value = icaltime_from_timet (event->end, FALSE); cal_component_set_dtend (new_comp, &date); /* Now update both CalComponents. Note that we do this last since at @@ -3742,11 +3742,11 @@ e_day_view_finish_long_event_resize (EDayView *day_view) if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) { dt = day_view->day_starts[day_view->resize_start_row]; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtstart (comp, &date); } else { dt = day_view->day_starts[day_view->resize_end_row + 1]; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtend (comp, &date); } @@ -3788,11 +3788,11 @@ e_day_view_finish_resize (EDayView *day_view) if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) { dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_start_row); - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtstart (comp, &date); } else { dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_end_row + 1); - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtend (comp, &date); } @@ -4852,10 +4852,10 @@ e_day_view_key_press (GtkWidget *widget, GdkEventKey *event) dt.value = &itt; dt.tzid = NULL; - *dt.value = icaltime_from_timet (dtstart, FALSE, TRUE); + *dt.value = icaltime_from_timet (dtstart, FALSE); cal_component_set_dtstart (comp, &dt); - *dt.value = icaltime_from_timet (dtend, FALSE, TRUE); + *dt.value = icaltime_from_timet (dtend, FALSE); cal_component_set_dtend (comp, &dt); /* We add the event locally and start editing it. When we get the @@ -6366,13 +6366,13 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget, date.tzid = NULL; dt = day_view->day_starts[day] + start_offset * 60; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtstart (comp, &date); if (end_offset == -1 || end_offset == 0) dt = day_view->day_starts[day + num_days]; else dt = day_view->day_starts[day + num_days - 1] + end_offset * 60; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtend (comp, &date); gtk_drag_finish (context, TRUE, TRUE, time); @@ -6470,10 +6470,10 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget, date.tzid = NULL; dt = e_day_view_convert_grid_position_to_time (day_view, day, row) + start_offset * 60; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtstart (comp, &date); dt = e_day_view_convert_grid_position_to_time (day_view, day, row + num_rows) - end_offset * 60; - *date.value = icaltime_from_timet (dt, FALSE, TRUE); + *date.value = icaltime_from_timet (dt, FALSE); cal_component_set_dtend (comp, &date); gtk_drag_finish (context, TRUE, TRUE, time); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 99d639688a..a8675944c7 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3170,9 +3170,9 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event) date.value = &itt; date.tzid = NULL; - *date.value = icaltime_from_timet (dtstart, FALSE, TRUE); + *date.value = icaltime_from_timet (dtstart, FALSE); cal_component_set_dtstart (comp, &date); - *date.value = icaltime_from_timet (dtend, FALSE, TRUE); + *date.value = icaltime_from_timet (dtend, FALSE); cal_component_set_dtend (comp, &date); /* We add the event locally and start editing it. We don't send the @@ -3286,11 +3286,11 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data) date.tzid = NULL; dt = week_view->day_starts[week_view->selection_start_day]; - *date.value = icaltime_from_timet (dt, TRUE, TRUE); + *date.value = icaltime_from_timet (dt, TRUE); cal_component_set_dtstart (comp, &date); dt = week_view->day_starts[week_view->selection_end_day + 1]; - *date.value = icaltime_from_timet (dt, TRUE, TRUE); + *date.value = icaltime_from_timet (dt, TRUE); cal_component_set_dtend (comp, &date); cal_component_commit_sequence (comp); @@ -3344,7 +3344,7 @@ e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data) when we get the "update_event" callback. */ comp = cal_component_clone (event->comp); - cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE, TRUE)); + cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE)); if (!cal_client_update_object (week_view->client, comp)) g_message ("e_week_view_on_delete_occurrence(): Could not update the object!"); @@ -3400,7 +3400,7 @@ e_week_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) /* For the recurring object, we add a exception to get rid of the instance. */ comp = cal_component_clone (event->comp); - cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE, TRUE)); + cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE)); /* For the unrecurred instance we duplicate the original object, create a new uid for it, get rid of the recurrence rules, and set @@ -3415,9 +3415,9 @@ e_week_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) date.value = &itt; date.tzid = NULL; - *date.value = icaltime_from_timet (event->start, TRUE, TRUE); + *date.value = icaltime_from_timet (event->start, TRUE); cal_component_set_dtstart (new_comp, &date); - *date.value = icaltime_from_timet (event->end, TRUE, TRUE); + *date.value = icaltime_from_timet (event->end, TRUE); cal_component_set_dtend (new_comp, &date); /* Now update both CalComponents. Note that we do this last since at diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c index 46ed3d0051..b05e6a38ea 100644 --- a/calendar/gui/event-editor.c +++ b/calendar/gui/event-editor.c @@ -2162,7 +2162,7 @@ simple_recur_to_comp_object (EventEditor *ee, CalComponent *comp) r.until = icaltime_from_timet ( e_date_edit_get_time (E_DATE_EDIT (priv->recurrence_ending_date_edit)), - TRUE, TRUE); + TRUE); break; case ENDING_FOREVER: @@ -2231,7 +2231,7 @@ recur_to_comp_object (EventEditor *ee, CalComponent *comp) cdt->tzid = NULL; tim = gtk_clist_get_row_data (exception_list, i); - *cdt->value = icaltime_from_timet (*tim, FALSE, TRUE); + *cdt->value = icaltime_from_timet (*tim, FALSE); list = g_slist_prepend (list, cdt); } @@ -2296,7 +2296,7 @@ dialog_to_comp_object (EventEditor *ee, CalComponent *comp) t = e_date_edit_get_time (E_DATE_EDIT (priv->start_time)); if (t != -1) { - *date.value = icaltime_from_timet (t, FALSE, TRUE); + *date.value = icaltime_from_timet (t, FALSE); cal_component_set_dtstart (comp, &date); } else { /* FIXME: What do we do here? */ @@ -2310,7 +2310,7 @@ dialog_to_comp_object (EventEditor *ee, CalComponent *comp) if (all_day_event) t = time_day_end (t); - *date.value = icaltime_from_timet (t, FALSE, TRUE); + *date.value = icaltime_from_timet (t, FALSE); cal_component_set_dtend (comp, &date); } else { /* FIXME: What do we do here? */ diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3cd835680d..b8b90ba0c2 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1173,10 +1173,10 @@ gnome_calendar_new_appointment (GnomeCalendar *gcal) comp = cal_component_new (); cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT); - itt = icaltime_from_timet (dtstart, FALSE, TRUE); + itt = icaltime_from_timet (dtstart, FALSE); cal_component_set_dtstart (comp, &dt); - itt = icaltime_from_timet (dtend, FALSE, TRUE); + itt = icaltime_from_timet (dtend, FALSE); cal_component_set_dtend (comp, &dt); cal_component_commit_sequence (comp); diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 623031fa69..87d8ec3891 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -981,7 +981,7 @@ compute_alarm_range (CalComponent *comp, GList *alarm_uids, time_t start, time_t case CAL_ALARM_TRIGGER_RELATIVE_START: case CAL_ALARM_TRIGGER_RELATIVE_END: dur = &trigger.u.rel_duration; - dur_time = icaldurationtype_as_timet (*dur); +/* dur_time = icaldurationtype_as_timet (*dur); */ if (dur->is_neg) *alarm_end = MAX (*alarm_end, end + dur_time); @@ -1042,7 +1042,7 @@ add_alarm_occurrences_cb (CalComponent *comp, time_t start, time_t end, gpointer continue; dur = &trigger.u.rel_duration; - dur_time = icaldurationtype_as_timet (*dur); +/* dur_time = icaldurationtype_as_timet (*dur); */ if (trigger.type == CAL_ALARM_TRIGGER_RELATIVE_START) occur_time = start; |