- tny_stream_reset (txt_stream);
-
- gtkhtml_stream = gtk_html_begin(GTK_HTML(priv->gtkhtml));
- tny_stream = TNY_STREAM(modest_tny_stream_gtkhtml_new (gtkhtml_stream));
-
- html_attachments = attachments_as_html(self, msg);
- if (html_attachments) {
- tny_stream_write (tny_stream, html_attachments,
- strlen(html_attachments));
- tny_stream_reset (tny_stream);
- g_free (html_attachments);
- }
-
- // FIXME: tinymail
- tny_mime_part_decode_to_stream ((TnyMimePart*)tny_body, txt_stream);
- tny_stream_reset (txt_stream);
-
- gtk_text_buffer_get_bounds (buf, &begin, &end);
- txt = gtk_text_buffer_get_text (buf, &begin, &end, FALSE);
- if (txt) {
- gchar *html = modest_text_utils_convert_to_html (txt);
- tny_stream_write (tny_stream, html, strlen(html));
- tny_stream_reset (tny_stream);
- g_free (txt);
- g_free (html);
+ signals[ATTACHMENT_CLICKED_SIGNAL] =
+ g_signal_new ("attachment_clicked",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, attachment_clicked),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, G_TYPE_OBJECT);
+
+ signals[RECPT_ACTIVATED_SIGNAL] =
+ g_signal_new ("recpt_activated",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, recpt_activated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
+ signals[LINK_CONTEXTUAL_SIGNAL] =
+ g_signal_new ("link_contextual",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, link_contextual),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
+ signals[FETCH_IMAGE_SIGNAL] =
+ g_signal_new ("fetch_image",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, fetch_image),
+ NULL, NULL,
+ modest_marshal_BOOLEAN__STRING_OBJECT,
+ G_TYPE_BOOLEAN, 2, G_TYPE_STRING, G_TYPE_OBJECT);
+
+ signals[SHOW_DETAILS_SIGNAL] =
+ g_signal_new ("show_details",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, show_details),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ initialized = TRUE;