aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChyla Zbigniew <chyla@src.gnome.org>2001-10-15 02:17:38 +0800
committerChyla Zbigniew <chyla@src.gnome.org>2001-10-15 02:17:38 +0800
commitf618c258e13386998997886fd7fcd20dc4ea2276 (patch)
tree895cfe6dc7c63928bb02c3517bd754bfe5b34a4c
parent9aa2b4c40f3e3a1214ceedbcf3fb20d4ea8a01ee (diff)
downloadgsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar.gz
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar.bz2
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar.lz
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar.xz
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.tar.zst
gsoc2013-evolution-f618c258e13386998997886fd7fcd20dc4ea2276.zip
Made temporary buffer for strftime much bigger (it was too small for
* e-summary-calendar.c (generate_html): Made temporary buffer for strftime much bigger (it was too small for Polish month names), added missing colon and conversion to UTF-8. svn path=/trunk/; revision=13669
-rw-r--r--my-evolution/ChangeLog6
-rw-r--r--my-evolution/e-summary-calendar.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index db4607bb8c..e5c917a5ea 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-14 Zbigniew Chyla <cyba@gnome.pl>
+
+ * e-summary-calendar.c (generate_html): Made temporary buffer for
+ strftime much bigger (it was too small for Polish month names), added
+ missing colon and conversion to UTF-8.
+
2001-10-12 Iain Holmes <iain@ximian.com>
* component-factory.c (component_factory_init): Fix message.
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
index d8c913ed82..34dcdf1506 100644
--- a/my-evolution/e-summary-calendar.c
+++ b/my-evolution/e-summary-calendar.c
@@ -352,18 +352,17 @@ generate_html (gpointer data)
CalComponentText text;
time_t start_t;
struct tm *start_tm;
- char *start_str, *img;
+ char start_str[64], *start_str_utf, *img;
event = uidarray->pdata[i];
cal_component_get_summary (event->comp, &text);
start_t = icaltime_as_timet (*event->dt.value);
- start_str = g_new (char, 20);
start_tm = localtime (&start_t);
if (calendar->wants24hr == TRUE) {
- strftime (start_str, 19, _("%k%M %d %B"), start_tm);
+ strftime (start_str, sizeof start_str, _("%k:%M %d %B"), start_tm);
} else {
- strftime (start_str, 19, _("%l:%M %d %B"), start_tm);
+ strftime (start_str, sizeof start_str, _("%l:%M %d %B"), start_tm);
}
if (cal_component_has_alarms (event->comp)) {
@@ -376,12 +375,13 @@ generate_html (gpointer data)
img = "new_appointment.xpm";
}
+ start_str_utf = e_utf8_from_locale_string (start_str);
tmp = g_strdup_printf ("<img align=\"middle\" src=\"%s\" "
"alt=\"\" width=\"16\" height=\"16\"> &#160; "
"<font size=\"-1\"><a href=\"calendar:/%s\">%s, %s</a></font><br>",
img,
- event->uid, start_str, text.value);
- g_free (start_str);
+ event->uid, start_str_utf, text.value);
+ g_free (start_str_utf);
g_string_append (string, tmp);
g_free (tmp);