From 83f816df158441ca750b0bc12b7ccab2d43c0e43 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 12 Nov 2002 04:06:30 +0000 Subject: guard against multiple invocations. 2002-11-11 Chris Toshok * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard against multiple invocations. * backend/pas/pas-backend-ldap.c (view_destroy): change signature to that of a weak ref notify function. (cursor_destroy): same. (pas_backend_ldap_book_destroy_cb): same. (get_cursor_handler): ::destroy -> weak_ref. (pas_backend_ldap_process_get_book_view): same. (pas_backend_ldap_add_client): same. * backend/pas/pas-backend-file.c (cursor_destroy): change signature to that of a weak ref notify function. (view_destroy): same. (pas_backend_file_book_destroy_cb): same. (pas_backend_file_process_get_cursor): ::destroy -> weak_ref. (pas_backend_file_process_get_book_view): same. (pas_backend_file_process_get_completion_view): same. (pas_backend_file_process_get_changes): same. (pas_backend_file_add_client): same. * backend/ebook/test-client.c (get_cursor_cb): unref the book and exit here. (get_card_cb): pass a query string to get_cursor. * backend/ebook/e-book-view.c (e_book_view_class_init): correct marshaller for "card_added". svn path=/trunk/; revision=18720 --- addressbook/backend/ebook/e-book-view.c | 4 ++-- addressbook/backend/ebook/test-client.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'addressbook/backend/ebook') diff --git a/addressbook/backend/ebook/e-book-view.c b/addressbook/backend/ebook/e-book-view.c index 68c73e06f7..007f052297 100644 --- a/addressbook/backend/ebook/e-book-view.c +++ b/addressbook/backend/ebook/e-book-view.c @@ -286,9 +286,9 @@ e_book_view_class_init (EBookViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EBookViewClass, card_added), NULL, NULL, - e_book_marshal_NONE__STRING, + e_book_marshal_NONE__POINTER, G_TYPE_NONE, 1, - G_TYPE_STRING); + G_TYPE_POINTER); e_book_view_signals [CARD_REMOVED] = g_signal_new ("card_removed", diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c index 8d44cb73e0..0ed9290759 100644 --- a/addressbook/backend/ebook/test-client.c +++ b/addressbook/backend/ebook/test-client.c @@ -50,6 +50,9 @@ get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer cl g_free(vcard); g_object_unref(card); } + + g_object_unref (book); + exit(0); } static void @@ -62,7 +65,7 @@ get_card_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure) g_free(vcard); printf ("Getting cards..\n"); - e_book_get_cursor(book, "", get_cursor_cb, NULL); + e_book_get_cursor(book, "(contains \"x-evolution-any-field\" \"\")", get_cursor_cb, NULL); printf ("Done getting all cards.\n"); } -- cgit v1.2.3