aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-find-toolbar.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-find-toolbar.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-find-toolbar.c')
-rw-r--r--src/ephy-find-toolbar.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 85b6e31a7..a6b59ff31 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -81,9 +81,7 @@ enum
LAST_SIGNAL
};
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GObjectClass *parent_class = NULL;
+static guint signals[LAST_SIGNAL];
/* private functions */
@@ -522,6 +520,8 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar)
G_CALLBACK (case_sensitive_toggled_cb), toolbar);
}
+G_DEFINE_TYPE (EphyFindToolbar, ephy_find_toolbar, GTK_TYPE_TOOLBAR)
+
static void
ephy_find_toolbar_dispose (GObject *object)
{
@@ -546,7 +546,7 @@ ephy_find_toolbar_dispose (GObject *object)
priv->find_again_source_id = 0;
}
- parent_class->dispose (object);
+ G_OBJECT_CLASS (ephy_find_toolbar_parent_class)->dispose (object);
}
static void
@@ -581,8 +581,6 @@ ephy_find_toolbar_class_init (EphyFindToolbarClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->dispose = ephy_find_toolbar_dispose;
object_class->get_property = ephy_find_toolbar_get_property;
object_class->set_property = ephy_find_toolbar_set_property;
@@ -634,34 +632,6 @@ ephy_find_toolbar_class_init (EphyFindToolbarClass *klass)
/* public functions */
-GType
-ephy_find_toolbar_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyFindToolbarClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ephy_find_toolbar_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (EphyFindToolbar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_find_toolbar_init
- };
-
- type = g_type_register_static (GTK_TYPE_TOOLBAR,
- "EphyFindToolbar",
- &our_info, 0);
- }
-
- return type;
-}
-
EphyFindToolbar *
ephy_find_toolbar_new (EphyWindow *window)
{