[evolution] Bug 751424 - [WeekView] Location added to Summary with inline editing
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 751424 - [WeekView] Location added to Summary with inline editing
- Date: Fri, 26 Jun 2015 12:33:14 +0000 (UTC)
commit 44dd35209575795b5b992012f1fab7d0bc731e4a
Author: Milan Crha <mcrha redhat com>
Date: Fri Jun 26 14:30:23 2015 +0200
Bug 751424 - [WeekView] Location added to Summary with inline editing
calendar/gui/e-week-view.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index d170226..b95094c 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -4398,7 +4398,7 @@ static void
e_week_view_on_editing_started (EWeekView *week_view,
GnomeCanvasItem *item)
{
- gint event_num, span_num;
+ gint event_num = -1, span_num = -1;
if (!e_week_view_find_event_from_item (week_view, item,
&event_num, &span_num))
@@ -4414,6 +4414,26 @@ e_week_view_on_editing_started (EWeekView *week_view,
week_view, event_num, span_num);
}
+ if (event_num != -1) {
+ EWeekViewEvent *event;
+ EWeekViewEventSpan *span;
+
+ if (is_array_index_in_bounds (week_view->events, event_num)) {
+ event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
+
+ if (is_comp_data_valid (event) &&
+ is_array_index_in_bounds (week_view->spans, event->spans_index + span_num)) {
+ span = &g_array_index (week_view->spans, EWeekViewEventSpan,
+ event->spans_index + span_num);
+
+ gnome_canvas_item_set (
+ span->text_item,
+ "text", icalcomponent_get_summary (event->comp_data->icalcomp),
+ NULL);
+ }
+ }
+ }
+
g_signal_emit_by_name (week_view, "selection_changed");
g_object_notify (G_OBJECT (week_view), "is-editing");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]