From 4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 18 Aug 2001 04:18:37 +0000 Subject: add prototype for addressbook_get_other_contact_storage. 2001-08-17 Chris Toshok * gui/component/addressbook-storage.h: add prototype for addressbook_get_other_contact_storage. * gui/component/addressbook-storage.c (addressbook_get_other_contact_storage): rename register_storage to this, and return the EvolutionStorage. (load_source_data): register_storage => addressbook_get_other_contact_storage. (addressbook_storage_add_source): register_storage => addressbook_get_other_contact_storage. svn path=/trunk/; revision=12197 --- addressbook/ChangeLog | 13 +++++++++++++ addressbook/gui/component/addressbook-storage.c | 12 +++++++----- addressbook/gui/component/addressbook-storage.h | 2 ++ 3 files changed, 22 insertions(+), 5 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 0529e17157..a5c8303cbd 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,16 @@ +2001-08-17 Chris Toshok + + * gui/component/addressbook-storage.h: add prototype for + addressbook_get_other_contact_storage. + + * gui/component/addressbook-storage.c + (addressbook_get_other_contact_storage): rename register_storage + to this, and return the EvolutionStorage. + (load_source_data): register_storage => + addressbook_get_other_contact_storage. + (addressbook_storage_add_source): register_storage => + addressbook_get_other_contact_storage. + 2001-08-17 Chris Toshok * gui/contact-editor/e-contact-editor.c diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c index 9a8554115e..b888375a26 100644 --- a/addressbook/gui/component/addressbook-storage.c +++ b/addressbook/gui/component/addressbook-storage.c @@ -69,7 +69,6 @@ static gboolean load_source_data (const char *file_path); static gboolean save_source_data (const char *file_path); -static void register_storage (void); static void deregister_storage (void); static GList *sources; @@ -128,8 +127,9 @@ create_ldap_folder (EvolutionStorage *storage, } #endif -static void -register_storage (void) + +EvolutionStorage * +addressbook_get_other_contact_storage (void) { #ifdef HAVE_LDAP EvolutionStorageResult result; @@ -164,6 +164,8 @@ register_storage (void) } } #endif + + return storage; } static void @@ -274,7 +276,7 @@ load_source_data (const char *file_path) xmlNode *root; xmlNode *child; - register_storage (); + addressbook_get_other_contact_storage(); tryagain: doc = xmlParseFile (file_path); @@ -437,7 +439,7 @@ addressbook_storage_add_source (AddressbookSource *source) sources = g_list_append (sources, source); /* And then to the ui */ - register_storage (); + addressbook_get_other_contact_storage(); path = g_strdup_printf ("/%s", source->name); evolution_storage_new_folder (storage, path, source->name, "contacts", source->uri, source->description, 0); diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h index 8f260b9d07..8480f2c4de 100644 --- a/addressbook/gui/component/addressbook-storage.h +++ b/addressbook/gui/component/addressbook-storage.h @@ -25,6 +25,7 @@ #define __ADDRESSBOOK_STORAGE_H__ #include "evolution-shell-component.h" +#include "evolution-storage.h" typedef enum { ADDRESSBOOK_SOURCE_LDAP, @@ -62,6 +63,7 @@ typedef struct { void addressbook_storage_setup (EvolutionShellComponent *shell_component, const char *evolution_homedir); +EvolutionStorage *addressbook_get_other_contact_storage (void); GList *addressbook_storage_get_sources (void); AddressbookSource *addressbook_storage_get_source_by_uri (const char *uri); void addressbook_storage_clear_sources (void); -- cgit v1.2.3