");
comp = camel_folder_get_message_user_tag(emf->folder, emf->uid, "completed-on");
iconpath = e_icon_factory_get_icon_filename (comp && comp[0] ? "stock_mail-flag-for-followup-done" : "stock_mail-flag-for-followup", GTK_ICON_SIZE_MENU);
if (iconpath) {
CamelMimePart *iconpart;
iconpart = em_format_html_file_part (
(EMFormatHTML *)emf, "image/png",
iconpath, cancellable);
g_free (iconpath);
if (iconpart) {
gchar *classid;
classid = g_strdup_printf (
"icon:///em-format-html-display/%s/%s",
emf->part_id->str,
comp && comp[0] ? "comp" : "uncomp");
g_string_append_printf (
buffer,
""
" | ",
classid);
(void) em_format_add_puri (
emf, sizeof (EMFormatPURI),
classid, iconpart, efhd_write_image);
g_free (classid);
g_object_unref (iconpart);
}
}
g_string_append (buffer, "");
if (comp && comp[0]) {
date = camel_header_decode_date (comp, NULL);
due_date_str = e_datetime_format_format (
"mail", "header", DTFormatKindDateTime, date);
g_string_append_printf (
buffer, "%s, %s %s",
flag, _("Completed on"),
due_date_str ? due_date_str : "???");
g_free (due_date_str);
} else if ((due = camel_folder_get_message_user_tag(emf->folder, emf->uid, "due-by")) != NULL && due[0]) {
time_t now;
date = camel_header_decode_date (due, NULL);
now = time (NULL);
if (now > date)
g_string_append_printf (
buffer,
"%s ",
_("Overdue:"));
due_date_str = e_datetime_format_format (
"mail", "header", DTFormatKindDateTime, date);
/* Translators: the "by" is part of the string,
* like "Follow-up by Tuesday, January 13, 2009" */
g_string_append_printf (
buffer, "%s %s %s",
flag, _("by"),
due_date_str ? due_date_str : "???");
g_free (due_date_str);
} else {
g_string_append (buffer, flag);
}
g_string_append (buffer, " |