diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-03-16 16:16:29 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-03-16 16:16:29 +0800 |
commit | 57de6972c845dbae49717a4520aeed75f88f0078 (patch) | |
tree | f58e45cdbb09793d8a09506af00c70b1ca63a389 /addressbook/backend/ebook/e-book-view-listener.c | |
parent | 403205b15e9f14472711ee115cae17031eb4ce7b (diff) | |
download | gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar.gz gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar.bz2 gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar.lz gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar.xz gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.tar.zst gsoc2013-evolution-57de6972c845dbae49717a4520aeed75f88f0078.zip |
Added addressbook querying and "cardification" functions, which are turned
2001-03-15 Jon Trowbridge <trow@ximian.com>
* gui/component/e-address-widget.c: Added addressbook querying and
"cardification" functions, which are turned off by default for now
because of addressbook bugs. Added a popup menu option to turn
queries on, so that others can enjoy the thrill of massive flaming
death.
* gui/component/addressbook-factory.c (main): Made warnings always
be fatal.
* backend/pas/pas-book-view.c: Added some debugging spew.
* backend/pas/pas-backend-file.c (pas_backend_file_search): Added
a little experimental code to try to make file searches scale
better. #if 0/#endif-ed out for now.
* contact-editor/e-contact-quick-add.c: #included e-book-util.h.
* backend/ebook/e-card.c (e_card_name_match_string): Added.
Looser name-matching function.
(e_card_email_match_string): Added. Loose e-mail matching.
* backend/ebook/e-book-view-listener.c
(e_book_view_listener_check_queue): Added code to cause us to
abort rather than get trapped in a 100%-CPU-consuming loop in
certain situations. Now we just need to figure out how to avoid
these situations altogether.
* backend/ebook/e-book-util.c: Added. Now contains the simple
query stuff and the open local addressbook functions.
* backend/ebook/e-book.c: Moved simple query stuff and open local
addressbook functions into e-book-util.c.
2001-03-15 Jon Trowbridge <trow@ximian.com>
* wombat.c (main): If we can't initialize a service on startup,
tell us which one before terminating.
svn path=/trunk/; revision=8754
Diffstat (limited to 'addressbook/backend/ebook/e-book-view-listener.c')
-rw-r--r-- | addressbook/backend/ebook/e-book-view-listener.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c index 4ad674ccd8..8433d1cc29 100644 --- a/addressbook/backend/ebook/e-book-view-listener.c +++ b/addressbook/backend/ebook/e-book-view-listener.c @@ -33,12 +33,31 @@ struct _EBookViewListenerPrivate { static gboolean e_book_view_listener_check_queue (EBookViewListener *listener) { + static gint thrash = 0; + gint queue_len; + + queue_len = g_list_length (listener->priv->response_queue); + bonobo_object_ref (BONOBO_OBJECT (listener)); if (listener->priv->response_queue != NULL) { gtk_signal_emit (GTK_OBJECT (listener), e_book_view_listener_signals [RESPONSES_QUEUED]); } + /* This means we didn't make any progress in dealing with what is on our + response queue. */ + if (queue_len == g_list_length (listener->priv->response_queue)) + ++thrash; + else + thrash = 0; + + if (thrash > 20) { + g_error ("e_book_view_listener_check_queue thrashing!"); + thrash = 0; + listener->priv->idle_id = 0; + return FALSE; + } + if (listener->priv->response_queue == NULL) { listener->priv->idle_id = 0; bonobo_object_unref (BONOBO_OBJECT (listener)); |