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/ephy-encoding-menu.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/ephy-encoding-menu.c')
-rw-r--r-- | src/ephy-encoding-menu.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c index edd1e358d..59ba9ee32 100644 --- a/src/ephy-encoding-menu.c +++ b/src/ephy-encoding-menu.c @@ -64,35 +64,7 @@ enum PROP_WINDOW }; -static GObjectClass *parent_class = NULL; - -GType -ephy_encoding_menu_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EphyEncodingMenuClass), - NULL, - NULL, - (GClassInitFunc) ephy_encoding_menu_class_init, - NULL, - NULL, - sizeof (EphyEncodingMenu), - 0, - (GInstanceInitFunc) ephy_encoding_menu_init - }; - - type = g_type_register_static (G_TYPE_OBJECT, - "EphyEncodingMenu", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EphyEncodingMenu, ephy_encoding_menu, G_TYPE_OBJECT) static void ephy_encoding_menu_init (EphyEncodingMenu *menu) @@ -459,7 +431,7 @@ ephy_encoding_menu_finalize (GObject *object) g_object_unref (menu->priv->dialog); } - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (ephy_encoding_menu_parent_class)->finalize (object); } static void @@ -467,8 +439,6 @@ ephy_encoding_menu_class_init (EphyEncodingMenuClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->finalize = ephy_encoding_menu_finalize; object_class->set_property = ephy_encoding_menu_set_property; object_class->get_property = ephy_encoding_menu_get_property; |