aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/gnome-cal.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 094d6f2003..316567d8e6 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-10 Rodrigo Moya <rodrigo@ximian.com>
+
+ * gui/gnome-cal.c (gnome_calendar_add_event_uri): remove the client
+ from the list if there are errors, instead of re-adding it again.
+ Also, unref the ECal object on errors, for not leaking.
+
2003-12-10 Bolian Yin <bolian.yin@sun.com>
*gui/e-week-view.c: Fix a event/jump button tabbing bug
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 8978f38988..773c367a94 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2173,9 +2173,11 @@ gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
/* FIXME Do this async? */
if (!e_cal_open (client, FALSE, NULL)) {
g_hash_table_remove (priv->clients, str_uri);
- priv->clients_list = g_list_prepend (priv->clients_list, client);
+ priv->clients_list = g_list_remove (priv->clients_list, client);
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
+ 0, 0, NULL, NULL, gcal);
+
+ g_object_unref (client);
return FALSE;
}