aboutsummaryrefslogtreecommitdiffstats
path: root/src/prefs-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prefs-dialog.c')
-rw-r--r--src/prefs-dialog.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 8cc84507e..4a21c4815 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -293,35 +293,7 @@ struct PrefsDialogPrivate
GHashTable *iso_3166_table;
};
-static GObjectClass *parent_class = NULL;
-
-GType
-prefs_dialog_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (PrefsDialogClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) prefs_dialog_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (PrefsDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) prefs_dialog_init
- };
-
- type = g_type_register_static (EPHY_TYPE_DIALOG,
- "PrefsDialog",
- &our_info, 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (PrefsDialog, prefs_dialog, EPHY_TYPE_DIALOG)
static void
prefs_dialog_finalize (GObject *object)
@@ -352,7 +324,7 @@ prefs_dialog_finalize (GObject *object)
g_hash_table_destroy (priv->iso_639_table);
g_hash_table_destroy (priv->iso_3166_table);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (prefs_dialog_parent_class)->finalize (object);
}
static void
@@ -360,8 +332,6 @@ prefs_dialog_class_init (PrefsDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->finalize = prefs_dialog_finalize;
g_type_class_add_private (object_class, sizeof(PrefsDialogPrivate));