diff options
author | Jason Leach <jleach@ximian.com> | 2001-06-24 02:58:02 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-06-24 02:58:02 +0800 |
commit | 602fee638e44de17ddd438d9327d7087c72bc41d (patch) | |
tree | 76cdfcd168da4271276778bf86dd9ee5ce95d9a5 /shell/evolution-shell-component-client.c | |
parent | 657ab7270a6901e48ba36ae30760dac5a12e7186 (diff) | |
download | gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar.gz gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar.bz2 gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar.lz gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar.xz gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.tar.zst gsoc2013-evolution-602fee638e44de17ddd438d9327d7087c72bc41d.zip |
(Implemented deleting folders in the shell. Files changed that aren't
(Implemented deleting folders in the shell. Files changed that aren't
noted below were simply small indentation/space changes. To play
with deleting folders, right click on a selected folder in the folder
tree, then choose Delete.)
2001-06-23 Jason Leach <jleach@ximian.com>
* e-shell-folder-selection-dialog.c
(e_shell_folder_selection_dialog_construct): Make the folder tree
have a similar expanded state as the shell's folder tree.
* e-local-storage.c (remove_folder): New function that does the
meat of actual deletion stuff.
(remove_folder_directory): A helper function that remove_folder()
uses.
(component_async_remove_folder_callback): A new callback to do the
removing stuff from shell (if there weren't errors from the
component).
(impl_async_remove_folder): Implemented this.
* evolution-shell-component-client.c
(evolution_shell_component_client_async_remove_folder):
Implemented this.
* e-shell-view.c (e_shell_view_remove_control_for_uri): New
function.
svn path=/trunk/; revision=10446
Diffstat (limited to 'shell/evolution-shell-component-client.c')
-rw-r--r-- | shell/evolution-shell-component-client.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index 7a7b44ccc8..c85eb4a299 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -655,7 +655,45 @@ evolution_shell_component_client_async_remove_folder (EvolutionShellComponentCli EvolutionShellComponentClientCallback callback, void *data) { - /* FIXME to do. */ + 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 (physical_uri != NULL); + g_return_if_fail (callback != 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_removeFolderAsync (corba_shell_component, + priv->listener_interface, + physical_uri, + &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 |