]> git.sur5r.net Git - glabels/commitdiff
One of the signal handlers (view_scale_changed_cb) created with a view_highlight...
authorJim Evins <evins@snaught.com>
Sun, 9 Nov 2003 15:34:08 +0000 (15:34 +0000)
committerJim Evins <evins@snaught.com>
Sun, 9 Nov 2003 15:34:08 +0000 (15:34 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@336 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view-highlight.c

index 5274656b9548245a3ad021d480e85c4ce55011dc..df8a501cf235d62d811ffcf36c29c1492b687ecc 100644 (file)
@@ -202,14 +202,21 @@ gl_view_highlight_instance_init (glViewHighlight *view_highlight)
 static void
 gl_view_highlight_finalize (GObject *object)
 {
-       glLabel       *parent;
-       glView        *view;
+       glLabel         *parent;
+       glViewHighlight *view_highlight;
 
        gl_debug (DEBUG_VIEW, "START");
 
        g_return_if_fail (object && GL_IS_VIEW_HIGHLIGHT (object));
 
-       gtk_object_destroy (GTK_OBJECT(GL_VIEW_HIGHLIGHT(object)->private->position_group));
+       view_highlight = GL_VIEW_HIGHLIGHT (object);
+
+       /* Free up handler owned by view. */
+       g_signal_handlers_disconnect_by_func (G_OBJECT (view_highlight->private->view),
+                                             G_CALLBACK (view_scale_changed_cb),
+                                             object);
+
+       gtk_object_destroy (GTK_OBJECT(view_highlight->private->position_group));
 
        G_OBJECT_CLASS (parent_class)->finalize (object);