aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog14
-rw-r--r--addressbook/backend/ebook/e-book-listener.c6
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.c4
-rw-r--r--addressbook/backend/ebook/e-book.c3
4 files changed, 22 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f4dc0c87f4..f0673c9246 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,17 @@
+2001-07-18 Dan Winship <danw@ximian.com>
+
+ * backend/ebook/e-book.c (e_book_unload_uri): Flush the listener's
+ queue before unreffing it to ensure that it doesn't emit any more
+ "responses_queued" signals after the EBook is destroyed.
+
+ * backend/ebook/e-book-listener.c (e_book_listener_check_queue,
+ e_book_listener_queue_response, e_book_listener_new): Use
+ bonobo_object_ref/unref rather than gtk_object_ref/unref.
+
+ * backend/ebook/e-book-view-listener.c
+ (e_book_view_listener_queue_response, e_book_view_listener_new):
+ Likewise.
+
2001-07-18 Chris Toshok <toshok@ximian.com>
* backend/ebook/e-card-compare.c (simple_query_cb): prune the list
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c
index dd682cbce4..fd3efd3039 100644
--- a/addressbook/backend/ebook/e-book-listener.c
+++ b/addressbook/backend/ebook/e-book-listener.c
@@ -43,7 +43,7 @@ e_book_listener_check_queue (EBookListener *listener)
/* We only release our reference to the listener when the idle
function is totally finished. */
- gtk_object_unref (GTK_OBJECT (listener));
+ bonobo_object_unref (BONOBO_OBJECT (listener));
return FALSE;
}
@@ -62,7 +62,7 @@ e_book_listener_queue_response (EBookListener *listener,
if (listener->priv->idle_id == 0) {
/* Hold a reference to the listener until the idle function is finished. */
- gtk_object_ref (GTK_OBJECT (listener));
+ bonobo_object_ref (BONOBO_OBJECT (listener));
listener->priv->idle_id = g_idle_add (
(GSourceFunc) e_book_listener_check_queue, listener);
@@ -558,7 +558,7 @@ e_book_listener_new ()
if (retval == NULL) {
g_warning ("e_book_listener_new: Error constructing "
"EBookListener!\n");
- gtk_object_unref (GTK_OBJECT (listener));
+ bonobo_object_unref (BONOBO_OBJECT (listener));
return NULL;
}
diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c
index d0323a9874..16dc1a8ed8 100644
--- a/addressbook/backend/ebook/e-book-view-listener.c
+++ b/addressbook/backend/ebook/e-book-view-listener.c
@@ -88,7 +88,7 @@ e_book_view_listener_queue_response (EBookViewListener *listener,
if (listener->priv->idle_id == 0) {
/* Hold a reference to the listener while the idle is active. */
- gtk_object_ref (GTK_OBJECT (listener));
+ bonobo_object_ref (BONOBO_OBJECT (listener));
listener->priv->idle_id = g_idle_add (
(GSourceFunc) e_book_view_listener_check_queue, listener);
@@ -340,7 +340,7 @@ e_book_view_listener_new ()
if (retval == NULL) {
g_warning ("e_book_view_listener_new: Error constructing "
"EBookViewListener!\n");
- gtk_object_unref (GTK_OBJECT (listener));
+ bonobo_object_unref (BONOBO_OBJECT (listener));
return NULL;
}
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index 5a78fbe595..3bd13ea4ff 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -531,6 +531,7 @@ void
e_book_unload_uri (EBook *book)
{
CORBA_Environment ev;
+ EBookListenerResponse *resp;
g_return_if_fail (book != NULL);
g_return_if_fail (E_IS_BOOK (book));
@@ -558,6 +559,8 @@ e_book_unload_uri (EBook *book)
CORBA_exception_free (&ev);
+ while ((resp = e_book_listener_pop_response (book->priv->listener)))
+ g_free (resp);
bonobo_object_unref (BONOBO_OBJECT (book->priv->listener));
book->priv->listener = NULL;