aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-06-16 05:40:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-06-16 05:40:12 +0800
commit7395fd6ba14d1267ec54719687d461ac7707f8fb (patch)
treeaee5d69a1aec941182074bc5627776f4abc1f101 /mail/component-factory.c
parentf0d0478ea1e4f44df4743554808ff04d887b3038 (diff)
downloadgsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar.gz
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar.bz2
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar.lz
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar.xz
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.tar.zst
gsoc2013-evolution-7395fd6ba14d1267ec54719687d461ac7707f8fb.zip
Implemented.
2001-06-15 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c21
1 files changed, 15 insertions, 6 deletions
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++;