diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify.c | 18 |
2 files changed, 13 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b7e5de5bbb..271dd513fc 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2002-06-10 Rodrigo Moya <rodrigo@ximian.com> + + * gui/alarm-notify/alarm-notify.c (alarm_notify_add_calendar): removed + already loaded client when asked to be opened again, and *really* + re-open it again. + 2002-06-04 Christopher James Lahey <clahey@ximian.com> * gui/gnome-cal.c (gnome_calendar_setup_view_menus): diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 2f7889b4db..d6ae6c70d9 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -415,6 +415,7 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a EUri *uri; CalClient *client; LoadedClient *lc; + char *s; g_return_if_fail (an != NULL); g_return_if_fail (IS_ALARM_NOTIFY (an)); @@ -431,15 +432,12 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a return; } - lc = g_hash_table_lookup (priv->uri_client_hash, str_uri); - - if (lc) { - if (load_afterwards) - add_uri_to_load (uri); - e_uri_free (uri); - g_assert (lc->refcount > 0); - lc->refcount++; - return; + if (g_hash_table_lookup_extended (priv->uri_client_hash, str_uri, &s, &lc)) { + alarm_queue_remove_client (lc->client); + gtk_object_unref (GTK_OBJECT (lc->client)); + e_uri_free (lc->uri); + g_free (lc); + g_free (s); } client = cal_client_new (); @@ -472,6 +470,4 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a NULL); return; } - - e_uri_free (uri); } |