Bug #593753 - Calendar search in list view doesn't work properly

This commit is contained in:
Milan Crha
2009-10-14 21:17:36 +02:00
parent 51f9daed70
commit 7b220adafe
2 changed files with 10 additions and 13 deletions

View File

@ -2407,6 +2407,8 @@ e_cal_model_set_search_query_with_time_range (ECalModel *model, const gchar *sex
priv->start = start;
priv->end = end;
do_query = TRUE;
g_signal_emit (G_OBJECT (model), signals[TIME_RANGE_CHANGED], 0, start, end);
}
if (do_query)

View File

@ -1126,7 +1126,7 @@ gnome_calendar_set_search_query (GnomeCalendar *gcal,
g_free (priv->sexp);
priv->sexp = g_strdup (sexp);
priv->lview_select_daten_range = range_search;
priv->lview_select_daten_range = !range_search;
start = start_range;
end = end_range;
@ -1137,20 +1137,15 @@ gnome_calendar_set_search_query (GnomeCalendar *gcal,
i = priv->current_view_type;
/* Set the query on the views */
if (i == GNOME_CAL_LIST_VIEW) {
if (!priv->lview_select_daten_range) {
e_cal_model_set_search_query_with_time_range (
model, sexp, start, end);
} else {
start = priv->base_view_time;
get_times_for_views (gcal, GNOME_CAL_LIST_VIEW, &start, &end, NULL);
if (i == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range) {
start = priv->base_view_time;
get_times_for_views (gcal, GNOME_CAL_LIST_VIEW, &start, &end, NULL);
e_cal_model_set_search_query_with_time_range (
model, sexp, start, end);
e_cal_model_set_search_query_with_time_range (
model, sexp, start, end);
if (priv->current_view_type == GNOME_CAL_LIST_VIEW)
gnome_calendar_update_date_navigator (gcal);
}
if (priv->current_view_type == GNOME_CAL_LIST_VIEW)
gnome_calendar_update_date_navigator (gcal);
} else
e_cal_model_set_search_query (model, sexp);