aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog13
-rw-r--r--addressbook/gui/component/addressbook-storage.c12
-rw-r--r--addressbook/gui/component/addressbook-storage.h2
3 files changed, 22 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 0529e17157..a5c8303cbd 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,18 @@
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
(set_entry_changed_signals): connect to the "changed" signal on
"entry-web" to update command state.
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);