aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/gnome-cal.c16
2 files changed, 23 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3733afa6ed..c2bceead38 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-26 Rodrigo Moya <rodrigo@ximian.com>
+
+ Fixes #57759
+
+ * gui/gnome-cal.c (gnome_calendar_remove_source_by_uid): remove all
+ queries we've got for the removed source.
+
2004-05-26 Kidd Wang <kidd.wang@sun.com>
* gui/e-week-view.c: (e_week_view_event_move),
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 7c23ce00d9..2819cb986c 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -680,6 +680,7 @@ update_query (GnomeCalendar *gcal)
if (e_cal_get_load_state ((ECal *) l->data) != E_CAL_LOAD_LOADED)
continue;
+ old_query = NULL;
if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, NULL)) {
g_warning (G_STRLOC ": Could not create the query");
@@ -2243,6 +2244,7 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
ECal *client;
ECalModel *model;
int i;
+ GList *l;
g_return_val_if_fail (gcal != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
@@ -2260,10 +2262,24 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT:
+ /* remove the query for this client */
+ for (l = priv->dn_queries; l != NULL; l = l->next) {
+ ECalView *query = l->data;
+
+ if (query && (client == e_cal_view_get_client (query))) {
+ g_signal_handlers_disconnect_matched (query, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, gcal);
+ priv->dn_queries = g_list_remove (priv->dn_queries, query);
+ g_object_unref (query);
+ break;
+ }
+ }
+
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
model = e_calendar_view_get_model (priv->views[i]);
e_cal_model_remove_client (model, client);
}
+
break;
case E_CAL_SOURCE_TYPE_TODO: