From c2dde9ab64a79b483804cddbd9622827b4b2baf2 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Mon, 8 May 2000 16:37:31 +0000 Subject: don't set the ico->uid to NULL or we won't find any other occurrences of 2000-05-08 Damon Chaplin * gui/e-week-view.c (e_week_view_remove_event_cb): * gui/e-day-view.c (e_day_view_remove_event_cb): don't set the ico->uid to NULL or we won't find any other occurrences of the event. Set the editing_event_day/num to -1 instead. * gui/e-week-view-event-item.c (e_week_view_event_item_draw): fixed the positioning of the icons for long events. * cal-util/calobj.c (ical_object_normalize_summary): forgot to terminate the string. svn path=/trunk/; revision=2920 --- calendar/ChangeLog | 13 +++++++++++++ calendar/cal-util/calobj.c | 1 + calendar/gui/e-day-view.c | 9 +++++---- calendar/gui/e-week-view-event-item.c | 2 +- calendar/gui/e-week-view.c | 10 +++++----- 5 files changed, 25 insertions(+), 10 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f988de511d..4c1f5810cb 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2000-05-08 Damon Chaplin + + * gui/e-week-view.c (e_week_view_remove_event_cb): + * gui/e-day-view.c (e_day_view_remove_event_cb): don't set the ico->uid + to NULL or we won't find any other occurrences of the event. Set the + editing_event_day/num to -1 instead. + + * gui/e-week-view-event-item.c (e_week_view_event_item_draw): fixed the + positioning of the icons for long events. + + * cal-util/calobj.c (ical_object_normalize_summary): forgot to + terminate the string. + 2000-05-07 Damon Chaplin * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c index 4ea3b495b0..5ef1f1bb5f 100644 --- a/calendar/cal-util/calobj.c +++ b/calendar/cal-util/calobj.c @@ -1793,4 +1793,5 @@ ical_object_normalize_summary (iCalObject *ico) just_output_space = FALSE; } } + *dest = '\0'; } diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 3e5054b9f7..43db86972f 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1298,10 +1298,11 @@ e_day_view_remove_event_cb (EDayView *day_view, event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); - /* We set the event's uid to NULL so we don't try to update it in - on_editing_stopped(). */ - g_free (event->ico->uid); - event->ico->uid = NULL; + /* If we were editing this event, set editing_event_num to -1 so + on_editing_stopped doesn't try to update the event. */ + if (day_view->editing_event_day == day + && day_view->editing_event_num == event_num) + day_view->editing_event_day = -1; if (event->canvas_item) gtk_object_destroy (GTK_OBJECT (event->canvas_item)); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 55c5e48b85..c50acabadf 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -467,7 +467,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, /* Draw the icons. */ if (span->text_item) { - icon_x = span->text_item->x1; + icon_x = span->text_item->x1 - x; e_week_view_event_item_draw_icons (wveitem, drawable, icon_x, icon_y, x2, TRUE); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 6b75b409ba..0665a6e63d 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1136,11 +1136,11 @@ e_week_view_remove_event_cb (EWeekView *week_view, event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - /* We set the event's uid to NULL so we don't try to update it in - on_editing_stopped(). */ - g_free (event->ico->uid); - event->ico->uid = NULL; - + /* If we were editing this event, set editing_event_num to -1 so + on_editing_stopped doesn't try to update the event. */ + if (week_view->editing_event_num == event_num) + week_view->editing_event_num = -1; + /* We leave the span elements in the array, but set the canvas item pointers to NULL. */ for (span_num = 0; span_num < event->num_spans; span_num++) { -- cgit