Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.752
diff -u -p -r1.752 ChangeLog
--- ChangeLog	21 Jul 2006 05:41:16 -0000	1.752
+++ ChangeLog	14 Aug 2006 08:47:37 -0000
@@ -1,3 +1,8 @@
+2006-08-03  Ushveen Kaur <kushveen@novell.com>
+
+	** Fix for bug #345415
+	* e-msg-composer.c: Set the name of the vcard attachment.
+	
 2006-07-20  Devashish Sharma   <sdevashish@novell.com>
 
 	** Fixes bug 273921
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.539
diff -u -p -r1.539 e-msg-composer.c
--- e-msg-composer.c	18 Jul 2006 09:19:23 -0000	1.539
+++ e-msg-composer.c	14 Aug 2006 08:47:38 -0000
@@ -3017,12 +3017,30 @@ drop_action(EMsgComposer *composer, GdkD
 	case DND_TYPE_TEXT_VCARD:
 	case DND_TYPE_TEXT_CALENDAR:
 		content_type = gdk_atom_name (selection->type);
-		d(printf ("dropping a %s\n", content_type));
+		printf ("dropping %s\n", content_type);
+ 		mime_part = camel_mime_part_new ();
+ 		camel_mime_part_set_content (mime_part, selection->data, selection->length, content_type);
 		
-		mime_part = camel_mime_part_new ();
-		camel_mime_part_set_content (mime_part, selection->data, selection->length, content_type);
-		camel_mime_part_set_disposition (mime_part, "inline");
+		if (info == DND_TYPE_TEXT_VCARD){
+			GList *attrs, *attr;
+			
+			attrs = e_vcard_get_attributes (E_VCARD (e_vcard_new_from_string((selection->data))));
+			for (attr = attrs; attr; attr=attr->next) {
+				EVCardAttribute *a = attr->data;
+				if (!strcmp ("FN", e_vcard_attribute_get_name (a))) {
+					GList *v = e_vcard_attribute_get_values (a);
+					if (v && v->data)
+						camel_mime_part_set_filename (mime_part, v->data);
+					g_list_free (v);
+				}
+				e_vcard_attribute_free (a);
+			}
+			g_list_free (attrs);
+			g_list_free (attr);
+		}
 		
+		camel_mime_part_set_disposition (mime_part, "inline");
+
 		e_attachment_bar_attach_mime_part (E_ATTACHMENT_BAR (p->attachment_bar), mime_part);
 		
 		camel_object_unref (mime_part);
