diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-07-09 04:27:28 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-07-09 04:27:28 +0800 |
commit | a11e7afc54918cc11c8dc476f52d8380351808bc (patch) | |
tree | 0127fe80ad6d8c51feaea0c40094d0fd7d6ced47 /calendar/gui/e-week-view.c | |
parent | e18a34da15866a9a2b201b3077991db69a2dc8d2 (diff) | |
download | gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar.gz gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar.bz2 gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar.lz gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar.xz gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.tar.zst gsoc2013-evolution-a11e7afc54918cc11c8dc476f52d8380351808bc.zip |
Fixes #300584
svn path=/trunk/; revision=33772
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index c52882a5e7..df3950c49b 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2722,15 +2722,16 @@ e_week_view_reshape_event_span (EWeekView *week_view, /* Create the text item if necessary. */ if (!span->text_item) { - ECalComponentText cal_text; + const gchar *summary; GtkWidget *widget; GdkColor color; + gboolean free_text = FALSE; widget = (GtkWidget *)week_view; color = e_week_view_get_text_color (week_view, event, widget); - - e_cal_component_get_summary (comp, &cal_text); + summary = e_calendar_view_get_icalcomponent_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text); + span->text_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root), e_text_get_type (), @@ -2738,12 +2739,15 @@ e_week_view_reshape_event_span (EWeekView *week_view, "clip", TRUE, "max_lines", 1, "editable", TRUE, - "text", cal_text.value ? cal_text.value : "", + "text", summary ? summary : "", "use_ellipsis", TRUE, "fill_color_gdk", &color, "im_context", E_CANVAS (week_view->main_canvas)->im_context, NULL); + if (free_text) + g_free ((gchar*)summary); + /* Uncomment once the pango fix is in if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) { @@ -2993,6 +2997,7 @@ cancel_editing (EWeekView *week_view) EWeekViewEvent *event; EWeekViewEventSpan *span; const gchar *summary; + gboolean free_text = FALSE; event_num = week_view->editing_event_num; span_num = week_view->editing_span_num; @@ -3004,9 +3009,12 @@ cancel_editing (EWeekView *week_view) /* Reset the text to what was in the component */ - summary = icalcomponent_get_summary (event->comp_data->icalcomp); + summary = e_calendar_view_get_icalcomponent_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text); g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL); + if (free_text) + g_free ((gchar*)summary); + /* Stop editing */ e_week_view_stop_editing_event (week_view); } |