From 73a95385f4034998cc78199dc8bb9ee22d90d6aa Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 1 Sep 2003 23:20:17 +0000 Subject: Mega-patch, changelog too long to paste here. --- src/bookmarks/ephy-new-bookmark.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/bookmarks/ephy-new-bookmark.c') diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index 8cad27263..b11d61fed 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -51,6 +51,8 @@ static void ephy_new_bookmark_get_property (GObject *object, GValue *value, GParamSpec *pspec); +#define EPHY_NEW_BOOKMARK_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_NEW_BOOKMARK, EphyNewBookmarkPrivate)) + struct EphyNewBookmarkPrivate { EphyBookmarks *bookmarks; @@ -116,7 +118,7 @@ ephy_new_bookmark_class_init (EphyNewBookmarkClass *klass) g_param_spec_object ("bookmarks", "Bookmarks set", "Bookmarks set", - EPHY_BOOKMARKS_TYPE, + EPHY_TYPE_BOOKMARKS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_LOCATION, @@ -125,25 +127,18 @@ ephy_new_bookmark_class_init (EphyNewBookmarkClass *klass) "Bookmark location", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_type_class_add_private (object_class, sizeof(EphyNewBookmarkPrivate)); } static void ephy_new_bookmark_finalize (GObject *object) { - EphyNewBookmark *editor; - - g_return_if_fail (object != NULL); - g_return_if_fail (EPHY_IS_NEW_BOOKMARK (object)); - - editor = EPHY_NEW_BOOKMARK (object); - - g_return_if_fail (editor->priv != NULL); + EphyNewBookmark *editor = EPHY_NEW_BOOKMARK (object); g_free (editor->priv->location); g_free (editor->priv->icon); - g_free (editor->priv); - G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -460,7 +455,8 @@ ephy_new_bookmark_get_property (GObject *object, static void ephy_new_bookmark_init (EphyNewBookmark *editor) { - editor->priv = g_new0 (EphyNewBookmarkPrivate, 1); + editor->priv = EPHY_NEW_BOOKMARK_GET_PRIVATE (editor); + editor->priv->location = NULL; editor->priv->icon = NULL; editor->priv->id = 0; -- cgit v1.2.3