From c94074f354a6d8a2de9a7c623a79130b3d10e338 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 16 Mar 2004 16:56:01 +0000 Subject: New function to return a description of the async drop operation. Fixes 2004-03-16 Jeffrey Stedfast * em-folder-tree.c (emft_drop_async_desc): New function to return a description of the async drop operation. Fixes bug #54808. svn path=/trunk/; revision=25090 --- mail/ChangeLog | 5 +++++ mail/em-folder-tree.c | 28 +++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index a46a285cf7..148f75eef7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2004-03-16 Jeffrey Stedfast + + * em-folder-tree.c (emft_drop_async_desc): New function to return + a description of the async drop operation. Fixes bug #54808. + 2004-03-15 Jeffrey Stedfast * em-utils.c (reply_to_message): If the mail_get_message() async diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index c992cc9eb5..cb9de25d7e 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -841,6 +841,32 @@ emft_drop_text_uri_list(struct _DragDataReceivedAsync *m, CamelFolder *dest) } } +static char * +emft_drop_async_desc (struct _mail_msg *mm, int done) +{ + struct _DragDataReceivedAsync *m = (struct _DragDataReceivedAsync *) mm; + CamelURL *url; + char *buf; + + if (m->info == DND_DROP_TYPE_FOLDER) { + url = camel_url_new (m->selection.folder, NULL); + + if (m->move) + buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1); + else + buf = g_strdup_printf (_("Copying folder %s"), url->fragment ? url->fragment : url->path + 1); + + camel_url_free (url); + + return buf; + } else { + if (m->move) + return g_strdup_printf (_("Moving messages into folder %s"), m->full_name); + else + return g_strdup_printf (_("Copying messages into folder %s"), m->full_name); + } +} + static void emft_drop_async_drop (struct _mail_msg *mm) { @@ -916,7 +942,7 @@ emft_drop_async_free (struct _mail_msg *mm) } static struct _mail_msg_op emft_drop_async_op = { - NULL, + emft_drop_async_desc, emft_drop_async_drop, emft_drop_async_done, emft_drop_async_free, -- cgit v1.2.3