aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-topic-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-topic-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-topic-action.c')
-rw-r--r--src/bookmarks/ephy-topic-action.c44
1 files changed, 4 insertions, 40 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 34c9fc843..5a10c021c 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -72,7 +72,7 @@ enum
PROP_MANAGER
};
-static GObjectClass *parent_class;
+G_DEFINE_TYPE (EphyTopicAction, ephy_topic_action, GTK_TYPE_ACTION)
static void
drag_data_received_cb (GtkWidget *widget,
@@ -130,7 +130,7 @@ create_tool_item (GtkAction *action)
GtkWidget *hbox;
GtkWidget *label;
- item = GTK_ACTION_CLASS (parent_class)->create_tool_item (action);
+ item = GTK_ACTION_CLASS (ephy_topic_action_parent_class)->create_tool_item (action);
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
@@ -402,7 +402,7 @@ static void
connect_proxy (GtkAction *action,
GtkWidget *proxy)
{
- GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);
+ GTK_ACTION_CLASS (ephy_topic_action_parent_class)->connect_proxy (action, proxy);
ephy_topic_action_sync_label (action, NULL, proxy);
g_signal_connect_object (action, "notify::label",
@@ -561,13 +561,7 @@ ephy_topic_action_get_property (GObject *object,
static void
ephy_topic_action_init (EphyTopicAction *action)
{
- EphyTopicActionPrivate *priv;
-
- priv = action->priv = EPHY_TOPIC_ACTION_GET_PRIVATE (action);
-
- priv->merge_id = 0;
- priv->node = NULL;
- priv->manager = NULL;
+ action->priv = EPHY_TOPIC_ACTION_GET_PRIVATE (action);
}
static void
@@ -576,8 +570,6 @@ ephy_topic_action_class_init (EphyTopicActionClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkActionClass *action_class = GTK_ACTION_CLASS (class);
- parent_class = g_type_class_peek_parent (class);
-
action_class->toolbar_item_type = GTK_TYPE_TOOL_ITEM;
action_class->create_tool_item = create_tool_item;
action_class->connect_proxy = connect_proxy;
@@ -605,34 +597,6 @@ ephy_topic_action_class_init (EphyTopicActionClass *class)
g_type_class_add_private (object_class, sizeof(EphyTopicActionPrivate));
}
-GType
-ephy_topic_action_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo type_info =
- {
- sizeof (EphyTopicActionClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ephy_topic_action_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (EphyTopicAction),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_topic_action_init,
- };
-
- type = g_type_register_static (GTK_TYPE_ACTION,
- "EphyTopicAction",
- &type_info, 0);
- }
-
- return type;
-}
-
GtkAction *
ephy_topic_action_new (EphyNode *node,
GtkUIManager *manager,