aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter/itip-formatter.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-26 12:52:12 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-26 12:52:12 +0800
commitd9977014413961c4914c90b100e84911f3936d81 (patch)
tree25dd5f8831379daee84437d3224d7e4fec815485 /plugins/itip-formatter/itip-formatter.c
parentef64d3dad964629ecd4a16a3cb5cfeb3cbb688a5 (diff)
downloadgsoc2013-evolution-d9977014413961c4914c90b100e84911f3936d81.tar.gz
gsoc2013-evolution-d9977014413961c4914c90b100e84911f3936d81.tar.zst
gsoc2013-evolution-d9977014413961c4914c90b100e84911f3936d81.zip
actually destroy the client hashes so the signals get cleaned up
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 svn path=/trunk/; revision=28558
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r--plugins/itip-formatter/itip-formatter.c19
1 files changed, 17 insertions, 2 deletions
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