[totem] Use a finalize() method in TotemStatusbar instead of dispose()



commit d7d9e7eb052e121d1d82b900cf4dadcbc81f4f04
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Sep 8 09:39:17 2010 +0100

    Use a finalize() method in TotemStatusbar instead of dispose()
    
    It was freeing a source, not breaking reference cycles.

 src/totem-statusbar.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/totem-statusbar.c b/src/totem-statusbar.c
index 6196760..ac628a5 100644
--- a/src/totem-statusbar.c
+++ b/src/totem-statusbar.c
@@ -39,7 +39,7 @@
 #define BUFFERING_CONTEXT "buffering"
 #define HELP_CONTEXT "help"
 
-static void totem_statusbar_dispose          (GObject             *object);
+static void totem_statusbar_finalize         (GObject             *object);
 static void totem_statusbar_sync_description (TotemStatusbar      *statusbar);
 
 struct _TotemStatusbarPrivate {
@@ -65,7 +65,7 @@ totem_statusbar_class_init (TotemStatusbarClass *klass)
 
   g_type_class_add_private (klass, sizeof (TotemStatusbarPrivate));
 
-  gobject_class->dispose = totem_statusbar_dispose;
+  gobject_class->finalize = totem_statusbar_finalize;
 }
 
 static void
@@ -337,16 +337,14 @@ totem_statusbar_sync_description (TotemStatusbar *statusbar)
 }
 
 static void
-totem_statusbar_dispose (GObject *object)
+totem_statusbar_finalize (GObject *object)
 {
   TotemStatusbarPrivate *priv = TOTEM_STATUSBAR (object)->priv;
 
-  if (priv->timeout != 0) {
+  if (priv->timeout != 0)
     g_source_remove (priv->timeout);
-    priv->timeout = 0;
-  }
 
-  G_OBJECT_CLASS (totem_statusbar_parent_class)->dispose (object);
+  G_OBJECT_CLASS (totem_statusbar_parent_class)->finalize (object);
 }
 
 /*



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