aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 78afb704a3..5cdc412a54 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1812,6 +1812,37 @@ e_cal_model_set_search_query (ECalModel *model, const char *sexp)
}
/**
+ * e_cal_model_set_query
+ */
+void
+e_cal_model_set_search_query_with_time_range (ECalModel *model, const char *sexp, time_t start, time_t end)
+{
+ ECalModelPrivate *priv;
+ gboolean do_query = FALSE;
+
+ g_return_if_fail (E_IS_CAL_MODEL (model));
+
+ priv = model->priv;
+
+ if (strcmp (sexp ? sexp : "", priv->search_sexp ? priv->search_sexp : "")) {
+ if (priv->search_sexp)
+ g_free (priv->search_sexp);
+
+ priv->search_sexp = g_strdup (sexp);
+ do_query = TRUE;
+ }
+
+ if (!(priv->start == start && priv->end == end)) {
+ priv->start = start;
+ priv->end = end;
+ do_query = TRUE;
+ }
+
+ if (do_query)
+ redo_queries (model);
+}
+
+/**
* e_cal_model_create_component_with_defaults
*/
icalcomponent *