diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 1 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 12b15dc0e9..49f6c4463a 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -3,6 +3,7 @@ * 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. + (addressbook_factory): create the ebook once. 2000-05-07 Christopher James Lahey <clahey@helixcode.com> diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 883982d500..520ffab568 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -532,10 +532,8 @@ set_prop (BonoboPropertyBag *bag, uri_data = g_strdup_printf("file://%s", file_name); g_free(file_name); } - if (! e_book_load_uri (book, uri_data, book_open_cb, view)) + if (! e_book_load_uri (view->book, uri_data, book_open_cb, view)) printf ("error calling load_uri!\n"); - else - view->book = book; g_free(uri_data); @@ -781,6 +779,9 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure) gtk_widget_show_all( view->vbox ); + /* create the view's ebook */ + view->book = e_book_new (); + view->properties = bonobo_property_bag_new (get_prop, set_prop, view); bonobo_property_bag_add ( |