blob: 1a9911cf2e4b65ff81d6a0a51f863656b5f8f62d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Index: libgtkhtml/graphics/htmlpainter.c
===================================================================
--- libgtkhtml/graphics/htmlpainter.c.orig 2005-12-28 22:07:37.000000000 +0000
+++ libgtkhtml/graphics/htmlpainter.c 2006-04-19 13:44:55.000000000 +0100
@@ -166,6 +166,9 @@ html_painter_set_foreground_color (HtmlP
static void
html_painter_finalize (GObject *object)
{
+ HtmlPainter *painter = HTML_PAINTER (object);
+
+ g_object_unref (G_OBJECT (painter->loading_picture));
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Index: libgtkhtml/view/htmlview.c
===================================================================
--- libgtkhtml/view/htmlview.c.orig 2006-04-19 13:39:36.000000000 +0100
+++ libgtkhtml/view/htmlview.c 2006-04-19 14:07:59.000000000 +0100
@@ -2322,6 +2322,16 @@ html_view_realize (GtkWidget *widget)
html_view_relayout_when_idle (view);
}
+static void
+html_view_unrealize (GtkWidget *widget)
+{
+ HtmlView *view = HTML_VIEW (widget);
+
+ g_object_unref (G_OBJECT (view->painter));
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
static gboolean
html_view_enter_notify (GtkWidget *widget, GdkEventCrossing *event)
@@ -2957,6 +2967,7 @@ html_view_class_init (HtmlViewClass *kla
widget_class->size_allocate = html_view_size_allocate;
widget_class->realize = html_view_realize;
+ widget_class->unrealize = html_view_unrealize;
widget_class->expose_event = html_view_expose;
widget_class->motion_notify_event = html_view_motion_notify;
widget_class->button_press_event = html_view_button_press;
|