diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-06-04 09:43:27 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-06-04 09:43:27 +0800 |
commit | faad8a01e1a4fc4d425ed2ff850158339fb6bd37 (patch) | |
tree | b8be0cb43801b31d3573e5b0968d9e252dedb239 /calendar/gui/e-cal-model.c | |
parent | 8bebb05056fd093d0302546fc65edb130c3c136a (diff) | |
download | gsoc2013-evolution-faad8a01e1a4fc4d425ed2ff850158339fb6bd37.tar.gz gsoc2013-evolution-faad8a01e1a4fc4d425ed2ff850158339fb6bd37.tar.zst gsoc2013-evolution-faad8a01e1a4fc4d425ed2ff850158339fb6bd37.zip |
Added advanced search options.
svn path=/trunk/; revision=33648
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 31 |
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 * |