From 3bc843ceb5bd66288077a4f8db1b6cdb7123f298 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 6 Mar 2002 23:36:27 +0000 Subject: Keep the storage name and display_name in EStoragePriv. (impl_get_name, * e-storage.c: Keep the storage name and display_name in EStoragePriv. (impl_get_name, impl_get_display_name): Return them. (e_storage_construct): Set them here. (e_storage_new): And here. * e-local-storage.c: (impl_get_name, impl_get_display_name): Removed. (construct): Pass E_LOCAL_STORAGE_NAME and U_("Local Folders") to e_storage_construct. * e-corba-storage.c: Remove priv->name. (get_name, get_display_name): Removed. (e_corba_storage_construct): Pass name to e_storage_construct(). * e-summary-storage.[ch]: Gone. This didn't override anything in EStorage but get_name/get_display_name, and the defaults for those DTRT now. * e-shell-constants.h: Move E_SUMMARY_STORAGE_NAME here from e-summary-storage.h, and move E_LOCAL_STORAGE_NAME too for consistency. * e-storage-set-view.c: Fix up #includes. * e-shell-importer.c: Likewise * e-shell.c: Likewise. Create summary_storage as a plain EStorage since ESummaryStorage is gone now. * Makefile.am (evolution_SOURCES): Remove e-summary-storage.[ch] svn path=/trunk/; revision=15955 --- shell/e-corba-storage.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'shell/e-corba-storage.c') diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c index 1aa1c67674..9601d1d89d 100644 --- a/shell/e-corba-storage.c +++ b/shell/e-corba-storage.c @@ -39,8 +39,6 @@ static EStorageClass *parent_class = NULL; typedef struct _StorageListenerServant StorageListenerServant; struct _ECorbaStoragePrivate { - char *name; - GNOME_Evolution_Storage storage_interface; /* The Evolution::StorageListener interface we expose. */ @@ -217,8 +215,6 @@ destroy (GtkObject *object) corba_storage = E_CORBA_STORAGE (object); priv = corba_storage->priv; - g_free (priv->name); - CORBA_exception_init (&ev); if (priv->storage_interface != CORBA_OBJECT_NIL) { @@ -250,31 +246,6 @@ destroy (GtkObject *object) /* EStorage methods. */ -static const char * -get_name (EStorage *storage) -{ - ECorbaStorage *corba_storage; - ECorbaStoragePrivate *priv; - - corba_storage = E_CORBA_STORAGE (storage); - priv = corba_storage->priv; - - return priv->name; -} -static const char * -get_display_name (EStorage *storage) -{ - ECorbaStorage *corba_storage; - ECorbaStoragePrivate *priv; - - corba_storage = E_CORBA_STORAGE (storage); - priv = corba_storage->priv; - - /* FIXME: Abstract a display_name, return it. Necessary - changes to the IDL and EvolutionStorage required. */ - return priv->name; -} - struct async_folder_closure { EStorageResultCallback callback; EStorage *storage; @@ -495,8 +466,6 @@ class_init (ECorbaStorageClass *klass) object_class->destroy = destroy; storage_class = E_STORAGE_CLASS (klass); - storage_class->get_name = get_name; - storage_class->get_display_name = get_display_name; storage_class->async_create_folder = async_create_folder; storage_class->async_remove_folder = async_remove_folder; storage_class->async_xfer_folder = async_xfer_folder; @@ -512,7 +481,6 @@ init (ECorbaStorage *corba_storage) ECorbaStoragePrivate *priv; priv = g_new (ECorbaStoragePrivate, 1); - priv->name = NULL; priv->storage_interface = CORBA_OBJECT_NIL; corba_storage->priv = priv; @@ -535,12 +503,12 @@ e_corba_storage_construct (ECorbaStorage *corba_storage, g_return_if_fail (storage_interface != CORBA_OBJECT_NIL); g_return_if_fail (name != NULL); - e_storage_construct (E_STORAGE (corba_storage), toplevel_node_uri, toplevel_node_type); + /* FIXME: Need separate name and display name. */ + e_storage_construct (E_STORAGE (corba_storage), name, name, + toplevel_node_uri, toplevel_node_type); priv = corba_storage->priv; - priv->name = g_strdup (name); - CORBA_exception_init (&ev); Bonobo_Unknown_ref (storage_interface, &ev); -- cgit v1.2.3