aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-27 23:54:45 +0800
committerMilan Crha <mcrha@redhat.com>2009-07-27 23:54:45 +0800
commitf2de8f314001d607eb3ec174ad45eacd98acb749 (patch)
tree6a9f13fad0f4afcaedc1ae723a8f994547772daa /calendar/gui
parentc9f8c3ba925139249e80a251a6758351d0bff0b5 (diff)
downloadgsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar.gz
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar.bz2
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar.lz
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar.xz
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.tar.zst
gsoc2013-evolution-f2de8f314001d607eb3ec174ad45eacd98acb749.zip
Bug #245829 - Cannot copy (with mouse for pasting) appointment summary
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c15
-rw-r--r--calendar/gui/e-week-view.c29
2 files changed, 42 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 6928a7e3ef..209196ce81 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3130,8 +3130,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))
@@ -3201,8 +3203,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))
@@ -3602,6 +3606,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;
@@ -3706,6 +3713,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 2d5c80996b..abf18ccd1d 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2130,6 +2130,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)
@@ -2151,6 +2173,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;
@@ -2217,6 +2242,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;
@@ -2283,6 +2310,8 @@ e_week_view_on_motion (GtkWidget *widget,
return TRUE;
}
+ ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)mevent);
+
return FALSE;
}