gsize
modest_text_utils_strftime(char *s, gsize max, const char *fmt, time_t timet)
{
- static GDate date;
+ struct tm tm;
+/* static GDate date; */
/* does not work on old maemo glib:
* g_date_set_time_t (&date, timet);
*/
- g_date_set_time (&date, (GTime) timet);
+/* g_date_set_time (&date, (GTime) timet); */
+ localtime_r (&timet, &tm);
- return g_date_strftime (s, max, fmt, (const GDate*) &date);
+/* return g_date_strftime (s, max, fmt, (const GDate*) &date); */
+ return strftime(s, max, fmt, &tm);
}
gchar *
/* if this is today, get the time instead of the date */
if (strcmp (date_buf, now_buf) == 0)
- modest_text_utils_strftime (date_buf, BUF_SIZE, "%H:%M:%P", date);
+ modest_text_utils_strftime (date_buf, BUF_SIZE, "%H:%M %P", date);
return g_strdup(date_buf);
}
set_common_flags (GtkCellRenderer *renderer, TnyHeaderFlags flags)
{
g_object_set (G_OBJECT(renderer),
- "weight", (flags & TNY_HEADER_FLAG_SEEN) ? 400: 800,
+ "weight", (flags & TNY_HEADER_FLAG_SEEN) ? PANGO_WEIGHT_NORMAL: PANGO_WEIGHT_ULTRABOLD,
"strikethrough", (flags & TNY_HEADER_FLAG_DELETED) ? TRUE:FALSE,
NULL);
}