aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-11-20 05:22:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-11-20 05:22:12 +0800
commitdc497cb36bd6b3b00752195bfc6cfebfb11a1a7a (patch)
tree18179a15653a7d8ad2993682facd7767970e8c3d /mail/em-folder-tree.c
parent23a30c833da72e2ab2b1287b5a7101e9a7aadc8f (diff)
downloadgsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.tar.gz
gsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.tar.zst
gsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.zip
Same.
2003-11-19 Jeffrey Stedfast <fejj@ximian.com> * em-utils.c (em_utils_selection_set_urilist): Same. * em-format-html-display.c (efhd_drag_data_get): Same as below. * em-folder-tree.c (drag_text_uri_list): Terminate each url of a text/uri-list with a \r\n. svn path=/trunk/; revision=23451
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 79c2ba0bd3..fc3de1f8ea 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -698,7 +698,7 @@ drag_text_uri_list (EMFolderTree *emft, CamelFolder *src, GtkSelectionData *sele
const char *tmpdir;
CamelStore *store;
GPtrArray *uids;
- char *url;
+ GString *url;
if (!(tmpdir = e_mkdtemp ("drag-n-drop-XXXXXX"))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -707,12 +707,13 @@ drag_text_uri_list (EMFolderTree *emft, CamelFolder *src, GtkSelectionData *sele
return;
}
- url = g_strdup_printf ("mbox:%s", tmpdir);
- if (!(store = camel_session_get_store (session, url, ex))) {
+ url = g_string_new ("mbox:");
+ g_string_append (url, tmpdir);
+ if (!(store = camel_session_get_store (session, url->str, ex))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not create temporary mbox store: %s"),
camel_exception_get_description (ex));
- g_free (url);
+ g_string_free (url, TRUE);
return;
}
@@ -723,7 +724,7 @@ drag_text_uri_list (EMFolderTree *emft, CamelFolder *src, GtkSelectionData *sele
camel_exception_get_description (ex));
camel_object_unref (store);
- g_free (url);
+ g_string_free (url, TRUE);
return;
}
@@ -737,13 +738,15 @@ drag_text_uri_list (EMFolderTree *emft, CamelFolder *src, GtkSelectionData *sele
_("Could not copy messages to temporary mbox folder: %s"),
camel_exception_get_description (ex));
} else {
- memcpy (url, "file", 4);
- gtk_selection_data_set (selection, selection->target, 8, url, strlen (url));
+ /* replace "mbox:" with "file:" */
+ memcpy (url->str, "file", 4);
+ g_string_append (url, "\r\n");
+ gtk_selection_data_set (selection, selection->target, 8, url->str, url->len);
}
camel_folder_free_uids (src, uids);
camel_object_unref (dest);
- g_free (url);
+ g_string_free (url, TRUE);
}
static gboolean