aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-persist.cpp
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/mozilla/mozilla-embed-persist.cpp
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/mozilla/mozilla-embed-persist.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp39
1 files changed, 5 insertions, 34 deletions
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index 16909b49c..7149873e3 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -71,35 +71,7 @@ struct MozillaEmbedPersistPrivate
nsCOMPtr<nsIWebBrowserPersist> mPersist;
};
-static GObjectClass *parent_class = NULL;
-
-GType
-mozilla_embed_persist_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (MozillaEmbedPersistClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) mozilla_embed_persist_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (MozillaEmbedPersist),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mozilla_embed_persist_init
- };
-
- type = g_type_register_static (EPHY_TYPE_EMBED_PERSIST,
- "MozillaEmbedPersist",
- &our_info, (GTypeFlags) 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (MozillaEmbedPersist, mozilla_embed_persist, EPHY_TYPE_EMBED_PERSIST)
static void
mozilla_embed_persist_init (MozillaEmbedPersist *persist)
@@ -116,7 +88,7 @@ mozilla_embed_persist_finalize (GObject *object)
persist->priv->mPersist = nsnull;
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (mozilla_embed_persist_parent_class)->finalize (object);
}
void
@@ -393,8 +365,9 @@ mozilla_embed_persist_constructor (GType type, guint n_construct_properties,
/* this will ensure that mozilla is started up */
ephy_embed_shell_get_embed_single (embed_shell);
- return parent_class->constructor (type, n_construct_properties,
- construct_params);
+ return G_OBJECT_CLASS (mozilla_embed_persist_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_params);
}
static void
@@ -403,8 +376,6 @@ mozilla_embed_persist_class_init (MozillaEmbedPersistClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
EphyEmbedPersistClass *persist_class = EPHY_EMBED_PERSIST_CLASS (klass);
- parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
-
object_class->finalize = mozilla_embed_persist_finalize;
object_class->constructor = mozilla_embed_persist_constructor;