diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-02-13 07:07:11 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-02-13 07:07:11 +0800 |
commit | df50ed8d9cb314b1f9cefbfeee0c6717430f579c (patch) | |
tree | 88682e6816ac205b83dcdf912b9eeb514b548dc8 /src/bookmarks/ephy-topics-palette.c | |
parent | e8202438b62f78e58e8c95c65214b1ea1678c1f0 (diff) | |
download | gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.gz gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.bz2 gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.lz gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.xz gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.zst gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.zip |
Use G_DEFINE_TYPE* macros in src/bookmarks/ when possible. (#516138)
svn path=/trunk/; revision=7932
Diffstat (limited to 'src/bookmarks/ephy-topics-palette.c')
-rw-r--r-- | src/bookmarks/ephy-topics-palette.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/src/bookmarks/ephy-topics-palette.c b/src/bookmarks/ephy-topics-palette.c index 3fb2fc142..4c8b3837e 100644 --- a/src/bookmarks/ephy-topics-palette.c +++ b/src/bookmarks/ephy-topics-palette.c @@ -68,35 +68,7 @@ enum MODES }; -static GObjectClass *parent_class = NULL; - -GType -ephy_topics_palette_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EphyTopicsPaletteClass), - NULL, - NULL, - (GClassInitFunc) ephy_topics_palette_class_init, - NULL, - NULL, - sizeof (EphyTopicsPalette), - 0, - (GInstanceInitFunc) ephy_topics_palette_init - }; - - type = g_type_register_static (GTK_TYPE_TREE_VIEW, - "EphyTopicsPalette", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EphyTopicsPalette, ephy_topics_palette, GTK_TYPE_TREE_VIEW) static void append_topics (EphyTopicsPalette *palette, @@ -394,8 +366,9 @@ ephy_topics_palette_constructor (GType type, EphyTopicsPalettePrivate *priv; GtkCellRenderer *renderer; - object = parent_class->constructor (type, n_construct_properties, - construct_params); + object = G_OBJECT_CLASS (ephy_topics_palette_parent_class)->constructor (type, + n_construct_properties, + construct_params); palette = EPHY_TOPICS_PALETTE (object); priv = EPHY_TOPICS_PALETTE_GET_PRIVATE (object); @@ -456,8 +429,6 @@ ephy_topics_palette_class_init (EphyTopicsPaletteClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->set_property = ephy_topics_palette_set_property; object_class->constructor = ephy_topics_palette_constructor; |