aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-05-27 00:07:41 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-05-27 00:07:41 +0800
commit46c1d69823638605e633838cda728e9b02e11117 (patch)
tree3b875d7e7f329bbd41c90f7586e9f513bbb063d4 /calendar
parent0ebfe907f6674babd7c79f1cefda849bfe90b2a4 (diff)
downloadgsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar.gz
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar.bz2
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar.lz
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar.xz
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.tar.zst
gsoc2013-evolution-46c1d69823638605e633838cda728e9b02e11117.zip
Fixes #57759
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. svn path=/trunk/; revision=26104
Diffstat (limited to 'calendar')
-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: