From d9977014413961c4914c90b100e84911f3936d81 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 26 Jan 2005 04:52:12 +0000 Subject: actually destroy the client hashes so the signals get cleaned up 2005-01-25 JP Rosevear * itip-formatter.c (pitip_free): actually destroy the client hashes so the signals get cleaned up (format_itip): create a proper unique classid for the pobject svn path=/trunk/; revision=28558 --- plugins/itip-formatter/itip-formatter.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'plugins/itip-formatter/itip-formatter.c') diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 08757caae3..a11efc561f 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -1499,6 +1499,16 @@ static void pitip_free (EMFormatHTMLPObject *pobject) { FormatItipPObject *pitip = (FormatItipPObject *) pobject; + int i; + + for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) { + if (pitip->source_lists[i]) + g_object_unref (pitip->source_lists[i]); + pitip->source_lists[i] = NULL; + + g_hash_table_destroy (pitip->ecals[i]); + pitip->ecals[i] = NULL; + } g_free (pitip->vcalendar); pitip->vcalendar = NULL; @@ -1537,8 +1547,11 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) { FormatItipPObject *pitip; GConfClient *gconf; + char *classid; - pitip = (FormatItipPObject *) em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (FormatItipPObject), CLASSID, target->part, format_itip_object); + classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str); + + pitip = (FormatItipPObject *) em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (FormatItipPObject), classid, target->part, format_itip_object); pitip->pobject.free = pitip_free; gconf = gconf_client_get_default (); @@ -1546,8 +1559,10 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) g_object_unref (gconf); camel_stream_printf (target->stream, ""); - camel_stream_printf (target->stream, "
", CLASSID); + camel_stream_printf (target->stream, "", classid); camel_stream_printf (target->stream, "
"); + + g_free (classid); } static void -- cgit