aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-03-01 20:27:52 +0800
committerXan Lopez <xan@src.gnome.org>2009-03-01 20:27:52 +0800
commit44b5accafd19a1dfbc09b9b0318c371ab808b65b (patch)
tree24b0584da28807cf65e3023c6bba7c05aa3d0e33
parent2aa9925ca86d8e3cfb679049bb001c36fccd4985 (diff)
downloadgsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar.gz
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar.bz2
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar.lz
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar.xz
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.tar.zst
gsoc2013-epiphany-44b5accafd19a1dfbc09b9b0318c371ab808b65b.zip
ephy-module: use G_DEFINE_TYPE.
svn path=/trunk/; revision=8827
-rw-r--r--lib/ephy-module.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/lib/ephy-module.c b/lib/ephy-module.c
index d4301eb4f..08c0f86a1 100644
--- a/lib/ephy-module.c
+++ b/lib/ephy-module.c
@@ -49,35 +49,7 @@ typedef GType (*EphyModuleRegisterFunc) (GTypeModule *);
static void ephy_module_init (EphyModule *action);
static void ephy_module_class_init (EphyModuleClass *class);
-static GObjectClass *parent_class = NULL;
-
-GType
-ephy_module_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo type_info =
- {
- sizeof (EphyModuleClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ephy_module_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (EphyModule),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_module_init,
- };
-
- type = g_type_register_static (G_TYPE_TYPE_MODULE,
- "EphyModule",
- &type_info, 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (EphyModule, ephy_module, G_TYPE_TYPE_MODULE)
static gboolean
ephy_module_load (GTypeModule *gmodule)
@@ -214,7 +186,7 @@ ephy_module_finalize (GObject *object)
g_free (module->path);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (ephy_module_parent_class)->finalize (object);
}
static void
@@ -223,8 +195,6 @@ ephy_module_class_init (EphyModuleClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (class);
- parent_class = (GObjectClass *) g_type_class_peek_parent (class);
-
object_class->finalize = ephy_module_finalize;
module_class->load = ephy_module_load;