[evolution] Bug 611727 - Date navigator marks dates for inactive calendars



commit 92e1807bd758995edc6600856c3fb0a4ee546fdf
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Mar 9 19:42:36 2010 -0500

    Bug 611727 - Date navigator marks dates for inactive calendars

 calendar/gui/e-cal-model.c                  |    7 +++++++
 modules/calendar/e-cal-shell-view-private.c |    4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 7533e56..1004d1b 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1573,12 +1573,19 @@ GList *
 e_cal_model_get_client_list (ECalModel *model)
 {
 	GList *list = NULL, *l;
+	ECal *default_client;
 
 	g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
 
+	default_client = model->priv->default_client;
+
 	for (l = model->priv->clients; l != NULL; l = l->next) {
 		ECalModelClient *client_data = (ECalModelClient *) l->data;
 
+		/* Exclude the default client if we're not querying it. */
+		if (client_data->client == default_client && !client_data->do_query)
+			continue;
+
 		list = g_list_append (list, client_data->client);
 	}
 
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index e5c1ed4..89e48ac 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -278,6 +278,8 @@ cal_shell_view_selector_client_added_cb (ECalShellView *cal_shell_view,
 	model = gnome_calendar_get_model (calendar);
 
 	e_cal_model_add_client (model, client);
+
+	gnome_calendar_update_query (calendar);
 }
 
 static void
@@ -293,6 +295,8 @@ cal_shell_view_selector_client_removed_cb (ECalShellView *cal_shell_view,
 	model = gnome_calendar_get_model (calendar);
 
 	e_cal_model_remove_client (model, client);
+
+	gnome_calendar_update_query (calendar);
 }
 
 static void



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