aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2006-09-30 16:55:08 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2006-09-30 16:55:08 +0800
commite48ad51294669149b66859cc5b8c571c656ccb18 (patch)
tree219e0c26fadff9d66dea648be9f613a2ce98912c
parentddb6f950982909e873f770f2c4312e46037f3f87 (diff)
downloadgsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar.gz
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar.bz2
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar.lz
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar.xz
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.tar.zst
gsoc2013-evolution-e48ad51294669149b66859cc5b8c571c656ccb18.zip
Fixes #343369 Set the filename as email followed the number of the
2006-09-30 Chenthill Palanisamy <pchenthill@novell.com> Fixes #343369 * gui/dialogs/comp-editor.c: (attach_message), (drop_action): Set the filename as email followed the number of the attachment. svn path=/trunk/; revision=32835
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/dialogs/comp-editor.c20
2 files changed, 25 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 8a57266b06..e3a05fec1a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-30 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #343369
+ * gui/dialogs/comp-editor.c: (attach_message), (drop_action):
+ Set the filename as email followed the number of the attachment.
+
2006-09-28 Ushveen Kaur <kushveen@novell.com>
** Fixes bug #261082
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 83a1f09d40..9bd5021049 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -199,6 +199,8 @@ attach_message(CompEditor *editor, CamelMimeMessage *msg)
{
CamelMimePart *mime_part;
const char *subject;
+ guint i;
+ char *filename = NULL;
mime_part = camel_mime_part_new();
camel_mime_part_set_disposition(mime_part, "inline");
@@ -210,11 +212,17 @@ attach_message(CompEditor *editor, CamelMimeMessage *msg)
g_free(desc);
} else
camel_mime_part_set_description(mime_part, _("Attached message"));
-
+
+ i = e_attachment_bar_get_num_attachments (E_ATTACHMENT_BAR (editor->priv->attachment_bar));
+ i++;
+ filename = g_strdup_printf ("email%d",i);
+ camel_mime_part_set_filename (mime_part, filename);
+
camel_medium_set_content_object((CamelMedium *)mime_part, (CamelDataWrapper *)msg);
camel_mime_part_set_content_type(mime_part, "message/rfc822");
e_attachment_bar_attach_mime_part(E_ATTACHMENT_BAR(editor->priv->attachment_bar), mime_part);
camel_object_unref(mime_part);
+ g_free (filename);
}
struct _drop_data {
@@ -358,10 +366,13 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
} else {
CamelMultipart *mp = camel_multipart_new();
char *desc;
+ char *filename = NULL;
+ guint num;
camel_data_wrapper_set_mime_type((CamelDataWrapper *)mp, "multipart/digest");
camel_multipart_set_boundary(mp, NULL);
for (i=0;i<uids->len;i++) {
+
msg = camel_folder_get_message(folder, uids->pdata[i], &ex);
if (msg) {
mime_part = camel_mime_part_new();
@@ -382,10 +393,17 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
desc = g_strdup_printf(ngettext("Attached message", "%d attached messages", uids->len), uids->len);
camel_mime_part_set_description(mime_part, desc);
g_free(desc);
+
+ num = e_attachment_bar_get_num_attachments (E_ATTACHMENT_BAR (editor->priv->attachment_bar));
+ num++;
+ filename = g_strdup_printf ("email%d", num);
+ camel_mime_part_set_filename (mime_part, filename);
+
e_attachment_bar_attach_mime_part
(E_ATTACHMENT_BAR(editor->priv->attachment_bar), mime_part);
camel_object_unref(mime_part);
camel_object_unref(mp);
+ g_free (filename);
}
success = TRUE;
delete = action == GDK_ACTION_MOVE;