aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-completion-model.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-completion-model.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-completion-model.c')
-rw-r--r--src/ephy-completion-model.c45
1 files changed, 3 insertions, 42 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 5e6b80c2d..72ba6494e 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -50,54 +50,15 @@ enum
BOOKMARKS_GROUP
};
-static GObjectClass *parent_class = NULL;
-
-GType
-ephy_completion_model_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyCompletionModelClass),
- NULL,
- NULL,
- (GClassInitFunc) ephy_completion_model_class_init,
- NULL,
- NULL,
- sizeof (EphyCompletionModel),
- 0,
- (GInstanceInitFunc) ephy_completion_model_init
- };
-
- const GInterfaceInfo tree_model_info =
- {
- (GInterfaceInitFunc) ephy_completion_model_tree_model_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "EphyCompletionModel",
- &our_info, 0);
-
- g_type_add_interface_static (type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- }
-
- return type;
-}
+G_DEFINE_TYPE_WITH_CODE (EphyCompletionModel, ephy_completion_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
+ ephy_completion_model_tree_model_init))
static void
ephy_completion_model_class_init (EphyCompletionModelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
g_type_class_add_private (object_class, sizeof (EphyCompletionModelPrivate));
}