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 | |
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')
-rw-r--r-- | shell/ChangeLog | 19 | ||||
-rw-r--r-- | shell/Evolution-ShellComponent.idl | 6 | ||||
-rw-r--r-- | shell/evolution-shell-component.c | 53 | ||||
-rw-r--r-- | shell/evolution-shell-component.h | 8 |
4 files changed, 80 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index b7a34a5964..42bae1096b 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,9 +1,28 @@ +2001-01-12 Ettore Perazzoli <ettore@ximian.com> + + * evolution-shell-component.c: Add member `copy_folder_fn' to + `EvolutionShellComponentPrivate'. + (init): Init to NULL. + (impl_ShellComponent_async_copy_folder): New function, + implementation for `::asyncCopyFolder'. + (evolution_shell_component_construct): New arg @copy_folder_fn. + Set the corresponding member in `EvolutionShellComponentPrivate'. + (evolution_shell_component_new): New arg @copy_folder_fn. Pass it + to `evolution_shell_component_construct'. + + * evolution-shell-component.h: New type + `EvolutionShellComponentCopyFolderFn'. + 2001-01-12 Miguel de Icaza <miguel@gnu.org> * e-splash.c (e_splash_construct): Remove nice toplevel window. 2001-01-12 Ettore Perazzoli <ettore@helixcode.com> + * Evolution-ShellComponent.idl: Add method `::removeFolderAsync'. + +2001-01-12 Ettore Perazzoli <ettore@ximian.com> + * evolution-shell-component.c (corba_class_init): s/addFolderAsync/createFolderAsync/. diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index bd98e5ed46..4c9624e815 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -57,6 +57,12 @@ module Evolution { in string physical_uri) raises (Busy); + void copyFolderAsync (in ShellComponentListener listener, + in string source_physical_uri, + in string destination_physical_uri, + in boolean remove_source) + raises (Busy); + void populateFolderContextMenu (in Bonobo::UIContainer uih, in string physical_uri, in string type); 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); diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index 8b627deebe..ffa3b44ff1 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -87,6 +87,12 @@ typedef void (* EvolutionShellComponentRemoveFolderFn) (EvolutionShellComponent const char *physical_uri, const GNOME_Evolution_ShellComponentListener listener, void *closure); +typedef void (* EvolutionShellComponentCopyFolderFn) (EvolutionShellComponent *shell_component, + const char *source_physical_uri, + const char *destination_physical_uri, + gboolean remove_source, + const GNOME_Evolution_ShellComponentListener listener, + void *closure); typedef void (* EvolutionShellComponentPopulateFolderContextMenu) (EvolutionShellComponent *shell_component, BonoboUIComponent *uic, const char *physical_uri, @@ -124,12 +130,14 @@ void evolution_shell_component_construct (EvolutionShellCom EvolutionShellComponentCreateViewFn create_view_fn, EvolutionShellComponentCreateFolderFn create_folder_fn, EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentCopyFolderFn copy_folder_fn, EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn, void *closure); EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], EvolutionShellComponentCreateViewFn create_view_fn, EvolutionShellComponentCreateFolderFn create_folder_fn, EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentCopyFolderFn copy_folder_fn, EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn, void *closure); EvolutionShellClient *evolution_shell_component_get_owner (EvolutionShellComponent *shell_component); |