From a0a4b49f2d361521bc9173c15148a543a9c4b756 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 14 Apr 2001 17:19:45 +0000 Subject: Ref the cursor here when we receive it. 2001-04-14 Christopher James Lahey * backend/ebook/e-book-listener.c (impl_BookListener_respond_get_cursor): Ref the cursor here when we receive it. (impl_BookListener_respond_get_view, impl_BookListener_respond_get_changes): Ref the book_view here when we receive it. (impl_BookListener_respond_open_book): Ref the book here when we receive it. (e_book_listener_destroy): Unref the objects in our queue here. * backend/ebook/e-book-view.c (e_book_view_construct): Cleaned this up using bonobo_object_dup_ref. (e_book_view_destroy): Cleaned this up using bonobo_object_release_unref. * backend/ebook/e-book.c (e_book_do_response_get_cursor, e_book_do_response_get_view, e_book_do_response_get_changes, e_book_unload_uri): Cleaned this up using bonobo_object_release_unref. svn path=/trunk/; revision=9311 --- addressbook/backend/ebook/e-book-view.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'addressbook/backend/ebook/e-book-view.c') diff --git a/addressbook/backend/ebook/e-book-view.c b/addressbook/backend/ebook/e-book-view.c index 8faebe140f..3528bde63f 100644 --- a/addressbook/backend/ebook/e-book-view.c +++ b/addressbook/backend/ebook/e-book-view.c @@ -136,25 +136,11 @@ e_book_view_construct (EBookView *book_view, GNOME_Evolution_Addressbook_BookVie */ CORBA_exception_init (&ev); - book_view->priv->corba_book_view = CORBA_Object_duplicate(corba_book_view, &ev); + book_view->priv->corba_book_view = bonobo_object_dup_ref(corba_book_view, &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("e_book_view_construct: Exception duplicating corba_book_view.\n"); CORBA_exception_free (&ev); - return FALSE; - } - - GNOME_Evolution_Addressbook_BookView_ref(book_view->priv->corba_book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_view_construct: Exception reffing corba_book_view.\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - CORBA_Object_release (book_view->priv->corba_book_view, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_view_construct: Exception releasing corba_book_view.\n"); - } - CORBA_exception_free (&ev); book_view->priv->corba_book_view = NULL; return FALSE; } @@ -209,15 +195,8 @@ e_book_view_destroy (GtkObject *object) if (book_view->priv->corba_book_view) { CORBA_exception_init (&ev); - GNOME_Evolution_Addressbook_BookView_unref(book_view->priv->corba_book_view, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EBookView: Exception while unreffing BookView\n"); - - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } + bonobo_object_release_unref (book_view->priv->corba_book_view, &ev); - CORBA_Object_release (book_view->priv->corba_book_view, &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("EBookView: Exception while releasing BookView\n"); } -- cgit