From 5fadb311e670e53e35c8cfd637c70d57ed497fb1 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 29 Aug 2000 17:00:36 +0000 Subject: Use event_editor_set_event_object 2000-08-29 JP Rosevear * gui/gnome-cal.c (gnome_calendar_edit_object): Use event_editor_set_event_object * gui/event-editor.c (event_editor_set_event_object): Rename from event_editor_set_ical_object * gui/event-editor.h: Update prototype * gui/e-week-view.c (e_week_view_on_new_appointment): Call cal_component_commit_sequence after event changes. Default to these being all day events. svn path=/trunk/; revision=5097 --- calendar/gui/e-week-view.c | 6 ++++-- calendar/gui/event-editor.c | 8 ++++---- calendar/gui/event-editor.h | 2 +- calendar/gui/gnome-cal.c | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 4c5eb5d142..ffaaddb3e5 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2757,13 +2757,15 @@ 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, FALSE, FALSE); + *date.value = icaltime_from_timet (dt, TRUE, FALSE); cal_component_set_dtstart (comp, &date); dt = week_view->day_starts[week_view->selection_end_day + 1]; - *date.value = icaltime_from_timet (dt, FALSE, FALSE); + *date.value = icaltime_from_timet (dt, TRUE, FALSE); cal_component_set_dtend (comp, &date); + cal_component_commit_sequence (comp); + gnome_calendar_edit_object (week_view->calendar, comp); gtk_object_unref (GTK_OBJECT (comp)); } diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c index 260b76d94e..b5a0322af1 100644 --- a/calendar/gui/event-editor.c +++ b/calendar/gui/event-editor.c @@ -260,8 +260,8 @@ event_editor_destroy (GtkObject *object) } if (priv->comp) { - /* We do not emit the "ical_object_released" signal here. If - * the user cloased the dialog box, then it has already been + /* We do not emit the "released_event_object" signal here. If + * the user closed the dialog box, then it has already been * released. If the application just destroyed the event * editor, then it had better clean up after itself. */ @@ -1530,14 +1530,14 @@ event_editor_new (void) } /** - * event_editor_set_ical_object: + * event_editor_set_event_object: * @ee: An event editor. * @comp: A calendar object. * * Sets the calendar object that an event editor dialog will manipulate. **/ void -event_editor_set_ical_object (EventEditor *ee, CalComponent *comp) +event_editor_set_event_object (EventEditor *ee, CalComponent *comp) { EventEditorPrivate *priv; char *title; diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h index 244d8bb6e6..1a61934766 100644 --- a/calendar/gui/event-editor.h +++ b/calendar/gui/event-editor.h @@ -63,7 +63,7 @@ EventEditor *event_editor_construct (EventEditor *ee); EventEditor *event_editor_new (void); -void event_editor_set_ical_object (EventEditor *ee, CalComponent *comp); +void event_editor_set_event_object (EventEditor *ee, CalComponent *comp); void event_editor_focus (EventEditor *ee); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index ee5215164a..c767ae59eb 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1388,7 +1388,7 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp) gtk_signal_connect (GTK_OBJECT (ee), "editor_closed", GTK_SIGNAL_FUNC (editor_closed_cb), gcal); - event_editor_set_ical_object (EVENT_EDITOR (ee), comp); + event_editor_set_event_object (EVENT_EDITOR (ee), comp); } event_editor_focus (ee); -- cgit v1.2.3