aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-05-08 06:31:06 +0800
committerChris Toshok <toshok@src.gnome.org>2000-05-08 06:31:06 +0800
commit2e04788970472683280e310053b2ec56bf94b7e3 (patch)
treeabe1c263e445a19b77cc8dd294428d8aab83d684
parent392c2d63ceafb6fc17f90b1f1020a0955edb6abb (diff)
downloadgsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar.gz
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar.bz2
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar.lz
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar.xz
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.tar.zst
gsoc2013-evolution-2e04788970472683280e310053b2ec56bf94b7e3.zip
(addressbook_factory): create the ebook once.
svn path=/trunk/; revision=2887
-rw-r--r--addressbook/ChangeLog1
-rw-r--r--addressbook/gui/component/addressbook.c7
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 (