diff options
author | Milan Crha <mcrha@redhat.com> | 2009-07-27 23:54:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-29 00:23:11 +0800 |
commit | 7bebc31932e74db65e3720f32ab2f6664fd9e58b (patch) | |
tree | 7d6c3d335d99f9f82e46af0ff0b910e6420d7ae1 /calendar/gui/e-week-view.c | |
parent | e119ae2938fb1e3b41191fe958857c4b8f414a32 (diff) | |
download | gsoc2013-evolution-7bebc31932e74db65e3720f32ab2f6664fd9e58b.tar.gz gsoc2013-evolution-7bebc31932e74db65e3720f32ab2f6664fd9e58b.tar.zst gsoc2013-evolution-7bebc31932e74db65e3720f32ab2f6664fd9e58b.zip |
Bug #245829 - Cannot copy (with mouse for pasting) appointment summary
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 29 |
1 files changed, 29 insertions, 0 deletions
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; } |