[bijiben/wip/gbsneto/ui-tweaks: 5/5] main-view: Disconnect handlers on dispose



commit 4854e98db1198c7f739a76f7d04d877a4b710f8d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Jun 5 09:26:11 2017 -0300

    main-view: Disconnect handlers on dispose
    
    Per GObject documentation, the correct place to disconnect
    from signal handlers is dispose() rather than finalize().
    This avoids a few warnings when quitting the application.

 src/bjb-main-view.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/bjb-main-view.c b/src/bjb-main-view.c
index d230c2f..5263c36 100644
--- a/src/bjb-main-view.c
+++ b/src/bjb-main-view.c
@@ -136,11 +136,11 @@ bjb_main_view_disconnect_handlers (BjbMainView *self)
 
 
 static void
-bjb_main_view_finalize (GObject *object)
+bjb_main_view_dispose (GObject *object)
 {
   bjb_main_view_disconnect_handlers (BJB_MAIN_VIEW (object));
   bjb_main_view_disconnect_scrolled_window (BJB_MAIN_VIEW (object));
-  G_OBJECT_CLASS (bjb_main_view_parent_class)->finalize (object);
+  G_OBJECT_CLASS (bjb_main_view_parent_class)->dispose (object);
 }
 
 static void
@@ -715,7 +715,7 @@ bjb_main_view_class_init (BjbMainViewClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  object_class->finalize = bjb_main_view_finalize;
+  object_class->dispose = bjb_main_view_dispose;
   object_class->get_property = bjb_main_view_get_property;
   object_class->set_property = bjb_main_view_set_property;
   object_class->constructed = bjb_main_view_constructed;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]