From 3b562b0b9f81cdd6cedea7c7c53272a98568e63a Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 12 Apr 2001 16:29:56 +0000 Subject: New function to restart a query for the day view. (query_obj_updated_cb): 2001-04-12 Federico Mena Quintero * gui/e-day-view.c (update_query): New function to restart a query for the day view. (query_obj_updated_cb): Renamed from obj_updated_cb(); updated for queries instead of calendar clients. (query_obj_removed_cb): Likewise. (cal_opened_cb): Just update_query() instead of queueing reloading all the events. (e_day_view_set_cal_client): Likewise. (e_day_view_set_query): Likewise. (e_day_view_set_selected_time_range): Likewise. (e_day_view_set_days_shown): Likewise. (e_day_view_recalc_work_week): Likewise. (e_day_view_queue_reload_events): Removed function now that events are updated entirely by the query. (e_day_view_reload_events_idle_cb): Likewise. (e_day_view_reload_events): Likewise. (e_day_view_init): Use a pretty arrow instead of GDK_TOP_LEFT_ARROW. * gui/e-week-view.c: Analogous changes to the ones in e-day-view.c. (e_week_view_init): Use a pretty arrow instead of GDK_TOP_LEFT_ARROW. * cal-util/timeutil.c (isodate_from_time_t): Return a g_strdup()ed version of the string instead of a pointer to a static buffer. (time_from_isodate): Resurrected function. Polished up to our current standards of paranoia. * pcs/query.c (func_time_now): New function (time-now). (func_make_time): New function (make-time ISODATE). (func_time_add_day): New function (time-add-day TIME N). (func_time_day_begin): New function (time-day-begin TIME). (func_time_day_end): New function (time-day-end TIME). (func_occur_in_time_range): Use time_t values instead of ints. (match_component): Free the stringized component. Free the ESexp result value. * gui/e-day-view.h: Removed a couple of unused prototypes. * pcs/query.c (query_destroy): Oops, disconnect from the backend. * pcs/cal.c (Cal_get_query): Duplicate the query reference before we return it. * gui/calendar-commands.c (pixmaps): Fixed paths to image files. svn path=/trunk/; revision=9266 --- calendar/pcs/cal.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'calendar/pcs/cal.c') diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c index 3129665466..e723c077cb 100644 --- a/calendar/pcs/cal.c +++ b/calendar/pcs/cal.c @@ -456,6 +456,8 @@ Cal_get_query (PortableServer_Servant servant, Cal *cal; CalPrivate *priv; Query *query; + CORBA_Environment ev2; + GNOME_Evolution_Calendar_Query query_copy; cal = CAL (bonobo_object_from_servant (servant)); priv = cal->priv; @@ -468,7 +470,20 @@ Cal_get_query (PortableServer_Servant servant, return CORBA_OBJECT_NIL; } - return BONOBO_OBJREF (query); + CORBA_exception_init (&ev2); + query_copy = CORBA_Object_duplicate (BONOBO_OBJREF (query), &ev2); + if (ev2._major != CORBA_NO_EXCEPTION) { + CORBA_exception_free (&ev2); + g_message ("Cal_get_query(): Could not duplicate the query reference"); + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate, + NULL); + return CORBA_OBJECT_NIL; + } + + CORBA_exception_free (&ev2); + + return query_copy; } /** -- cgit