diff options
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r-- | addressbook/backend/pas/pas-backend-file.c | 17 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-book-view.c | 4 |
2 files changed, 17 insertions, 4 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index 88e78382e5..74b8613d3d 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -475,6 +475,7 @@ pas_backend_file_search (PASBackendFile *bf, { int db_error = 0; GList *cards = NULL; + gint card_count = 0; DB *db = bf->priv->file_db; DBT id_dbt, vcard_dbt; int i; @@ -518,6 +519,18 @@ pas_backend_file_search (PASBackendFile *bf, /* check if the vcard matches the search sexp */ if (vcard_matches_search (view, vcard_string)) { cards = g_list_append (cards, g_strdup (vcard_string)); + ++card_count; +#if 0 + /* If we've accumulated a number of matches, pass them off to the client. */ + if (card_count > 50) { + pas_book_view_notify_add (view->book_view, cards); + /* Clean up the handed-off data. */ + g_list_foreach (cards, (GFunc)g_free, NULL); + g_list_free (cards); + cards = NULL; + card_count = 0; + } +#endif } } @@ -528,7 +541,9 @@ pas_backend_file_search (PASBackendFile *bf, g_warning ("pas_backend_file_search: error building list\n"); } - pas_book_view_notify_add (view->book_view, cards); + // if (card_count) + pas_book_view_notify_add (view->book_view, cards); + pas_book_view_notify_complete (view->book_view); /* diff --git a/addressbook/backend/pas/pas-book-view.c b/addressbook/backend/pas/pas-book-view.c index 12e46533a4..db56ae1cff 100644 --- a/addressbook/backend/pas/pas-book-view.c +++ b/addressbook/backend/pas/pas-book-view.c @@ -154,7 +154,7 @@ pas_book_view_notify_status_message (PASBookView *book_view, book_view->priv->listener, message, &ev); if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_view_notify_complete: Exception signaling BookViewListener!\n"); + g_warning ("pas_book_view_notify_status_message: Exception signaling BookViewListener!\n"); } CORBA_exception_free (&ev); @@ -248,7 +248,6 @@ pas_book_view_destroy (GtkObject *object) GNOME_Evolution_Addressbook_BookViewListener_unref (book_view->priv->listener, &ev); if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("Unable to unref listener object in pas-book-view.c\n"); CORBA_exception_free (&ev); return; @@ -256,7 +255,6 @@ pas_book_view_destroy (GtkObject *object) CORBA_Object_release (book_view->priv->listener, &ev); if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("Unable to release listener object in pas-book-view.c\n"); CORBA_exception_free (&ev); return; |