aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-extensions-manager.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-11 02:26:22 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-11 02:26:22 +0800
commita6753733856e098e2500487fee87620f72dea530 (patch)
tree1f5a7d8ae16bd2e3070bbdc31791eef96952a233 /src/ephy-extensions-manager.c
parent9a3e4ebc55e11c3b00b0e7464b11ecec121bc6f2 (diff)
downloadgsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.gz
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.bz2
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.lz
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.xz
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.zst
gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.zip
Use G_DEFINE_TYPE* when possible in src/ (#515601)
svn path=/trunk/; revision=7927
Diffstat (limited to 'src/ephy-extensions-manager.c')
-rw-r--r--src/ephy-extensions-manager.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 069d4691e..60d7dfe6e 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -129,50 +129,13 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-static GObjectClass *parent_class = NULL;
-
static void ephy_extensions_manager_class_init (EphyExtensionsManagerClass *klass);
static void ephy_extensions_manager_iface_init (EphyExtensionIface *iface);
static void ephy_extensions_manager_init (EphyExtensionsManager *manager);
-GType
-ephy_extensions_manager_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyExtensionsManagerClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ephy_extensions_manager_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (EphyExtensionsManager),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_extensions_manager_init
- };
-
- const GInterfaceInfo extension_info =
- {
- (GInterfaceInitFunc) ephy_extensions_manager_iface_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "EphyExtensionsManager",
- &our_info, 0);
-
- g_type_add_interface_static (type,
- EPHY_TYPE_EXTENSION,
- &extension_info);
- }
-
- return type;
-}
+G_DEFINE_TYPE_WITH_CODE (EphyExtensionsManager, ephy_extensions_manager, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (EPHY_TYPE_EXTENSION,
+ ephy_extensions_manager_iface_init))
/**
* ephy_extensions_manager_load:
@@ -1193,7 +1156,7 @@ ephy_extensions_manager_dispose (GObject *object)
priv->windows = NULL;
}
- parent_class->dispose (object);
+ G_OBJECT_CLASS (ephy_extensions_manager_parent_class)->dispose (object);
}
static void
@@ -1300,8 +1263,6 @@ ephy_extensions_manager_class_init (EphyExtensionsManagerClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- parent_class = (GObjectClass *) g_type_class_peek_parent (class);
-
object_class->dispose = ephy_extensions_manager_dispose;
signals[CHANGED] =