aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-persist.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-18 07:23:36 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-18 07:23:36 +0800
commitf0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a (patch)
treecd6ef67c3cb63ac81206f2a22175c3b8dd64e565 /embed/ephy-embed-persist.c
parent2f3e9b5994ebec0a15f6c3ba691732b38a4fbe22 (diff)
downloadgsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.gz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.bz2
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.lz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.xz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.zst
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.zip
Use G_DEFINE_TYPE* where possible in embed/* (#517090)
svn path=/trunk/; revision=7964
Diffstat (limited to 'embed/ephy-embed-persist.c')
-rw-r--r--embed/ephy-embed-persist.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/embed/ephy-embed-persist.c b/embed/ephy-embed-persist.c
index 062cd0207..950ad7abb 100644
--- a/embed/ephy-embed-persist.c
+++ b/embed/ephy-embed-persist.c
@@ -60,35 +60,7 @@ struct _EphyEmbedPersistPrivate
static void ephy_embed_persist_class_init (EphyEmbedPersistClass *klass);
static void ephy_embed_persist_init (EphyEmbedPersist *ges);
-static GObjectClass *parent_class = NULL;
-
-GType
-ephy_embed_persist_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyEmbedPersistClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ephy_embed_persist_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EphyEmbedPersist),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_embed_persist_init
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "EphyEmbedPersist",
- &our_info, G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
+G_DEFINE_TYPE (EphyEmbedPersist, ephy_embed_persist, G_TYPE_OBJECT)
/**
* ephy_embed_persist_set_dest:
@@ -522,7 +494,7 @@ ephy_embed_persist_finalize (GObject *object)
LOG ("EphyEmbedPersist finalised %p", object);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (ephy_embed_persist_parent_class)->finalize (object);
}
static void
@@ -530,8 +502,6 @@ ephy_embed_persist_class_init (EphyEmbedPersistClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->finalize = ephy_embed_persist_finalize;
object_class->set_property = ephy_embed_persist_set_property;
object_class->get_property = ephy_embed_persist_get_property;