aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-05-08 06:04:37 +0800
committerChris Toshok <toshok@src.gnome.org>2000-05-08 06:04:37 +0800
commit3e00d395673af32a14764aed2a27f4bd7e32cbc6 (patch)
tree508029eb662cbe82f992f2a6de227735f7186035 /addressbook/gui
parent7bd8141a2860d945a080c04bb4bd247b6d34cf3a (diff)
downloadgsoc2013-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.c16
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");