static void modest_isearch_view_init (gpointer g, gpointer iface_data);
static void modest_gtkhtml_mime_part_view_init (ModestGtkhtmlMimePartView *self);
static void modest_gtkhtml_mime_part_view_finalize (GObject *self);
+static void modest_gtkhtml_mime_part_view_dispose (GObject *self);
/* GtkHTML signal handlers */
static gboolean on_link_clicked (GtkWidget *widget, const gchar *uri, ModestGtkhtmlMimePartView *self);
gobject_class = (GObjectClass*) klass;
parent_class = g_type_class_peek_parent (klass);
+ gobject_class->dispose = modest_gtkhtml_mime_part_view_dispose;
gobject_class->finalize = modest_gtkhtml_mime_part_view_finalize;
klass->get_part_func = modest_gtkhtml_mime_part_view_get_part_default;
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
+static void
+modest_gtkhtml_mime_part_view_dispose (GObject *obj)
+{
+ ModestGtkhtmlMimePartViewPrivate *priv = MODEST_GTKHTML_MIME_PART_VIEW_GET_PRIVATE (obj);
+
+ if (priv->part) {
+ g_object_unref (priv->part);
+ priv->part = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (obj);
+}
+
/* GTKHTML SIGNALS HANDLERS */
static gboolean
body = modest_tny_msg_find_body_part (msg, TRUE);
if (body) {
tny_mime_part_view_set_part (TNY_MIME_PART_VIEW (priv->body_view), body);
+ g_object_unref (body);
if(modest_attachments_view_has_attachments (MODEST_ATTACHMENTS_VIEW (priv->attachments_view))) {
gtk_widget_show_all (priv->attachments_box);