From 0203f5de7608f34c6510948b36f522c4c3a87fef Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 14 May 2003 18:44:27 +0000 Subject: clear the view (book_open_cb): track the book in the view, don't unref the 2003-05-14 JP Rosevear * gui/component/addressbook.c (addressbook_view_unref): clear the view (book_open_cb): track the book in the view, don't unref the book (set_prop): set the book (retrieve_shell_view_interface_from_control): get the shell view every time (set_folder_bar_label): release and unref the shell view * gui/component/addressbook-storage.h: add proto * gui/component/addressbook-storage.c (addressbook_storage_cleanup): unref the storage * gui/component/addressbook-component.c (owner_unset_cb): clean up storage * backend/ebook/e-book.c (e_book_load_uri): track the listener signal (e_book_dispose): unref the listener and disconnect the signal svn path=/trunk/; revision=21179 --- addressbook/backend/ebook/e-book.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'addressbook/backend/ebook') diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index c20f0e7c5c..7cf33d09c0 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -57,6 +57,7 @@ struct _EBookPrivate { gchar *uri; + gulong listener_signal; gulong died_signal; }; @@ -773,8 +774,8 @@ e_book_load_uri (EBook *book, return; } - g_signal_connect (book->priv->listener, "responses_queued", - G_CALLBACK (e_book_check_listener_queue), book); + book->priv->listener_signal = g_signal_connect (book->priv->listener, "responses_queued", + G_CALLBACK (e_book_check_listener_queue), book); load_uri_data = g_new (EBookLoadURIData, 1); load_uri_data->open_response = open_response; @@ -1605,9 +1606,15 @@ e_book_dispose (GObject *object) CORBA_exception_init (&ev); } } - + CORBA_exception_free (&ev); + if (book->priv->listener) { + g_signal_handler_disconnect (book->priv->comp_listener, book->priv->listener_signal); + bonobo_object_unref (book->priv->listener); + book->priv->listener = NULL; + } + if (book->priv->comp_listener) { g_signal_handler_disconnect (book->priv->comp_listener, book->priv->died_signal); g_object_unref (book->priv->comp_listener); -- cgit v1.2.3