aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-encoding-dialog.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-encoding-dialog.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-encoding-dialog.c')
-rw-r--r--src/ephy-encoding-dialog.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 157bad6f0..98cedcd1c 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -78,35 +78,7 @@ struct _EphyEncodingDialogPrivate
static void ephy_encoding_dialog_class_init (EphyEncodingDialogClass *klass);
static void ephy_encoding_dialog_init (EphyEncodingDialog *ge);
-static GObjectClass *parent_class = NULL;
-
-GType
-ephy_encoding_dialog_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyEncodingDialogClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ephy_encoding_dialog_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (EphyEncodingDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_encoding_dialog_init
- };
-
- type = g_type_register_static (EPHY_TYPE_EMBED_DIALOG,
- "EphyEncodingDialog",
- &our_info, 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (EphyEncodingDialog, ephy_encoding_dialog, EPHY_TYPE_EMBED_DIALOG)
static void
sync_encoding_against_embed (EphyEncodingDialog *dialog)
@@ -408,7 +380,7 @@ ephy_encoding_dialog_finalize (GObject *object)
g_object_unref (dialog->priv->filter);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (ephy_encoding_dialog_parent_class)->finalize (object);
}
static void
@@ -416,8 +388,6 @@ ephy_encoding_dialog_class_init (EphyEncodingDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->finalize = ephy_encoding_dialog_finalize;
g_type_class_add_private (object_class, sizeof(EphyEncodingDialogPrivate));