[evolution-patches] Re: [Evolution-hackers] e_cal_get_object_list query
- From: William Jon McCann <mccannwj pha jhu edu>
- To: JP Rosevear <jpr ximian com>
- Cc: evolution-patches lists ximian com
- Subject: [evolution-patches] Re: [Evolution-hackers] e_cal_get_object_list query
- Date: Tue, 02 Dec 2003 00:52:18 -0500
JP Rosevear wrote:
Generally, you don't want to change things you don't have to, so
changing the cast stuff isn't we really desired. Also if you could fix
the G_OBJECT cast in the unref that would be cool (its not necessary,
removing it should not cause warnings or anything).
-JP
Roger. Is this ok?
Jon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.30
diff -u -r1.30 ChangeLog
--- ChangeLog 1 Dec 2003 19:25:23 -0000 1.30
+++ ChangeLog 2 Dec 2003 05:47:28 -0000
@@ -1,3 +1,8 @@
+2003-12-01 William Jon McCann <mccann jhu edu>
+
+ * libecal/e-cal.c (e_cal_generate_instances): Fix query and
+ get object list as components.
+
2003-12-01 Rodrigo Moya <rodrigo ximian com>
* libedata-cal/e-cal-backend-cache.[ch]: changed to be based on the
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.8
diff -u -r1.8 e-cal.c
--- libecal/e-cal.c 27 Nov 2003 02:30:09 -0000 1.8
+++ libecal/e-cal.c 2 Dec 2003 05:47:34 -0000
@@ -2627,6 +2627,7 @@
GList *instances;
GList *l;
char *query;
+ char *iso_start, *iso_end;
g_return_if_fail (ecal != NULL);
g_return_if_fail (E_IS_CAL (ecal));
@@ -2638,9 +2639,14 @@
g_return_if_fail (start <= end);
g_return_if_fail (cb != NULL);
+ iso_start = isodate_from_time_t (start);
+ iso_end = isodate_from_time_t (end);
/* Generate objects */
- query = g_strdup_printf ("(occur-in-time-range? (%lu) (%lu))", start, end);
- if (!e_cal_get_object_list (ecal, query, &objects, NULL)) {
+ query = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\") (make-time \"%s\"))",
+ iso_start, iso_end);
+ g_free (iso_start);
+ g_free (iso_end);
+ if (!e_cal_get_object_list_as_comp (ecal, query, &objects, NULL)) {
g_free (query);
return;
}
@@ -2655,7 +2661,7 @@
e_cal_recur_generate_instances (comp, start, end, add_instance, &instances,
e_cal_resolve_tzid_cb, ecal,
priv->default_zone);
- g_object_unref (G_OBJECT (comp));
+ g_object_unref (comp);
}
g_list_free (objects);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]