From faad22f59697728e87601c46d17605426ed46b6b Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 26 Sep 2002 11:14:56 +0000 Subject: Should fix once for all #24210 2002-09-26 Rodrigo Moya Should fix once for all #24210 * idl/evolution-calendar.idl: changed the notifyObjUpdated method of the QueryListener interface accept a list of UIDs. * cal-client/query-listener.[ch] (impl_notifyObjUpdated): likewise for the QueryListener class. * cal-client/cal-query.c (obj_updated_cb): changed to adapt the multiple-id's received in the QueryListener class' signal to the one-by-one update notification of the public CalQuery class, thus keeping the changes needed for this minimal. * pcs/query.c (add_component, start_cached_query_cb): changed to send sequences of UIDs. svn path=/trunk/; revision=18232 --- calendar/cal-client/cal-query.c | 10 +++++++--- calendar/cal-client/query-listener.c | 6 +++--- calendar/cal-client/query-listener.h | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'calendar/cal-client') diff --git a/calendar/cal-client/cal-query.c b/calendar/cal-client/cal-query.c index e1bef97e3c..80ffe5c845 100644 --- a/calendar/cal-client/cal-query.c +++ b/calendar/cal-client/cal-query.c @@ -244,18 +244,22 @@ marshal_query_done (GtkObject *object, GtkSignalFunc func, gpointer func_data, G /* Callback used when an object is updated in the query */ static void obj_updated_cb (QueryListener *ql, - const GNOME_Evolution_Calendar_CalObjUID uid, + const GNOME_Evolution_Calendar_CalObjUIDSeq *uids, CORBA_boolean query_in_progress, CORBA_long n_scanned, CORBA_long total, gpointer data) { CalQuery *query; + int n; query = CAL_QUERY (data); - gtk_signal_emit (GTK_OBJECT (query), query_signals[OBJ_UPDATED], - uid, query_in_progress, (int) n_scanned, (int) total); + for (n = 0; n < uids->_length; n++) { + gtk_signal_emit (GTK_OBJECT (query), query_signals[OBJ_UPDATED], + uids->_buffer[n], query_in_progress, + (int) n_scanned, (int) total); + } } /* Callback used when an object is removed from the query */ diff --git a/calendar/cal-client/query-listener.c b/calendar/cal-client/query-listener.c index 1b21c1e667..ab02f2faca 100644 --- a/calendar/cal-client/query-listener.c +++ b/calendar/cal-client/query-listener.c @@ -47,7 +47,7 @@ static void query_listener_init (QueryListener *ql); static void query_listener_destroy (GtkObject *object); static void impl_notifyObjUpdated (PortableServer_Servant servant, - GNOME_Evolution_Calendar_CalObjUID uid, + GNOME_Evolution_Calendar_CalObjUIDSeq *uids, CORBA_boolean query_in_progress, CORBA_long n_scanned, CORBA_long total, @@ -146,7 +146,7 @@ query_listener_destroy (GtkObject *object) /* ::notifyObjUpdated() method */ static void impl_notifyObjUpdated (PortableServer_Servant servant, - GNOME_Evolution_Calendar_CalObjUID uid, + GNOME_Evolution_Calendar_CalObjUIDSeq *uids, CORBA_boolean query_in_progress, CORBA_long n_scanned, CORBA_long total, @@ -162,7 +162,7 @@ impl_notifyObjUpdated (PortableServer_Servant servant, return; g_assert (priv->obj_updated_fn != NULL); - (* priv->obj_updated_fn) (ql, uid, query_in_progress, n_scanned, total, priv->fn_data); + (* priv->obj_updated_fn) (ql, uids, query_in_progress, n_scanned, total, priv->fn_data); } /* ::notifyObjRemoved() method */ diff --git a/calendar/cal-client/query-listener.h b/calendar/cal-client/query-listener.h index e553d37a49..65cc9fbad4 100644 --- a/calendar/cal-client/query-listener.h +++ b/calendar/cal-client/query-listener.h @@ -53,7 +53,7 @@ typedef struct { /* Notification functions */ typedef void (* QueryListenerObjUpdatedFn) (QueryListener *ql, - const GNOME_Evolution_Calendar_CalObjUID uid, + const GNOME_Evolution_Calendar_CalObjUIDSeq *uids, CORBA_boolean query_in_progress, CORBA_long n_scanned, CORBA_long total, -- cgit v1.2.3