diff options
author | Iain Holmes <iain@src.gnome.org> | 2002-05-15 21:34:31 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2002-05-15 21:34:31 +0800 |
commit | a59768d50d370db68ff9ed789b5077e68aecf6f6 (patch) | |
tree | eaf0b9290230d5e129f04a4ebc1a7c5039cb43d2 /shell | |
parent | be2d7023bf9f5af1202e674e17978c75c08a6e7d (diff) | |
download | gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar.gz gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar.bz2 gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar.lz gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar.xz gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.tar.zst gsoc2013-evolution-a59768d50d370db68ff9ed789b5077e68aecf6f6.zip |
Committing Peter Williams patch so listeners are notified about new storages.
svn path=/trunk/; revision=16800
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-corba-storage-registry.c | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index db0b341117..39da515c97 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2002-05-15 Iain <iain@ximian.com> + + * e-corba-storage-registry.c (impl_StorageRegistry_addStorage): Apply + patch from Peter Williams to notify listeners when a new storage is + created. + 2002-05-14 Ettore Perazzoli <ettore@ximian.com> * e-shell-offline-handler.c diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c index 36f2a89ce5..5ac8260862 100644 --- a/shell/e-corba-storage-registry.c +++ b/shell/e-corba-storage-registry.c @@ -108,7 +108,8 @@ impl_StorageRegistry_addStorage (PortableServer_Servant servant, ECorbaStorageRegistryPrivate *priv; EStorage *storage; GNOME_Evolution_StorageListener listener_interface; - + GSList *iter; + bonobo_object = bonobo_object_from_servant (servant); storage_registry = E_CORBA_STORAGE_REGISTRY (bonobo_object); priv = storage_registry->priv; @@ -125,6 +126,16 @@ impl_StorageRegistry_addStorage (PortableServer_Servant servant, gtk_object_unref (GTK_OBJECT (storage)); + + /* FIXME: if we remove a listener while looping through the list we can + * crash. Yay CORBA reentrancy. */ + g_print ("Added name: %s\n", name); + for (iter = priv->listeners; iter; iter = iter->next) { + listener_notify (iter->data, + GNOME_Evolution_StorageRegistry_STORAGE_CREATED, + name); + } + listener_interface = CORBA_Object_duplicate (e_corba_storage_get_StorageListener (E_CORBA_STORAGE (storage)), ev); |