remove the client from the list if there are errors, instead of re-adding

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.

svn path=/trunk/; revision=23909
This commit is contained in:
Rodrigo Moya
2003-12-10 15:44:24 +00:00
committed by Rodrigo Moya
parent 9211df58c4
commit 82bfd7cc1c
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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;
}