From a1b984a5fb42b96ea7f99a14a427bd1b3e19b606 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 20 Sep 2002 12:53:26 +0000 Subject: remove the query from the cache if it failed. (start_cached_query_cb): 2002-09-20 Rodrigo Moya * pcs/query.c (parse_sexp): remove the query from the cache if it failed. (start_cached_query_cb): notify of errors in the query. svn path=/trunk/; revision=18133 --- calendar/ChangeLog | 6 ++++++ calendar/pcs/query.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b39e4aec63..91eea57af8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2002-09-20 Rodrigo Moya + + * pcs/query.c (parse_sexp): remove the query from the cache if it + failed. + (start_cached_query_cb): notify of errors in the query. + 2002-09-19 Rodrigo Moya * pcs/query.c: added a list of EComponentListener's to control the diff --git a/calendar/pcs/query.c b/calendar/pcs/query.c index 73d40324b2..15b5c41ec2 100644 --- a/calendar/pcs/query.c +++ b/calendar/pcs/query.c @@ -1148,6 +1148,10 @@ parse_sexp (Query *query) e_sexp_unref (priv->esexp); priv->esexp = NULL; + /* remove the query from the list of cached queries */ + cached_queries = g_list_remove (cached_queries, query); + bonobo_object_unref (BONOBO_OBJECT (query)); + return FALSE; } @@ -1462,6 +1466,19 @@ start_cached_query_cb (gpointer data) } else if (priv->state == QUERY_IN_PROGRESS) { /* if it's in progress, we just wait */ return TRUE; + } else if (priv->state == QUERY_PARSE_ERROR) { + CORBA_exception_init (&ev); + GNOME_Evolution_Calendar_QueryListener_notifyQueryDone ( + info->ql, + GNOME_Evolution_Calendar_QueryListener_PARSE_ERROR, + _("Parse error"), + &ev); + + if (BONOBO_EX (&ev)) + g_message ("start_cached_query_cb(): Could not notify the listener of " + "a parse error"); + + CORBA_exception_free (&ev); } /* if the query is done, then we just notify the listener */ -- cgit v1.2.3