diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/pcs/query.c | 17 |
2 files changed, 23 insertions, 0 deletions
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 <rodrigo@ximian.com> + + * 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 <rodrigo@ximian.com> * 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 */ |