[evolution] Bug #596860 - Duplicate event gets shown in calendar view



commit 14c68f8e45dad27b09047e03929517111344219f
Author: Milan Crha <mcrha redhat com>
Date:   Fri Oct 16 11:37:34 2009 +0200

    Bug #596860 - Duplicate event gets shown in calendar view
    
    Interim/partial solution.

 calendar/gui/e-cal-model.c                  |    5 +++++
 modules/calendar/e-cal-shell-view-private.c |    2 --
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index cf515d5..33c209e 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2130,6 +2130,11 @@ add_new_client (ECalModel *model, ECal *client, gboolean do_query)
 	/* Look to see if we already have this client */
 	client_data = find_client_data (model, client);
 	if (client_data) {
+		if (do_query && client_data->client == priv->default_client) {
+			g_warning ("%s: %s: You shouldn't request a query on a default client", G_STRLOC, G_STRFUNC);
+			return client_data;
+		}
+
 		if (client_data->do_query)
 			return client_data;
 		else
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 89d8ef5..8a7e376 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -328,8 +328,6 @@ cal_shell_view_user_created_cb (ECalShellView *cal_shell_view,
 
 	cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar;
 	e_cal_shell_sidebar_add_source (cal_shell_sidebar, source);
-
-	e_cal_model_add_client (model, client);
 }
 
 static void



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