diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-01-13 05:00:21 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-01-13 05:00:21 +0800 |
commit | 936a6d77ddf54813096e2ecbe55b824b5ae80c4c (patch) | |
tree | dafa161b1c69c081506db43bdbffe0f7d66894f3 /shell/evolution-shell-component.c | |
parent | 9c6f86a43dd17e08ea6ec275a5bbf52ace9d879b (diff) | |
download | gsoc2013-evolution-936a6d77ddf54813096e2ecbe55b824b5ae80c4c.tar.gz gsoc2013-evolution-936a6d77ddf54813096e2ecbe55b824b5ae80c4c.tar.zst gsoc2013-evolution-936a6d77ddf54813096e2ecbe55b824b5ae80c4c.zip |
Add an ::asyncCopyFolder method to the ShellComponent interface. Move
all the message hiding options to the View menu.
svn path=/trunk/; revision=7456
Diffstat (limited to 'shell/evolution-shell-component.c')
-rw-r--r-- | shell/evolution-shell-component.c | 53 |
1 files changed, 47 insertions, 6 deletions
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 89b4eb0b0f..a426c60375 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -43,6 +43,7 @@ struct _EvolutionShellComponentPrivate { EvolutionShellComponentCreateViewFn create_view_fn; EvolutionShellComponentCreateFolderFn create_folder_fn; EvolutionShellComponentRemoveFolderFn remove_folder_fn; + EvolutionShellComponentCopyFolderFn copy_folder_fn; EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn; EvolutionShellClient *owner_client; @@ -234,8 +235,8 @@ impl_ShellComponent_async_create_folder (PortableServer_Servant servant, if (priv->create_folder_fn == NULL) { GNOME_Evolution_ShellComponentListener_notifyResult (listener, - GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, - ev); + GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, + ev); return; } @@ -258,8 +259,8 @@ impl_ShellComponent_async_remove_folder (PortableServer_Servant servant, if (priv->remove_folder_fn == NULL) { GNOME_Evolution_ShellComponentListener_notifyResult (listener, - GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, - ev); + GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, + ev); return; } @@ -267,6 +268,37 @@ impl_ShellComponent_async_remove_folder (PortableServer_Servant servant, } static void +impl_ShellComponent_async_copy_folder (PortableServer_Servant servant, + const GNOME_Evolution_ShellComponentListener listener, + const CORBA_char *source_physical_uri, + const CORBA_char *destination_physical_uri, + const CORBA_boolean remove_source, + CORBA_Environment *ev) +{ + BonoboObject *bonobo_object; + EvolutionShellComponent *shell_component; + EvolutionShellComponentPrivate *priv; + + bonobo_object = bonobo_object_from_servant (servant); + shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); + priv = shell_component->priv; + + if (priv->copy_folder_fn == NULL) { + GNOME_Evolution_ShellComponentListener_notifyResult (listener, + GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, + ev); + return; + } + + (* priv->copy_folder_fn) (shell_component, + source_physical_uri, + destination_physical_uri, + remove_source, + listener, + priv->closure); +} + +static void impl_ShellComponent_populate_folder_context_menu (PortableServer_Servant servant, const Bonobo_UIContainer corba_uih, const CORBA_char *physical_uri, @@ -405,6 +437,7 @@ init (EvolutionShellComponent *shell_component) priv->create_view_fn = NULL; priv->create_folder_fn = NULL; priv->remove_folder_fn = NULL; + priv->copy_folder_fn = NULL; priv->populate_folder_context_menu_fn = NULL; priv->owner_client = NULL; @@ -421,6 +454,7 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component, EvolutionShellComponentCreateViewFn create_view_fn, EvolutionShellComponentCreateFolderFn create_folder_fn, EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentCopyFolderFn copy_folder_fn, EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn, void *closure) { @@ -437,6 +471,7 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component, priv->create_view_fn = create_view_fn; priv->create_folder_fn = create_folder_fn; priv->remove_folder_fn = remove_folder_fn; + priv->copy_folder_fn = copy_folder_fn; priv->populate_folder_context_menu_fn = populate_folder_context_menu_fn; priv->closure = closure; @@ -465,6 +500,7 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty EvolutionShellComponentCreateViewFn create_view_fn, EvolutionShellComponentCreateFolderFn create_folder_fn, EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentCopyFolderFn copy_folder_fn, EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn, void *closure) { @@ -479,8 +515,13 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty new = gtk_type_new (evolution_shell_component_get_type ()); corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_shell_component_construct (new, folder_types, corba_object, - create_view_fn, create_folder_fn, remove_folder_fn, + evolution_shell_component_construct (new, + folder_types, + corba_object, + create_view_fn, + create_folder_fn, + remove_folder_fn, + copy_folder_fn, populate_folder_context_menu_fn, closure); |