diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-02-18 07:23:36 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-02-18 07:23:36 +0800 |
commit | f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a (patch) | |
tree | cd6ef67c3cb63ac81206f2a22175c3b8dd64e565 /embed/ephy-favicon-cache.c | |
parent | 2f3e9b5994ebec0a15f6c3ba691732b38a4fbe22 (diff) | |
download | gsoc2013-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-favicon-cache.c')
-rw-r--r-- | embed/ephy-favicon-cache.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c index 35e3f0809..cd6ba4862 100644 --- a/embed/ephy-favicon-cache.c +++ b/embed/ephy-favicon-cache.c @@ -116,45 +116,15 @@ enum NEEDS_MASK = 0x3f }; -static guint signals[LAST_SIGNAL] = { 0 }; +static guint signals[LAST_SIGNAL]; -static GObjectClass *parent_class = NULL; - -GType -ephy_favicon_cache_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EphyFaviconCacheClass), - NULL, - NULL, - (GClassInitFunc) ephy_favicon_cache_class_init, - NULL, - NULL, - sizeof (EphyFaviconCache), - 0, - (GInstanceInitFunc) ephy_favicon_cache_init - }; - - type = g_type_register_static (G_TYPE_OBJECT, - "EphyFaviconCache", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EphyFaviconCache, ephy_favicon_cache, G_TYPE_OBJECT) static void ephy_favicon_cache_class_init (EphyFaviconCacheClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->finalize = ephy_favicon_cache_finalize; signals[CHANGED] = @@ -473,7 +443,7 @@ ephy_favicon_cache_finalize (GObject *object) LOG ("Requests: cached %" G_GUINT64_FORMAT " / total %" G_GUINT64_FORMAT " = %.3f", priv->cached, priv->requests, ((double) priv->cached) / ((double) priv->requests)); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (ephy_favicon_cache_parent_class)->finalize (object); } static void |