aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-16 03:10:45 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-16 03:10:45 +0800
commite3b786b5cf25c44e31d21019e7805b7674a33967 (patch)
treef0078615d455a4c920ff16a7bcc1337aec5a3c23 /mail/mail-callbacks.c
parent8e32b41a50e99502fb22c26c0b5de575fecc99b4 (diff)
downloadgsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar.gz
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar.bz2
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar.lz
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar.xz
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.tar.zst
gsoc2013-evolution-e3b786b5cf25c44e31d21019e7805b7674a33967.zip
Add support for copying messages
svn path=/trunk/; revision=4845
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 7850f9826c..2156145d59 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -370,13 +370,14 @@ forward_msg (GtkWidget *widget, gpointer user_data)
composer);
}
-void
-move_msg (GtkWidget *widget, gpointer user_data)
+static void
+transfer_msg (GtkWidget *widget, gpointer user_data, gboolean delete_from_source)
{
FolderBrowser *fb = user_data;
MessageList *ml = fb->message_list;
GPtrArray *uids;
char *uri, *physical, *path;
+ char *desc;
const char *allowed_types[] = { "mail", NULL };
extern EvolutionShellClient *global_shell_client;
static char *last = NULL;
@@ -384,8 +385,13 @@ move_msg (GtkWidget *widget, gpointer user_data)
if (last == NULL)
last = g_strdup ("");
+ if (delete_from_source)
+ desc = _("Move message(s) to");
+ else
+ desc = _("Copy message(s) to");
+
evolution_shell_client_user_select_folder (global_shell_client,
- _("Move message(s) to"),
+ desc,
last, allowed_types, &uri, &physical);
if (!uri)
return;
@@ -399,7 +405,19 @@ move_msg (GtkWidget *widget, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (ml, enumerate_msg, uids);
- mail_do_refile_messages (ml->folder, uids, physical);
+ mail_do_transfer_messages (ml->folder, uids, delete_from_source, physical);
+}
+
+void
+move_msg (GtkWidget *widget, gpointer user_data)
+{
+ transfer_msg (widget, user_data, TRUE);
+}
+
+void
+copy_msg (GtkWidget *widget, gpointer user_data)
+{
+ transfer_msg (widget, user_data, FALSE);
}
void