From b39cda14b7678b925a6e3e645b60fb9858fdfaf6 Mon Sep 17 00:00:00 2001 From: bertrand Date: Thu, 17 Feb 2000 15:19:04 +0000 Subject: revamped so that it uses the output stream of the data wrapper 2000-02-17 bertrand * camel/camel-formatter.c (handle_text_plain): revamped so that it uses the output stream of the data wrapper (handle_text_html): ditto. * camel/camel-simple-data-wrapper.h: * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): use (void) instead of (). (_get_output_stream): simple implementation. A lot of small fixes so that the new parser scheme works properly. Simple implementation of the stream though. Changed vette-formatter files so that they work with the new scheme. The new parser is now in a usable state. Still needs some work but the infrastructure is here. /me is happy. svn path=/trunk/; revision=1822 --- camel/camel-data-wrapper.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'camel/camel-data-wrapper.c') diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index 1ec70c6b37..fdc9aac45b 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -126,6 +126,12 @@ _finalize (GtkObject *object) if (camel_data_wrapper->mime_type) gmime_content_field_unref (camel_data_wrapper->mime_type); + if (camel_data_wrapper->input_stream) + gtk_object_unref (GTK_OBJECT (camel_data_wrapper->input_stream)); + + if (camel_data_wrapper->output_stream) + gtk_object_unref (GTK_OBJECT (camel_data_wrapper->output_stream)); + parent_class->finalize (object); CAMEL_LOG_FULL_DEBUG ("Leaving CamelDataWrapper::finalize\n"); } @@ -140,6 +146,8 @@ _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { g_assert (data_wrapper); data_wrapper->input_stream = stream; + if (stream) + gtk_object_ref (GTK_OBJECT (stream)); } @@ -176,6 +184,8 @@ _set_output_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { g_assert (data_wrapper); data_wrapper->output_stream = stream; + if (stream) + gtk_object_ref (GTK_OBJECT (stream)); } void -- cgit v1.2.3