TnyMsg *new_msg = NULL;
TnyMimePart *body_part = NULL;
ModestFormatterPrivate *priv;
+ gchar *txt;
/* Build new part */
new_msg = modest_formatter_create_message (self, TRUE, TRUE, FALSE);
/* Create the two parts */
priv = MODEST_FORMATTER_GET_PRIVATE (self);
- construct_from_text (body_part, "", priv->content_type);
+ txt = modest_text_utils_cite ("", priv->content_type, priv->signature,
+ NULL, tny_header_get_date_sent (header));
+ construct_from_text (body_part, txt, priv->content_type);
+ g_free (txt);
g_object_unref (body_part);
if (msg) {
ModestFormatterPrivate *priv = MODEST_FORMATTER_GET_PRIVATE (self);
priv->content_type = NULL;
+ priv->signature = NULL;
}
static void
GList *node = NULL;
gchar *result = NULL;
gchar *from;
-
+
/* First we need a GList of attachments filenames */
for (node = attachments; node != NULL; node = g_list_next (node)) {
TnyMimePart *part = (TnyMimePart *) node->data;
g_object_unref (header);
} else {
filename = g_strdup (tny_mime_part_get_filename (part));
- if ((filename == NULL)||(filename[0] == '\0'))
+ if ((filename == NULL)||(filename[0] == '\0')) {
+ g_free (filename);
filename = g_strdup ("");
+ }
}
- filenames = g_list_append (filenames, filename);
+ filenames = g_list_prepend (filenames, filename);
}
- filenames = g_list_reverse (filenames);
/* TODO: get 80 from the configuration */
from = tny_header_dup_from (header);