Bug #593753 - Calendar search in list view doesn't work properly
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user