[evolution-patches] has-reccurences sexp
- From: Christian Kellner <gicmo xatom net>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] has-reccurences sexp
- Date: Wed, 03 Dec 2003 00:33:44 +0100
Hi,
This patch adds the "(has-reccurences?)" feature to
calendar/libedata-cal/e-cal-backend-sexp.c, so you can query for
reccurent master events. Martin Grimme and me need this for the
"calendar-clock-panel integration bounty".
Greetings,
Christian Kellner
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.31
diff -u -r1.31 ChangeLog
--- calendar/ChangeLog 2 Dec 2003 06:41:08 -0000 1.31
+++ calendar/ChangeLog 2 Dec 2003 23:16:36 -0000
@@ -1,3 +1,8 @@
+2003-12-03 Christian Kellnerc <gicmo xatom net>
+
+ * libedata-cal/e-cal-backend-sexp.c: added has-recurrences sexp
+ function
+
Index: calendar/libedata-cal/e-cal-backend-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sexp.c,v
retrieving revision 1.4
diff -u -r1.4 e-cal-backend-sexp.c
--- calendar/libedata-cal/e-cal-backend-sexp.c 11 Nov 2003 14:58:37 -0000 1.4
+++ calendar/libedata-cal/e-cal-backend-sexp.c 2 Dec 2003 23:16:38 -0000
@@ -542,6 +542,31 @@
return result;
}
+/* (has-recurrences?)
+ *
+ * A boolean value for components that have/dont have recurrences.
+ *
+ * Returns: a boolean indicating whether the component has recurrences or not.
+ */
+static ESExpResult *
+func_has_recurrences (ESExp *esexp, int argc, ESExpResult **argv, void *data)
+{
+ SearchContext *ctx = data;
+ ESExpResult *result;
+
+ /* Check argument types */
+
+ if (argc != 0) {
+ e_sexp_fatal_error (esexp, _("has-recurrences? expects no arguments"));
+ return NULL;
+ }
+
+ result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
+ result->value.bool = e_cal_component_has_recurrences (ctx->comp);
+
+ return result;
+}
+
/* (is-completed?)
*
* Returns a boolean indicating whether the component is completed (i.e. has
@@ -768,6 +793,7 @@
{ "occur-in-time-range?", func_occur_in_time_range, 0 },
{ "contains?", func_contains, 0 },
{ "has-alarms?", func_has_alarms, 0 },
+ { "has-recurrences?", func_has_recurrences, 0 },
{ "has-categories?", func_has_categories, 0 },
{ "is-completed?", func_is_completed, 0 },
{ "completed-before?", func_completed_before, 0 }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]