diff options
author | Chris Toshok <toshok@src.gnome.org> | 2000-05-08 06:04:37 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-05-08 06:04:37 +0800 |
commit | 3e00d395673af32a14764aed2a27f4bd7e32cbc6 (patch) | |
tree | 508029eb662cbe82f992f2a6de227735f7186035 /addressbook/gui | |
parent | 7bd8141a2860d945a080c04bb4bd247b6d34cf3a (diff) | |
download | gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar.gz gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar.bz2 gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar.lz gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar.xz gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.tar.zst gsoc2013-evolution-3e00d395673af32a14764aed2a27f4bd7e32cbc6.zip |
don't create a new ebook. instead, unload the current uri (if there is
* 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.
svn path=/trunk/; revision=2885
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 16 |
1 files changed, 6 insertions, 10 deletions
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"); |