From 3f6ddb02e81fcd90987bc19b5e495686443617f9 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 9 May 2000 06:45:50 +0000 Subject: Remove reflow idle when being destroyed. 2000-05-09 Christopher James Lahey * e-canvas.c: Remove reflow idle when being destroyed. svn path=/trunk/; revision=2934 --- widgets/misc/e-canvas.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'widgets') diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 8ca7d0f9b1..534e3fb1e8 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -23,6 +23,7 @@ #include #include "e-canvas.h" static void e_canvas_init (ECanvas *card); +static void e_canvas_destroy (GtkObject *object); static void e_canvas_class_init (ECanvasClass *klass); static void e_canvas_realize (GtkWidget *widget); static gint e_canvas_key (GtkWidget *widget, @@ -82,6 +83,8 @@ e_canvas_class_init (ECanvasClass *klass) parent_class = gtk_type_class (gnome_canvas_get_type ()); + object_class->destroy = e_canvas_destroy; + widget_class->key_press_event = e_canvas_key; widget_class->key_release_event = e_canvas_key; widget_class->focus_in_event = e_canvas_focus_in; @@ -106,6 +109,14 @@ e_canvas_init (ECanvas *canvas) { } +static void +e_canvas_destroy (GtkObject *object) +{ + ECanvas *canvas = E_CANVAS(object); + if (canvas->idle_id) + g_source_remove(canvas->idle_id); +} + GtkWidget * e_canvas_new () { -- cgit v1.2.3