aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-03-17 00:56:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-03-17 00:56:01 +0800
commitc94074f354a6d8a2de9a7c623a79130b3d10e338 (patch)
tree1e9fbef71455268c6398a20f54d75e840a2b2edc /mail/em-folder-tree.c
parentfe91f0837c6d82b79f0ecffe43b621905e75a188 (diff)
downloadgsoc2013-evolution-c94074f354a6d8a2de9a7c623a79130b3d10e338.tar.gz
gsoc2013-evolution-c94074f354a6d8a2de9a7c623a79130b3d10e338.tar.zst
gsoc2013-evolution-c94074f354a6d8a2de9a7c623a79130b3d10e338.zip
New function to return a description of the async drop operation. Fixes
2004-03-16 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c28
1 files changed, 27 insertions, 1 deletions
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,