summaryrefslogtreecommitdiff
path: root/calendar
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-02-12 19:47:33 +0000
committerChris Toshok <toshok@src.gnome.org>2004-02-12 19:47:33 +0000
commit7df0e2c37cfa893bc86311d62111b5607dde802f (patch)
tree87e6744265814ea7be27b4bae546cb2132393acf /calendar
parentf2b9c600f1529a258d90654741985ea8eb7285ad (diff)
downloadevolution-data-server-7df0e2c37cfa893bc86311d62111b5607dde802f.tar.gz
quiet the compiler, and free the list of requested fields after the
2004-02-12 Chris Toshok <toshok@ximian.com> * backends/contacts/e-cal-backend-contacts.c (book_record_new): quiet the compiler, and free the list of requested fields after the e_book_get_book_view call. (e_cal_backend_contacts_init): use e_book_get_addressbooks instead of using gconf and hardcoding the sourcelist xml key.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/backends/contacts/e-cal-backend-contacts.c13
2 files changed, 14 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 215fdfb52..4bb0cf215 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-12 Chris Toshok <toshok@ximian.com>
+
+ * backends/contacts/e-cal-backend-contacts.c (book_record_new):
+ quiet the compiler, and free the list of requested fields after
+ the e_book_get_book_view call.
+ (e_cal_backend_contacts_init): use e_book_get_addressbooks instead
+ of using gconf and hardcoding the sourcelist xml key.
+
2004-02-10 Rodrigo Moya <rodrigo@ximian.com>
* backends/file/e-cal-backend-file.c (e_cal_backend_file_receive_objects):
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index fb2c3faa6..1cc846eb3 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -85,16 +85,18 @@ book_record_new (ECalBackendContacts *cbc, ESource *source)
e_book_load_source (book, source, TRUE, NULL);
/* Create book view */
- fields = g_list_append (fields, e_contact_field_name (E_CONTACT_FILE_AS));
- fields = g_list_append (fields, e_contact_field_name (E_CONTACT_BIRTH_DATE));
- fields = g_list_append (fields, e_contact_field_name (E_CONTACT_ANNIVERSARY));
+ fields = g_list_append (fields, (char*)e_contact_field_name (E_CONTACT_FILE_AS));
+ fields = g_list_append (fields, (char*)e_contact_field_name (E_CONTACT_BIRTH_DATE));
+ fields = g_list_append (fields, (char*)e_contact_field_name (E_CONTACT_ANNIVERSARY));
query = e_book_query_any_field_contains ("");
if (!e_book_get_book_view (book, query, fields, -1, &book_view, NULL)) {
+ g_list_free (fields);
e_book_query_unref (query);
return NULL;
}
e_book_query_unref (query);
+ g_list_free (fields);
g_signal_connect (book_view, "contacts_added", G_CALLBACK (contacts_added_cb), cbc);
g_signal_connect (book_view, "contacts_removed", G_CALLBACK (contacts_removed_cb), cbc);
@@ -747,13 +749,10 @@ static void
e_cal_backend_contacts_init (ECalBackendContacts *cbc, ECalBackendContactsClass *class)
{
ECalBackendContactsPrivate *priv;
- GConfClient *gconf_client;
priv = g_new0 (ECalBackendContactsPrivate, 1);
- gconf_client = gconf_client_get_default ();
- priv->addressbook_sources = e_source_list_new_for_gconf (
- gconf_client, "/apps/evolution/addressbook/sources");
+ e_book_get_addressbooks (&priv->addressbook_sources, NULL);
priv->addressbooks = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, (GDestroyNotify)book_record_free);