aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
committerChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
commit73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch)
tree499d78ab52e8937f672e3659105dda083a34c988 /src/bookmarks/ephy-bookmark-action.c
parent3375c1878c4c0ebf4f5067d128024ea484208f62 (diff)
downloadgsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'src/bookmarks/ephy-bookmark-action.c')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index dbd3f0ea4..96c07822d 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -36,6 +36,8 @@
static void ephy_bookmark_action_init (EphyBookmarkAction *action);
static void ephy_bookmark_action_class_init (EphyBookmarkActionClass *class);
+#define EPHY_BOOKMARK_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_BOOKMARK_ACTION, EphyBookmarkActionPrivate))
+
struct EphyBookmarkActionPrivate
{
int bookmark_id;
@@ -407,19 +409,11 @@ ephy_bookmark_action_get_property (GObject *object,
static void
ephy_bookmark_action_finalize (GObject *object)
{
- EphyBookmarkAction *eba;
-
- g_return_if_fail (EPHY_IS_BOOKMARK_ACTION (object));
-
- eba = EPHY_BOOKMARK_ACTION (object);
-
- g_return_if_fail (eba->priv != NULL);
+ EphyBookmarkAction *eba = EPHY_BOOKMARK_ACTION (object);
g_free (eba->priv->location);
g_free (eba->priv->icon);
- g_free (eba->priv);
-
LOG ("Bookmark action finalized")
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -428,11 +422,10 @@ ephy_bookmark_action_finalize (GObject *object)
static void
ephy_bookmark_action_class_init (EphyBookmarkActionClass *class)
{
- GtkActionClass *action_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 = GTK_ACTION_CLASS (class);
action_class->toolbar_item_type = GTK_TYPE_TOOL_ITEM;
action_class->create_tool_item = create_tool_item;
@@ -484,6 +477,8 @@ ephy_bookmark_action_class_init (EphyBookmarkActionClass *class)
"Icon",
NULL,
G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof(EphyBookmarkActionPrivate));
}
static void
@@ -528,12 +523,11 @@ ephy_bookmark_action_init (EphyBookmarkAction *action)
EphyBookmarks *bookmarks;
EphyNode *node;
- action->priv = g_new0 (EphyBookmarkActionPrivate, 1);
+ action->priv = EPHY_BOOKMARK_ACTION_GET_PRIVATE (action);
action->priv->location = NULL;
action->priv->icon = NULL;
-
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
node = ephy_bookmarks_get_bookmarks (bookmarks);
ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_CHANGED,
@@ -562,4 +556,3 @@ ephy_bookmark_action_new (const char *name, guint id)
return action;
}
-