From 32bffd275509124b75f409b190e571b6df2e9d32 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Fri, 16 Jun 2006 08:59:49 +0000 Subject: Fixes #179774 svn path=/trunk/; revision=32159 --- plugins/itip-formatter/ChangeLog | 7 +++++++ plugins/itip-formatter/itip-formatter.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index e968a282cd..cb8ccb93b3 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,3 +1,10 @@ +2006-06-16 Chenthill Palanisamy + + Fixes #179774 (b.n.c) + * itip-formatter.c: (cal_opened_cb), (find_cal_opened_cb): + Reset the current_ecal and disable the buttons if the calendar + is not opened properly. + 2006-06-09 Chris Heath * itip-view.c (itip_view_destroy): Fix memory leak. diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index d51f54cb1b..6d5f532206 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -273,6 +273,12 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) ITIP_VIEW_INFO_ITEM_TYPE_WARNING, _("Failed to load the calendar '%s'"), e_source_peek_name (source)); + + if (pitip->current_ecal == ecal) { + pitip->current_ecal = NULL; + itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE); + } + g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source)); return; } @@ -391,6 +397,11 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) ITIP_VIEW_INFO_ITEM_TYPE_WARNING, _("Failed to load the calendar '%s'"), e_source_peek_name (source)); + if (pitip->current_ecal == ecal) { + pitip->current_ecal = NULL; + itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE); + } + g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source)); goto cleanup; } @@ -444,7 +455,6 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) itip_view_set_show_recur_check (ITIP_VIEW (pitip->view), FALSE); } - cleanup: d(printf ("Decreasing itip formatter search count to %d\n", fd->count)); -- cgit v1.2.3