[empathy: 18/148] We don't need dispose, finalize and private fields in EmpathyFTFactory (yet?).



commit 94722faf307e2e0d4d1d9532893f0a2206ac4803
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date:   Wed Feb 18 11:41:46 2009 +0100

    We don't need dispose, finalize and private fields in EmpathyFTFactory (yet?).
---
 libempathy/empathy-ft-factory.c |   32 +-------------------------------
 1 files changed, 1 insertions(+), 31 deletions(-)

diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c
index 407434d..8aad81a 100644
--- a/libempathy/empathy-ft-factory.c
+++ b/libempathy/empathy-ft-factory.c
@@ -37,32 +37,9 @@ enum {
   LAST_SIGNAL
 };
 
-typedef struct {
-  gboolean dispose_run;
-} EmpathyFTFactoryPriv;
-
 static EmpathyFTFactory *factory_singleton = NULL;
 static guint signals[LAST_SIGNAL] = { 0 };
 
-static void
-do_dispose (GObject *object)
-{
-  EmpathyFTFactoryPriv *priv = GET_PRIV (object);
-
-  if (priv->dispose_run)
-    return;
-
-  priv->dispose_run = TRUE;
-
-  G_OBJECT_CLASS (empathy_ft_factory_parent_class)->dispose (object);
-}
-
-static void
-do_finalize (GObject *object)
-{
-  G_OBJECT_CLASS (empathy_ft_factory_parent_class)->finalize (object);
-}
-
 static GObject *
 do_constructor (GType type,
                 guint n_props,
@@ -88,10 +65,6 @@ empathy_ft_factory_class_init (EmpathyFTFactoryClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  g_type_class_add_private (klass, sizeof (EmpathyFTFactoryPriv));
-
-  object_class->dispose = do_dispose;
-  object_class->finalize = do_finalize;
   object_class->constructor = do_constructor;
 
   signals[NEW_FT_HANDLER] =
@@ -107,10 +80,7 @@ empathy_ft_factory_class_init (EmpathyFTFactoryClass *klass)
 static void
 empathy_ft_factory_init (EmpathyFTFactory *self)
 {
-  EmpathyFTFactoryPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
-    EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactoryPriv);
-
-  self->priv = priv;
+  /* do nothing */
 }
 
 static void



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