diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-05-10 00:10:50 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-05-10 00:10:50 +0800 |
commit | d325e6d453f0d8cbf448f9c078a547e06ded10a1 (patch) | |
tree | 632291e6b8184c66c115d990c31c89ef0c06c72c | |
parent | 8cdcac9e18a5c4ea17cacc997de85a90a111c01b (diff) | |
download | gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.gz gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.bz2 gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.lz gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.xz gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.zst gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.zip |
Pass %FALSE as @has_shared_folders to evolution_storage_new().
* e-local-storage.c (construct): Pass %FALSE as
@has_shared_folders to evolution_storage_new().
* evolution-storage.c: New member has_shared_folders in
EvolutionStoragePrivate.
(init): Initialize to FALSE.
(evolution_storage_new): New arg @has_shared_folders.
(evolution_storage_construct): Likewise.
(impl_Storage__get_folderList): Renamed from
impl_Storage__get_folder_list.
(impl_Storage__get_hasSharedFolders): New, implementation for
::hasSharedFolders.
(evolution_storage_get_epv): Install the CORBA method
implementation.
* Evolution-Storage.idl: Make Storage::name a readonly attribute. New attribute Storage::
* component-factory.c (add_storage): Pass %FALSE as
@has_shared_folders to evolution_storage_new().
* gui/component/addressbook-storage.c
(addressbook_get_other_contact_storage): Pass %FALSE as
@has_shared_folders to evolution_storage_new().
svn path=/trunk/; revision=16733
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-storage.c | 2 | ||||
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/component-factory.c | 2 | ||||
-rw-r--r-- | shell/ChangeLog | 19 | ||||
-rw-r--r-- | shell/Evolution-Storage.idl | 9 | ||||
-rw-r--r-- | shell/e-local-storage.c | 2 | ||||
-rw-r--r-- | shell/evolution-storage.c | 51 | ||||
-rw-r--r-- | shell/evolution-storage.h | 6 |
9 files changed, 80 insertions, 22 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 4da282fdb1..b9fe698c8e 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2002-05-09 Ettore Perazzoli <ettore@ximian.com> + + * gui/component/addressbook-storage.c + (addressbook_get_other_contact_storage): Pass %FALSE as + @has_shared_folders to evolution_storage_new(). + 2002-05-08 JP Rosevear <jpr@ximian.com> * conduit/Makefile.am: link against the libtool version of diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c index e2608a9a94..d3430dd476 100644 --- a/addressbook/gui/component/addressbook-storage.c +++ b/addressbook/gui/component/addressbook-storage.c @@ -165,7 +165,7 @@ addressbook_get_other_contact_storage (void) EvolutionStorageResult result; if (storage == NULL) { - storage = evolution_storage_new (U_("Other Contacts")); + storage = evolution_storage_new (U_("Other Contacts"), FALSE); gtk_signal_connect (GTK_OBJECT (storage), "remove_folder", GTK_SIGNAL_FUNC(remove_ldap_folder), NULL); diff --git a/mail/ChangeLog b/mail/ChangeLog index 02662b2dfb..d71ca32bc0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2002-05-09 Ettore Perazzoli <ettore@ximian.com> + + * component-factory.c (add_storage): Pass %FALSE as + @has_shared_folders to evolution_storage_new(). + 2002-05-09 JP Rosevear <jpr@ximian.com> * Makefile.am: dist Spell.idl diff --git a/mail/component-factory.c b/mail/component-factory.c index 8559898510..550b5bdb19 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1229,7 +1229,7 @@ add_storage (const char *name, const char *uri, CamelService *store, EvolutionStorage *storage; EvolutionStorageResult res; - storage = evolution_storage_new (name); + storage = evolution_storage_new (name, FALSE); gtk_signal_connect (GTK_OBJECT (storage), "open_folder", storage_connect, store); gtk_signal_connect (GTK_OBJECT (storage), "create_folder", storage_create_folder, store); gtk_signal_connect (GTK_OBJECT (storage), "remove_folder", storage_remove_folder, store); diff --git a/shell/ChangeLog b/shell/ChangeLog index ef329f89f5..b6f2efee9d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,24 @@ 2002-05-09 Ettore Perazzoli <ettore@ximian.com> + * e-local-storage.c (construct): Pass %FALSE as + @has_shared_folders to evolution_storage_new(). + + * evolution-storage.c: New member has_shared_folders in + EvolutionStoragePrivate. + (init): Initialize to FALSE. + (evolution_storage_new): New arg @has_shared_folders. + (evolution_storage_construct): Likewise. + (impl_Storage__get_folderList): Renamed from + impl_Storage__get_folder_list. + (impl_Storage__get_hasSharedFolders): New, implementation for + ::hasSharedFolders. + (evolution_storage_get_epv): Install the CORBA method + implementation. + + * Evolution-Storage.idl: Make Storage::name a readonly attribute. New attribute Storage:: + +2002-05-09 Ettore Perazzoli <ettore@ximian.com> + * Evolution-Offline.idl: Rename NotPrepared to notPrepared and NotSyncing to notSyncing. diff --git a/shell/Evolution-Storage.idl b/shell/Evolution-Storage.idl index 84d323c3bd..be6eaafcab 100644 --- a/shell/Evolution-Storage.idl +++ b/shell/Evolution-Storage.idl @@ -37,12 +37,15 @@ module Evolution { string path; }; + /* The name of the storage. */ + readonly attribute string name; + + /* Whether the storage has folders from other user's. */ + readonly attribute boolean hasSharedFolders; + /* Flat list of the folders in the storage. */ readonly attribute FolderList folderList; - /* The name of the storage. */ - attribute string name; - void asyncCreateFolder (in string path, in string type, in string description, diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 607fccb37e..58d8a5b20a 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -1039,7 +1039,7 @@ construct (ELocalStorage *local_storage, priv->base_path = g_strndup (base_path, base_path_len); g_assert (priv->bonobo_interface == NULL); - priv->bonobo_interface = evolution_storage_new (E_LOCAL_STORAGE_NAME); + priv->bonobo_interface = evolution_storage_new (E_LOCAL_STORAGE_NAME, FALSE); gtk_signal_connect (GTK_OBJECT (priv->bonobo_interface), "create_folder", GTK_SIGNAL_FUNC (bonobo_interface_create_folder_cb), diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index 4223c83e48..79930b17f9 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -45,6 +45,9 @@ struct _EvolutionStoragePrivate { /* Name of the storage. */ char *name; + /* Whether there are shared folders in this storage. */ + gboolean has_shared_folders; + /* What we will display as the name of the storage. */ char *display_name; @@ -250,6 +253,21 @@ impl_Storage__get_name (PortableServer_Servant servant, return CORBA_string_dup (priv->name); } +static CORBA_boolean +impl_Storage__get_hasSharedFolders (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + BonoboObject *bonobo_object; + EvolutionStorage *storage; + EvolutionStoragePrivate *priv; + + bonobo_object = bonobo_object_from_servant (servant); + storage = EVOLUTION_STORAGE (bonobo_object); + priv = storage->priv; + + return priv->has_shared_folders; +} + static void get_folder_list_foreach (EFolderTree *tree, const char *path, @@ -279,8 +297,8 @@ get_folder_list_foreach (EFolderTree *tree, } static GNOME_Evolution_FolderList * -impl_Storage__get_folder_list (PortableServer_Servant servant, - CORBA_Environment *ev) +impl_Storage__get_folderList (PortableServer_Servant servant, + CORBA_Environment *ev) { BonoboObject *bonobo_object; EvolutionStorage *storage; @@ -640,6 +658,7 @@ init (EvolutionStorage *storage) priv = g_new (EvolutionStoragePrivate, 1); priv->name = NULL; + priv->has_shared_folders = FALSE; priv->folder_tree = e_folder_tree_new (folder_destroy_notify, storage); priv->uri_to_path = g_hash_table_new (g_str_hash, g_str_equal); priv->corba_storage_listeners = NULL; @@ -654,15 +673,16 @@ evolution_storage_get_epv (void) POA_GNOME_Evolution_Storage__epv *epv; epv = g_new0 (POA_GNOME_Evolution_Storage__epv, 1); - epv->_get_name = impl_Storage__get_name; - epv->_get_folderList = impl_Storage__get_folder_list; - epv->asyncCreateFolder = impl_Storage_async_create_folder; - epv->asyncRemoveFolder = impl_Storage_async_remove_folder; - epv->asyncXferFolder = impl_Storage_async_xfer_folder; - epv->asyncOpenFolder = impl_Storage_async_open_folder; - epv->updateFolder = impl_Storage_updateFolder; - epv->addListener = impl_Storage_add_listener; - epv->removeListener = impl_Storage_remove_listener; + epv->_get_name = impl_Storage__get_name; + epv->_get_hasSharedFolders = impl_Storage__get_hasSharedFolders; + epv->_get_folderList = impl_Storage__get_folderList; + epv->asyncCreateFolder = impl_Storage_async_create_folder; + epv->asyncRemoveFolder = impl_Storage_async_remove_folder; + epv->asyncXferFolder = impl_Storage_async_xfer_folder; + epv->asyncOpenFolder = impl_Storage_async_open_folder; + epv->updateFolder = impl_Storage_updateFolder; + epv->addListener = impl_Storage_add_listener; + epv->removeListener = impl_Storage_remove_listener; return epv; } @@ -670,7 +690,8 @@ evolution_storage_get_epv (void) void evolution_storage_construct (EvolutionStorage *storage, GNOME_Evolution_Storage corba_object, - const char *name) + const char *name, + gboolean has_shared_folders) { EvolutionStoragePrivate *priv; CORBA_Environment ev; @@ -687,12 +708,14 @@ evolution_storage_construct (EvolutionStorage *storage, priv = storage->priv; priv->name = g_strdup (name); + priv->has_shared_folders = !! has_shared_folders; CORBA_exception_free (&ev); } EvolutionStorage * -evolution_storage_new (const char *name) +evolution_storage_new (const char *name, + gboolean has_shared_folders) { EvolutionStorage *new; POA_GNOME_Evolution_Storage *servant; @@ -708,7 +731,7 @@ evolution_storage_new (const char *name) new = gtk_type_new (evolution_storage_get_type ()); corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_storage_construct (new, corba_object, name); + evolution_storage_construct (new, corba_object, name, has_shared_folders); return new; } diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h index c039a38e64..004aedebbe 100644 --- a/shell/evolution-storage.h +++ b/shell/evolution-storage.h @@ -113,8 +113,10 @@ POA_GNOME_Evolution_Storage__epv *evolution_storage_get_epv (void); GtkType evolution_storage_get_type (void); void evolution_storage_construct (EvolutionStorage *storage, GNOME_Evolution_Storage corba_object, - const char *name); -EvolutionStorage *evolution_storage_new (const char *name); + const char *name, + gboolean has_shared_folders); +EvolutionStorage *evolution_storage_new (const char *name, + gboolean has_shared_folders); void evolution_storage_rename (EvolutionStorage *storage, const char *new_name); |