aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-favicon-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-favicon-cache.c')
-rw-r--r--embed/ephy-favicon-cache.c36
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