aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-03 09:38:45 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-03 09:38:45 +0800
commit36765e48f24ad968a2bda97e7ee2056d9b91a4da (patch)
tree02019ab3fa399e944e0b0bc31cb96693eb03991d /mail/component-factory.c
parentd3cd60c2a009985c88175881d95880f8e524a768 (diff)
downloadgsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar.gz
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar.bz2
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar.lz
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar.xz
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.tar.zst
gsoc2013-evolution-36765e48f24ad968a2bda97e7ee2056d9b91a4da.zip
Updated for the mail_transfer_messages API.
2001-07-02 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (transfer_msg): Updated for the mail_transfer_messages API. * folder-browser.c (message_list_drag_data_recieved): Update for the mail_transfer_messages API. (selection_received): Same. * mail-ops.c (mail_transfer_messages): Renamed from mail_do_transfer_messages and also added a callback/data arguments since we need it component_factory::xfer_folder. * component-factory.c (xfer_folder): Use mail_transfer_messages instead. (destination_folder_handle_drop): Update to pass in a NULL callback arg and a NULL data argument to mail_transfer_messages. svn path=/trunk/; revision=10710
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index f568734921..149159faf6 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -232,13 +232,13 @@ remove_folder (EvolutionShellComponent *shell_component,
}
static void
-do_xfer_folder (char *src_uri, char *dest_uri, gboolean remove_source, CamelFolder *dest_folder, void *data)
+do_xfer_folder (gboolean ok, void *data)
{
GNOME_Evolution_ShellComponentListener listener = data;
GNOME_Evolution_ShellComponentListener_Result result;
CORBA_Environment ev;
- if (dest_folder)
+ if (ok)
result = GNOME_Evolution_ShellComponentListener_OK;
else
result = GNOME_Evolution_ShellComponentListener_INVALID_URI;
@@ -258,12 +258,24 @@ xfer_folder (EvolutionShellComponent *shell_component,
void *closure)
{
CORBA_Environment ev;
+ CamelFolder *source;
+ CamelException ex;
+ GPtrArray *uids;
+
+ camel_exception_init (&ex);
+ source = mail_tool_uri_to_folder (source_physical_uri, &ex);
+ camel_exception_clear (&ex);
CORBA_exception_init (&ev);
- mail_xfer_folder (source_physical_uri, destination_physical_uri, remove_source, do_xfer_folder,
- CORBA_Object_duplicate (listener, &ev));
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_OK, &ev);
+ if (source) {
+ uids = camel_folder_get_uids (source);
+ mail_transfer_messages (source, uids, remove_source, destination_physical_uri,
+ do_xfer_folder,
+ CORBA_Object_duplicate (listener, &ev));
+
+ GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_OK, &ev);
+ } else
+ GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_INVALID_URI, &ev);
CORBA_exception_free (&ev);
}
@@ -446,9 +458,9 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
inptr++;
}
- mail_do_transfer_messages (source, uids,
- action == GNOME_Evolution_ShellComponentDnd_ACTION_MOVE,
- physical_uri);
+ mail_transfer_messages (source, uids,
+ action == GNOME_Evolution_ShellComponentDnd_ACTION_MOVE,
+ physical_uri, NULL, NULL);
camel_object_unref (CAMEL_OBJECT (source));
break;