diff options
-rw-r--r-- | plugins/itip-formatter/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/itip-formatter/itip-formatter.c | 19 |
2 files changed, 23 insertions, 2 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index bf9b7cd76e..535a805b23 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,3 +1,9 @@ +2005-01-25 JP Rosevear <jpr@novell.com> + + * 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 + 2005-01-14 JP Rosevear <jpr@novell.com> * itip-formatter.c (extract_itip_data): use 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, "<table border=0 width=\"100%%\" cellpadding=3><tr>"); - camel_stream_printf (target->stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", CLASSID); + camel_stream_printf (target->stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", classid); camel_stream_printf (target->stream, "</td></tr></table>"); + + g_free (classid); } static void |