From 45fd1767502d711d72087cae76c3d1acd7f46066 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 30 Sep 2002 18:41:05 +0000 Subject: Calls e_shell_command_remove_shared_folder. (file_verbs): Set up * e-shell-view-menu.c (command_remove_other_users_folder): Calls e_shell_command_remove_shared_folder. (file_verbs): Set up command_remove_other_users_folder. * e-shell-folder-commands.c (e_shell_command_remove_shared_folder): New. Calls e_storage_set_async_remove_shared_folder with a callback to pop up an error dialog if it fails. * e-storage-set.c (e_storage_set_async_remove_shared_folder): Implement. Mostly like async_remove_folder. * e-storage.c (e_storage_supports_shared_folders, e_storage_async_discover_shared_folder, e_storage_async_remove_shared_folder): New methods. Default implementations return FALSE, NOTIMPLEMENTED, and NOTIMPLEMENTED. * e-corba-storage.c (supports_shared_folders, async_discover_shared_folder, async_remove_shared_folder): Implement using CORBA. * Evolution-Storage.idl: add Storage_asyncRemoveSharedFolder * e-shell-shared-folder-picker-dialog.c: Remove all the CORBA stuff from here and use the new EStorage methods. (setup_server_option_menu): Use e_storage_supports_shared_folders. (discover_folder): Use e_storage_async_discover_shared_folder. * evolution-storage.c (impl_Storage_asyncRemoveSharedFolder): Implement this by emitting a REMOVE_SHARED_FOLDER signal. (impl_Storage_asyncDiscoverSharedFolder): Make the DISCOVER_SHARED_FOLDER signal put the Bonobo_Listener first like all the other signals do. (class_init): Set up REMOVE_SHARED_FOLDER signal. svn path=/trunk/; revision=18265 --- shell/evolution-storage.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'shell/evolution-storage.c') diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index e5d63404ab..141feff758 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -83,6 +83,7 @@ enum { UPDATE_FOLDER, OPEN_FOLDER, DISCOVER_SHARED_FOLDER, + REMOVE_SHARED_FOLDER, SHOW_FOLDER_PROPERTIES, LAST_SIGNAL @@ -501,7 +502,25 @@ impl_Storage_asyncDiscoverSharedFolder (PortableServer_Servant servant, obj_dup = CORBA_Object_duplicate (listener, ev); gtk_signal_emit (GTK_OBJECT (storage), signals[DISCOVER_SHARED_FOLDER], - user, folder_name, obj_dup); + obj_dup, user, folder_name); +} + +static void +impl_Storage_asyncRemoveSharedFolder (PortableServer_Servant servant, + const CORBA_char *path, + const Bonobo_Listener listener, + CORBA_Environment *ev) +{ + BonoboObject *bonobo_object; + EvolutionStorage *storage; + CORBA_Object obj_dup; + + bonobo_object = bonobo_object_from_servant (servant); + storage = EVOLUTION_STORAGE (bonobo_object); + + obj_dup = CORBA_Object_duplicate (listener, ev); + gtk_signal_emit (GTK_OBJECT (storage), signals[REMOVE_SHARED_FOLDER], + obj_dup, path); } static void @@ -782,9 +801,19 @@ class_init (EvolutionStorageClass *klass) discover_shared_folder), e_marshal_NONE__POINTER_POINTER_POINTER, GTK_TYPE_NONE, 3, + GTK_TYPE_POINTER, GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_POINTER); + GTK_TYPE_STRING); + + signals[REMOVE_SHARED_FOLDER] = gtk_signal_new ("remove_shared_folder", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EvolutionStorageClass, + remove_shared_folder), + gtk_marshal_NONE__POINTER_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_STRING, + GTK_TYPE_POINTER); signals[SHOW_FOLDER_PROPERTIES] = gtk_signal_new ("show_folder_properties", GTK_RUN_LAST, @@ -835,6 +864,7 @@ evolution_storage_get_epv (void) epv->asyncOpenFolder = impl_Storage_asyncOpenFolder; epv->updateFolder = impl_Storage_updateFolder; epv->asyncDiscoverSharedFolder = impl_Storage_asyncDiscoverSharedFolder; + epv->asyncRemoveSharedFolder = impl_Storage_asyncRemoveSharedFolder; epv->addListener = impl_Storage_addListener; epv->removeListener = impl_Storage_removeListener; epv->showFolderProperties = impl_Storage_showFolderProperties; -- cgit