diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-02-11 02:26:22 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-02-11 02:26:22 +0800 |
commit | a6753733856e098e2500487fee87620f72dea530 (patch) | |
tree | 1f5a7d8ae16bd2e3070bbdc31791eef96952a233 /src/pdm-dialog.c | |
parent | 9a3e4ebc55e11c3b00b0e7464b11ecec121bc6f2 (diff) | |
download | gsoc2013-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/pdm-dialog.c')
-rw-r--r-- | src/pdm-dialog.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index e4b7dd04d..a1ce8bf23 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -155,43 +155,13 @@ static void passwords_changed_cb (EphyPasswordManager *manager, PdmDialog *dialog); -static GObjectClass *parent_class = NULL; - -GType -pdm_dialog_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (PdmDialogClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) pdm_dialog_class_init, - NULL, - NULL, /* class_data */ - sizeof (PdmDialog), - 0, /* n_preallocs */ - (GInstanceInitFunc) pdm_dialog_init - }; - - type = g_type_register_static (EPHY_TYPE_DIALOG, - "PdmDialog", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (PdmDialog, pdm_dialog, EPHY_TYPE_DIALOG) static void pdm_dialog_class_init (PdmDialogClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->finalize = pdm_dialog_finalize; g_type_class_add_private (object_class, sizeof(PdmDialogPrivate)); @@ -1553,7 +1523,7 @@ pdm_dialog_finalize (GObject *object) g_free (dialog->priv->passwords); g_free (dialog->priv->cookies); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (pdm_dialog_parent_class)->finalize (object); } void |