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 /shell/evolution-storage.c | |
parent | 8cdcac9e18a5c4ea17cacc997de85a90a111c01b (diff) | |
download | gsoc2013-evolution-d325e6d453f0d8cbf448f9c078a547e06ded10a1.tar.gz 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
Diffstat (limited to 'shell/evolution-storage.c')
-rw-r--r-- | shell/evolution-storage.c | 51 |
1 files changed, 37 insertions, 14 deletions
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; } |