aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-related-action.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-13 07:07:11 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-13 07:07:11 +0800
commitdf50ed8d9cb314b1f9cefbfeee0c6717430f579c (patch)
tree88682e6816ac205b83dcdf912b9eeb514b548dc8 /src/bookmarks/ephy-related-action.c
parente8202438b62f78e58e8c95c65214b1ea1678c1f0 (diff)
downloadgsoc2013-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-related-action.c')
-rw-r--r--src/bookmarks/ephy-related-action.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/src/bookmarks/ephy-related-action.c b/src/bookmarks/ephy-related-action.c
index 778a0fda9..5f3ee9959 100644
--- a/src/bookmarks/ephy-related-action.c
+++ b/src/bookmarks/ephy-related-action.c
@@ -121,43 +121,22 @@ iface_init (EphyLinkIface *iface)
iface->open_link = open_link;
}
-GType
-ephy_related_action_get_type (void)
+static void
+ephy_related_action_class_init (EphyRelatedActionClass *klass)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyRelatedActionClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL, /* class_init */
- NULL,
- NULL, /* class_data */
- sizeof (EphyRelatedAction),
- 0, /* n_preallocs */
- NULL /* instance_init */
- };
- const GInterfaceInfo link_info =
- {
- (GInterfaceInitFunc) iface_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (EPHY_TYPE_TOPIC_ACTION,
- "EphyRelatedAction",
- &our_info, 0);
- g_type_add_interface_static (type,
- EPHY_TYPE_LINK,
- &link_info);
- }
+ /* Empty, needed for G_DEFINE_TYPE macro */
+}
- return type;
+static void
+ephy_related_action_init (EphyRelatedAction *action)
+{
+ /* Empty, needed for G_DEFINE_TYPE macro */
}
+G_DEFINE_TYPE_WITH_CODE (EphyRelatedAction, ephy_related_action, EPHY_TYPE_TOPIC_ACTION,
+ G_IMPLEMENT_INTERFACE (EPHY_TYPE_LINK,
+ iface_init))
+
GtkAction *
ephy_related_action_new (EphyLink *link,
GtkUIManager *manager,