aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-cal-component-memo-preview.c9
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,5 +1,12 @@
2007-08-23 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #347770
+
+ * gui/e-cal-component-memo-preview.c: (write_html):
+ Improved description text parsing.
+
+2007-08-23 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #355864
* gui/e-week-view.c: (e_week_view_remove_event_cb):
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, "<TD>");
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, "<BR>", 4);
}