aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-19 04:50:28 +0800
committerDan Winship <danw@src.gnome.org>2002-04-19 04:50:28 +0800
commit0c7e55e75cc787269ab570588f3873b6279aede1 (patch)
tree0e6a02975caead1fc6f2ffbc58a206a7cc956e4a /addressbook
parent6ac64665014118cbf90acb3d513317676a6a54a3 (diff)
downloadgsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar.gz
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar.bz2
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar.lz
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar.xz
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.tar.zst
gsoc2013-evolution-0c7e55e75cc787269ab570588f3873b6279aede1.zip
Append /addressbook.db to the end of the default URI if it starts with
* backend/ebook/e-book-util.c (e_book_load_default_book): Append /addressbook.db to the end of the default URI if it starts with file: * backend/ebook/e-book.c (e_book_load_uri_step): Fix this to not loop forever if you have more than one backend. svn path=/trunk/; revision=16519
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/backend/ebook/e-book-util.c11
-rw-r--r--addressbook/backend/ebook/e-book.c2
3 files changed, 19 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f8195e4d70..8fb8c5fc2b 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-18 Dan Winship <danw@ximian.com>
+
+ * backend/ebook/e-book-util.c (e_book_load_default_book): Append
+ /addressbook.db to the end of the default URI if it starts with
+ file:
+
+ * backend/ebook/e-book.c (e_book_load_uri_step): Fix this to not
+ loop forever if you have more than one backend.
+
2002-04-17 Christopher James Lahey <clahey@ximian.com>
* gui/component/select-names/e-select-names.c
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c
index 7544342efe..d3de9840f8 100644
--- a/addressbook/backend/ebook/e-book-util.c
+++ b/addressbook/backend/ebook/e-book-util.c
@@ -242,7 +242,7 @@ e_book_default_book_open (EBook *book, EBookStatus status, gpointer closure)
gboolean
e_book_load_default_book (EBook *book, EBookCallback open_response, gpointer closure)
{
- char *val;
+ char *val, *uri;
gboolean rv;
CORBA_Environment ev;
Bonobo_ConfigDatabase config_db;
@@ -260,8 +260,15 @@ e_book_load_default_book (EBook *book, EBookCallback open_response, gpointer clo
DefaultBookClosure *default_book_closure = g_new (DefaultBookClosure, 1);
default_book_closure->closure = closure;
default_book_closure->open_response = open_response;
- rv = e_book_load_uri (book, val,
+
+ /* Sigh. FIXME. */
+ if (!strncmp (val, "file:", 5))
+ uri = g_strconcat (val, "/addressbook.db", NULL);
+ else
+ uri = g_strdup (val);
+ rv = e_book_load_uri (book, uri,
e_book_default_book_open, default_book_closure);
+ g_free (uri);
g_free (val);
}
else {
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index fdc7252cfa..61930fc4d6 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -547,7 +547,7 @@ e_book_load_uri_step (EBook *book, EBookStatus status, EBookLoadURIData *data)
{
/* iterate to the next possible CardFactory, or fail
if it's the last one */
- book->priv->iter = book->priv->book_factories->next;
+ book->priv->iter = book->priv->iter->next;
if (book->priv->iter) {
GNOME_Evolution_Addressbook_BookFactory factory = book->priv->iter->data;
e_book_load_uri_from_factory (book, factory, data);