add prototype for addressbook_get_other_contact_storage.
2001-08-17 Chris Toshok <toshok@ximian.com> * 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
This commit is contained in:
committed by
Chris Toshok
parent
a069bf38e5
commit
4be8d6a6d6
@@ -1,3 +1,16 @@
|
||||
2001-08-17 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* 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 <toshok@ximian.com>
|
||||
|
||||
* gui/contact-editor/e-contact-editor.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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user