aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/component/addressbook.c16
2 files changed, 12 insertions, 10 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8a69767720..12b15dc0e9 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2000-05-07 Chris Toshok <toshok@helixcode.com>
+
+ * gui/component/addressbook.c (set_prop): don't create a new
+ ebook. instead, unload the current uri (if there is one) and load
+ the new one.
+
2000-05-07 Christopher James Lahey <clahey@helixcode.com>
* gui/component/e-addressbook-model.c: Replaced some model_changed
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index dc5e591a44..883982d500 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -509,23 +509,19 @@ set_prop (BonoboPropertyBag *bag,
{
AddressbookView *view = user_data;
- EBook *book;
char *uri_file;
char *uri_data;
switch (arg_id) {
case PROPERTY_FOLDER_URI_IDX:
- view->uri = g_strdup(BONOBO_ARG_GET_STRING (arg));
-
- book = e_book_new ();
-
- if (!book) {
- printf ("%s: %s(): Couldn't create EBook, bailing.\n",
- __FILE__,
- __FUNCTION__);
- return;
+ if (view->uri) {
+ /* we've already had a uri set on this view, so unload it */
+ e_book_unload_uri (view->book);
+ g_free (view->uri);
}
+
+ view->uri = g_strdup(BONOBO_ARG_GET_STRING (arg));
uri_file = g_concat_dir_and_file(view->uri + 7, "uri");