From a37c55760048564773e65bc3b94e9c52406ca403 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 30 Jul 2007 10:01:20 +0000 Subject: 2007-07-30 mcrha Fix for bug #343716 svn path=/trunk/; revision=33898 --- calendar/gui/dialogs/memo-page.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 6f2d1af20f..816144042c 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -634,32 +634,30 @@ memo_page_fill_component (CompEditorPage *page, ECalComponent *comp) e_cal_component_set_description_list (comp, NULL); } else { - int idxToUse = -1, nstr = strlen(str); - gboolean foundNL = FALSE; + int idxToUse = 1; GSList l; ECalComponentText text, sumText; - char *txt; - - for(i = 0; i 50){ - sumText.value = txt = g_strndup(str, 50); - } - else{ - sumText.value = txt = g_strdup(str); - } - } - else{ - sumText.value = txt = g_strndup(str, idxToUse); /* cuts off '\n' */ - } - + + if (p) + idxToUse = p - str; + + if (i == 50 && uc && uc < (gunichar)-2) + sumText.value = txt = g_strdup_printf ("%.*s...", idxToUse, str); + else + sumText.value = txt = g_strndup(str, idxToUse); + sumText.altrep = NULL; text.value = str; -- cgit