diff options
-rw-r--r-- | calendar/gui/e-day-view.c | 15 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 29 |
2 files changed, 42 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 7e7e5f7624..56233da889 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -3129,8 +3129,10 @@ e_day_view_on_long_event_click (EDayView *day_view, /* Ignore clicks on the EText while editing. */ if (pos == E_CALENDAR_VIEW_POS_EVENT - && E_TEXT (event->canvas_item)->editing) + && E_TEXT (event->canvas_item)->editing) { + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)bevent); return; + } if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) || !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) @@ -3200,8 +3202,10 @@ e_day_view_on_event_click (EDayView *day_view, /* Ignore clicks on the EText while editing. */ if (pos == E_CALENDAR_VIEW_POS_EVENT - && E_TEXT (event->canvas_item)->editing) + && E_TEXT (event->canvas_item)->editing) { + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)bevent); return; + } if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) || !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) @@ -3603,6 +3607,9 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget, gdk_window_set_cursor (widget->window, cursor); } + if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) { + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)mevent); + } } return FALSE; @@ -3707,6 +3714,10 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget, day_view->last_cursor_set_in_main_canvas = cursor; gdk_window_set_cursor (widget->window, cursor); } + + if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) { + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)mevent); + } } return FALSE; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index bfa2ad780f..4c3b940b4f 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2201,6 +2201,28 @@ e_week_view_get_span_position (EWeekView *week_view, } static gboolean +ewv_pass_gdkevent_to_etext (EWeekView *week_view, GdkEvent *gevent) +{ + g_return_val_if_fail (week_view != NULL, FALSE); + g_return_val_if_fail (gevent != NULL, FALSE); + + if (week_view->editing_event_num != -1 && week_view->editing_span_num != -1) { + EWeekViewEvent *event; + EWeekViewEventSpan *span; + + event = &g_array_index (week_view->events, EWeekViewEvent, week_view->editing_event_num); + span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + week_view->editing_span_num); + + if (span->text_item && E_IS_TEXT (span->text_item)) { + GNOME_CANVAS_ITEM_GET_CLASS (span->text_item)->event (span->text_item, gevent); + return TRUE; + } + } + + return FALSE; +} + +static gboolean e_week_view_on_button_press (GtkWidget *widget, GdkEventButton *event, EWeekView *week_view) @@ -2222,6 +2244,9 @@ e_week_view_on_button_press (GtkWidget *widget, if (day == -1) return FALSE; + if (ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)event)) + return TRUE; + /* If an event is pressed just return. */ if (week_view->pressed_event_num != -1) return FALSE; @@ -2288,6 +2313,8 @@ e_week_view_on_button_release (GtkWidget *widget, if (week_view->selection_drag_pos != E_WEEK_VIEW_DRAG_NONE) { week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; gdk_pointer_ungrab (event->time); + } else { + ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)event); } return FALSE; @@ -2354,6 +2381,8 @@ e_week_view_on_motion (GtkWidget *widget, return TRUE; } + ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)mevent); + return FALSE; } |