From 181da374bb47aea71fc2de35cb5044589b919f2b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 23 Aug 2007 11:55:04 +0000 Subject: 2007-08-23 mcrha Fix for bug #347770 svn path=/trunk/; revision=34073 --- calendar/ChangeLog | 7 +++++++ calendar/gui/e-cal-component-memo-preview.c | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ce4db1d611..1a6d88698a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2007-08-23 Milan Crha + + ** Fix for bug #347770 + + * gui/e-cal-component-memo-preview.c: (write_html): + Improved description text parsing. + 2007-08-23 Milan Crha ** Fix for bug #355864 diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c index 4ae6854a27..9a0a8c854b 100644 --- a/calendar/gui/e-cal-component-memo-preview.c +++ b/calendar/gui/e-cal-component-memo-preview.c @@ -227,11 +227,14 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gtk_html_stream_printf (stream, ""); for (node = l; node != NULL; node = node->next) { - gint i, j; - GString *string = g_string_new (NULL); + gint i, j, len; + GString *string; text = * (ECalComponentText *) node->data; - for (i = 0, j=0; i < strlen (text.value ? text.value : 0); i++, j++) { + len = (text.value ? strlen (text.value) : 0); + string = g_string_sized_new (len + 1); + + for (i = 0, j=0; i < len; i++, j++) { if (text.value[i] == '\n'){ string = g_string_append_len (string, "
", 4); } -- cgit