From f342817e88f4e598b7962d94d497c408c45a8107 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 26 Mar 2001 18:55:41 +0000 Subject: Finish the DnD stuff by implementing move/copy on the shell side as well. Now we should just need to implement the corresponding bits in the components... svn path=/trunk/; revision=8949 --- shell/evolution-shell-component-client.c | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'shell/evolution-shell-component-client.c') diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index a3d1f1ea69..d177cf2577 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -574,6 +574,14 @@ evolution_shell_component_client_async_create_folder (EvolutionShellComponentCli physical_uri, type, &ev); + if (ev._major != CORBA_NO_EXCEPTION && priv->callback != NULL) { + (* callback) (shell_component_client, + shell_component_result_from_corba_exception (ev), + data); + priv->callback = NULL; + priv->callback_data = NULL; + } + CORBA_exception_free (&ev); } @@ -586,6 +594,58 @@ evolution_shell_component_client_async_remove_folder (EvolutionShellComponentCli /* FIXME to do. */ } +void +evolution_shell_component_client_async_xfer_folder (EvolutionShellComponentClient *shell_component_client, + const char *source_physical_uri, + const char *destination_physical_uri, + gboolean remove_source, + EvolutionShellComponentClientCallback callback, + void *data) +{ + EvolutionShellComponentClientPrivate *priv; + GNOME_Evolution_ShellComponent corba_shell_component; + CORBA_Environment ev; + + g_return_if_fail (shell_component_client != NULL); + g_return_if_fail (EVOLUTION_IS_SHELL_COMPONENT_CLIENT (shell_component_client)); + g_return_if_fail (source_physical_uri != NULL); + g_return_if_fail (destination_physical_uri != NULL); + g_return_if_fail (data != NULL); + + priv = shell_component_client->priv; + + if (priv->callback != NULL) { + (* callback) (shell_component_client, EVOLUTION_SHELL_COMPONENT_BUSY, data); + return; + } + + create_listener_interface (shell_component_client); + + CORBA_exception_init (&ev); + + corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)); + + priv->callback = callback; + priv->callback_data = data; + + GNOME_Evolution_ShellComponent_xferFolderAsync (corba_shell_component, + priv->listener_interface, + source_physical_uri, + destination_physical_uri, + remove_source, + &ev); + + if (ev._major != CORBA_NO_EXCEPTION && priv->callback != NULL) { + (* callback) (shell_component_client, + shell_component_result_from_corba_exception (ev), + data); + priv->callback = NULL; + priv->callback_data = NULL; + } + + CORBA_exception_free (&ev); +} + void evolution_shell_component_client_populate_folder_context_menu (EvolutionShellComponentClient *shell_component_client, BonoboUIComponent *uih, -- cgit v1.2.3