From 465b7b48eeca4921cf82cb6432cfbd9a4acca3d2 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 8 May 2000 18:39:16 +0000 Subject: call e_day_view_stop_editing_event here to avoid a divide by zero a bit * gui/e-day-view.c (e_day_view_on_delete_appointment): call e_day_view_stop_editing_event here to avoid a divide by zero a bit further on. i'm not sure if this is the best fix for this. svn path=/trunk/; revision=2922 --- calendar/ChangeLog | 6 ++++++ calendar/gui/e-day-view.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 29a917a70c..9173314f41 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2000-05-08 Seth Alves + + * gui/e-day-view.c (e_day_view_on_delete_appointment): call + e_day_view_stop_editing_event here to avoid a divide by zero + a bit further on. i'm not sure if this is the best fix for this. + 2000-05-08 Federico Mena Quintero * pcs/cal-backend.h (CalBackendClass): CalBackendClass now is just diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 43db86972f..15b0ea805f 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2376,6 +2376,9 @@ e_day_view_on_delete_appointment (GtkWidget *widget, gpointer data) if (event == NULL) return; + if (day_view->editing_event_day >= 0) + e_day_view_stop_editing_event (day_view); + gnome_calendar_remove_object (day_view->calendar, event->ico); } @@ -4284,6 +4287,9 @@ e_day_view_get_event_position (EDayView *day_view, start_col = event->start_row_or_col; num_columns = event->num_columns; + if (cols_in_row == 0) + return FALSE; + /* If the event is being resize, use the resize position. */ if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE && day_view->resize_event_day == day -- cgit v1.2.3