From ddaa0af2ceba5de217424eeddfa3f650049ddfa1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 4 Sep 2002 16:05:35 +0000 Subject: Pass NULL as @unpopulate_folder_context_menu_fn to * gui/component/addressbook-component.c (create_component): Pass NULL as @unpopulate_folder_context_menu_fn to evolution_shell_component_new(). * gui/component-factory.c (create_object): Pass NULL as @unpopulate_folder_context_menu_fn to evolution_shell_component_new(). * mail-account-gui.c (mail_account_gui_save): Remove unused variable. * component-factory.c (unpopulate_folder_context_menu): New. (create_component): Pass it to evolution_shell_component_new(). * component-factory.c (create_component): Pass NULL as @unpopulate_folder_context_menu_fn to evolution_shell_component_new(). * e-storage-set-view.c (popup_folder_menu): Remove the context menu items using evolution_shell_component_client_unpopulate_folder_context_menu() instead of doing it ourself, since BonoboUI sucks. * evolution-shell-component-client.c (evolution_shell_component_client_unpopulate_folder_context_menu): New. * evolution-test-component.c (register_component): Pass NULL as @unpopulate_folder_context_menu_fn to evolution_shell_component_new(). * evolution-shell-component.c: New member unpopulate_folder_context_menu_fn in EvolutionShellComponentPrivate. New member uic in EvolutionShellComponentPrivate. (init): Init new members to NULL. (destroy): bonobo_object_unref() priv->uic if not NULL. (evolution_shell_component_new): New arg @unpopulate_folder_context_menu_fn. (evolution_shell_component_construct): Likewise. (impl_populateFolderContextMenu): Set priv->uic to the newly created UIComponent. (impl_unpopulateFolderContextMenu): New, implementation for the ::unpopulateFolderContextMenu CORBA method. (class_init): Install. * Evolution-ShellComponent.idl (unpopulateFolderContextMenu): New method. (AlreadyPopulated): New exception. (populateFolderContextMenu): Can raise it. (NotPopulated): New exception. svn path=/trunk/; revision=17963 --- shell/evolution-shell-component.h | 49 ++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'shell/evolution-shell-component.h') diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index 1689c59822..c162e1e8a6 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -103,6 +103,11 @@ typedef void (* EvolutionShellComponentPopulateFolderContextMenuFn) (EvolutionSh const char *physical_uri, const char *type, void *closure); +typedef void (* EvolutionShellComponentUnpopulateFolderContextMenuFn) (EvolutionShellComponent *shell_component, + BonoboUIComponent *uic, + const char *physical_uri, + const char *type, + void *closure); typedef char * (* EvolutionShellComponentGetDndSelectionFn) (EvolutionShellComponent *shell_component, const char *physical_uri, int type, @@ -166,27 +171,29 @@ struct _EvolutionShellComponentClass { GtkType evolution_shell_component_get_type (void); -void evolution_shell_component_construct (EvolutionShellComponent *shell_component, - const EvolutionShellComponentFolderType folder_types[], - const char *external_uri_schemas[], - EvolutionShellComponentCreateViewFn create_view_fn, - EvolutionShellComponentCreateFolderFn create_folder_fn, - EvolutionShellComponentRemoveFolderFn remove_folder_fn, - EvolutionShellComponentXferFolderFn xfer_folder_fn, - EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn, - EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn, - EvolutionShellComponentRequestQuitFn request_quit_fn, - void *closure); -EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], - const char *external_uri_schemas[], - EvolutionShellComponentCreateViewFn create_view_fn, - EvolutionShellComponentCreateFolderFn create_folder_fn, - EvolutionShellComponentRemoveFolderFn remove_folder_fn, - EvolutionShellComponentXferFolderFn xfer_folder_fn, - EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn, - EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn, - EvolutionShellComponentRequestQuitFn request_quit_fn, - void *closure); +void evolution_shell_component_construct (EvolutionShellComponent *shell_component, + const EvolutionShellComponentFolderType folder_types[], + const char *external_uri_schemas[], + EvolutionShellComponentCreateViewFn create_view_fn, + EvolutionShellComponentCreateFolderFn create_folder_fn, + EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentXferFolderFn xfer_folder_fn, + EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn, + EvolutionShellComponentUnpopulateFolderContextMenuFn unpopulate_folder_context_menu_fn, + EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn, + EvolutionShellComponentRequestQuitFn request_quit_fn, + void *closure); +EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], + const char *external_uri_schemas[], + EvolutionShellComponentCreateViewFn create_view_fn, + EvolutionShellComponentCreateFolderFn create_folder_fn, + EvolutionShellComponentRemoveFolderFn remove_folder_fn, + EvolutionShellComponentXferFolderFn xfer_folder_fn, + EvolutionShellComponentPopulateFolderContextMenuFn populate_folder_context_menu_fn, + EvolutionShellComponentUnpopulateFolderContextMenuFn unpopulate_folder_context_menu_fn, + EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn, + EvolutionShellComponentRequestQuitFn request_quit_fn, + void *closure); EvolutionShellClient *evolution_shell_component_get_owner (EvolutionShellComponent *shell_component); void evolution_shell_component_add_user_creatable_item (EvolutionShellComponent *shell_component, -- cgit v1.2.3