aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-corba-storage-registry.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-26 22:49:12 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-26 22:49:12 +0800
commit47ab2202ba161234ec2790290152f64be0163dd7 (patch)
tree3abf67438aeb9b509c589d489bb89fd1f90a8d60 /shell/e-corba-storage-registry.c
parent3c89185e9f07621d4b516a8ee5dac9f2d267c87d (diff)
downloadgsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.gz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.bz2
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.lz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.xz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.zst
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.zip
Made the storage view update at changes in the storage, and
implemented a BonoboObject for wrapping the Evolution::Storage CORBA interface. Also fixed a few bugs. This makes the shell's storage extensibility usable for Evolution components. svn path=/trunk/; revision=3219
Diffstat (limited to 'shell/e-corba-storage-registry.c')
-rw-r--r--shell/e-corba-storage-registry.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c
index 51f845ea38..c3b259bb71 100644
--- a/shell/e-corba-storage-registry.c
+++ b/shell/e-corba-storage-registry.c
@@ -79,14 +79,23 @@ impl_StorageRegistry_register_storage (PortableServer_Servant servant,
EStorage *storage;
Evolution_StorageListener listener_interface;
+ g_print ("Shell: Registering storage -- %s\n", name);
+
bonobo_object = bonobo_object_from_servant (servant);
storage_registry = E_CORBA_STORAGE_REGISTRY (bonobo_object);
priv = storage_registry->priv;
storage = e_corba_storage_new (storage_interface, name);
- /* FIXME check failure. */
- e_storage_set_add_storage (priv->storage_set, storage);
+ if (! e_storage_set_add_storage (priv->storage_set, storage)) {
+ CORBA_exception_set (ev,
+ CORBA_USER_EXCEPTION,
+ ex_Evolution_StorageRegistry_Exists,
+ NULL);
+ return CORBA_OBJECT_NIL;
+ }
+
+ gtk_object_unref (GTK_OBJECT (storage));
listener_interface = CORBA_Object_duplicate (e_corba_storage_get_StorageListener
(E_CORBA_STORAGE (storage)), ev);
@@ -161,6 +170,7 @@ corba_class_init (void)
vepv = &storage_registry_vepv;
vepv->_base_epv = base_epv;
+ vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
vepv->Evolution_StorageRegistry_epv = epv;
}