From 7395fd6ba14d1267ec54719687d461ac7707f8fb Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 15 Jun 2001 21:40:12 +0000 Subject: Implemented. 2001-06-15 Jeffrey Stedfast * component-factory.c (destination_folder_handle_drop): Implemented. * message-list.c (message_list_construct): Don't connect to the DnD signals here. (message_list_drag_data_get): Removed. (add_uid): Removed. * folder-browser.c (my_folder_browser_init): Connect to DnD signals. (message_list_drag_data_get): Implemented. svn path=/trunk/; revision=10257 --- mail/component-factory.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index a4b95c30aa..de73ff269a 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -68,7 +68,7 @@ static GHashTable *storages_hash; static char *accepted_dnd_types[] = { "message/rfc822", /* if we drag from nautilus or something... */ - "x-evolution-folder-dnd", /* if we drag from an evolution folder... */ + "x-evolution-dnd", /* if we drag from an evolution folder... */ NULL }; @@ -345,19 +345,28 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol camel_object_unref (CAMEL_OBJECT (stream)); } else { /* x-evolution-dnd */ - char *uri, *in, *inptr, *inend; + char *url, *name, *in, *inptr, *inend; CamelFolder *source; GPtrArray *uids; - /* format is "uri uid1\0uid2\0uid3\0...\0uidn" */ + /* format: "url folder_name uid1\0uid2\0uid3\0...\0uidn" */ in = data->bytes._buffer; inend = in + data->bytes._length; inptr = strchr (in, ' '); - uri = g_strndup (data->bytes._buffer, inptr - in); - source = mail_tool_uri_to_folder (uri, NULL); - g_free (uri); + url = g_strndup (in, inptr - in); + + name = inptr + 1; + inptr = strchr (name, ' '); + name = g_strndup (name, inptr - name); + + source = mail_tool_get_folder_from_urlname (url, name, 0, NULL); + g_free (name); + g_free (url); + + if (!source) + return FALSE; /* split the uids */ inptr++; -- cgit v1.2.3