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



commit 7b220adafee34b86ef82d6130c7bc03c1bfd7adf
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 14 21:17:36 2009 +0200

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

 calendar/gui/e-cal-model.c |    2 ++
 calendar/gui/gnome-cal.c   |   21 ++++++++-------------
 2 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index d4d2f02..ccf2edf 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -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)
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 4a8c5c4..90cf8ce 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]