From 65117fc884fdc8772306d97b076807b0ab3998e2 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 26 Jun 2002 10:45:15 +0000 Subject: Fixes #25410 2002-06-25 Rodrigo Moya Fixes #25410 * gui/alarm-notify.c (AlarmNotify_removeCalendar): do proper cleanup on removal of clients. (alarm_notify_add_calendar): ditto. svn path=/trunk/; revision=17287 --- calendar/gui/alarm-notify/alarm-notify.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 991a10647f..a2b3d1ae9d 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -329,6 +329,10 @@ AlarmNotify_removeCalendar (PortableServer_Servant servant, g_hash_table_remove (priv->uri_client_hash, str_uri); g_free (orig_str); + gtk_signal_disconnect_by_data (GTK_OBJECT (lc->client), lc); + if (lc->timeout_id != -1) + g_source_remove (lc->timeout_id); + alarm_queue_remove_client (lc->client); gtk_object_unref (GTK_OBJECT (lc->client)); e_uri_free (lc->uri); g_free (lc); @@ -425,6 +429,9 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a } if (g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, &s, &lc)) { + g_hash_table_remove (priv->uri_client_hash, str_uri); + + gtk_signal_disconnect_by_data (GTK_OBJECT (lc->client), lc); if (lc->timeout_id != -1) g_source_remove (lc->timeout_id); alarm_queue_remove_client (lc->client); @@ -450,6 +457,7 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a lc->client = client; lc->uri = uri; lc->refcount = 1; + lc->timeout_id = -1; g_hash_table_insert (priv->uri_client_hash, g_strdup (str_uri), lc); } else { -- cgit v1.2.3