[gnome-control-center] mouse: Use newly implemented dispose



commit e98b32d3691dd70dafdbedf0eab375da33be066c
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 16 13:17:38 2011 +0000

    mouse: Use newly implemented dispose

 panels/mouse/cc-mouse-panel.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c
index 1e6fa0a..891876d 100644
--- a/panels/mouse/cc-mouse-panel.c
+++ b/panels/mouse/cc-mouse-panel.c
@@ -32,6 +32,7 @@ G_DEFINE_DYNAMIC_TYPE (CcMousePanel, cc_mouse_panel, CC_TYPE_PANEL)
 struct _CcMousePanelPrivate
 {
   GtkBuilder *builder;
+  GtkWidget  *widget;
 };
 
 
@@ -66,6 +67,12 @@ cc_mouse_panel_dispose (GObject *object)
 {
   CcMousePanelPrivate *priv = CC_MOUSE_PANEL (object)->priv;
 
+  if (priv->widget)
+    {
+      gnome_mouse_properties_dispose (priv->widget);
+      priv->widget = NULL;
+    }
+
   if (priv->builder)
     {
       g_object_unref (priv->builder);
@@ -76,12 +83,6 @@ cc_mouse_panel_dispose (GObject *object)
 }
 
 static void
-cc_mouse_panel_finalize (GObject *object)
-{
-  G_OBJECT_CLASS (cc_mouse_panel_parent_class)->finalize (object);
-}
-
-static void
 cc_mouse_panel_class_init (CcMousePanelClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -91,7 +92,6 @@ cc_mouse_panel_class_init (CcMousePanelClass *klass)
   object_class->get_property = cc_mouse_panel_get_property;
   object_class->set_property = cc_mouse_panel_set_property;
   object_class->dispose = cc_mouse_panel_dispose;
-  object_class->finalize = cc_mouse_panel_finalize;
 }
 
 static void
@@ -119,7 +119,7 @@ cc_mouse_panel_init (CcMousePanel *self)
       return;
     }
 
-  gnome_mouse_properties_init (priv->builder);
+  priv->widget = gnome_mouse_properties_init (priv->builder);
 
   prefs_widget = (GtkWidget*) gtk_builder_get_object (priv->builder,
                                                       "prefs_widget");



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