From e562721c90b84a425ffcf230e802da0a3e751599 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 10 Jan 2008 11:32:41 +0000 Subject: ** Fix for bug #457842 2008-01-10 Milan Crha ** Fix for bug #457842 * gui/e-week-view-event-item.c: (e_week_view_event_item_double_click): * gui/e-week-view.c: (e_week_view_start_editing_event): Do not call edit/start editing of the event when double clicked on the same component as is actually editing. * gui/calendar-commands.c: (gcal_calendar_selection_changed_cb): Removed forgotten printf call. svn path=/trunk/; revision=34789 --- calendar/gui/e-week-view.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'calendar/gui/e-week-view.c') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 0c3ca360ad..c7004cbbd1 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2943,6 +2943,14 @@ e_week_view_start_editing_event (EWeekView *week_view, if (!span->text_item) return FALSE; + if (week_view->editing_event_num >= 0) { + EWeekViewEvent *editing = &g_array_index (week_view->events, EWeekViewEvent, week_view->editing_event_num); + + /* do not change to other part of same component - the event is spread into more days */ + if (editing && event && editing->comp_data == event->comp_data) + return FALSE; + } + if (initial_text) { gnome_canvas_item_set (span->text_item, "text", initial_text, @@ -2960,6 +2968,9 @@ e_week_view_start_editing_event (EWeekView *week_view, event = &g_array_index (week_view->events, EWeekViewEvent, event_num); if (event_num >= week_view->events->len || event->comp_data != comp_data) { + /* When got in because of other comp_data, then be sure we go through all events */ + event_num = week_view->events->len; + /* Unfocussing can cause a removal but not a new * addition so just run backwards through the * events */ -- cgit v1.2.3