diff options
author | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
commit | 73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch) | |
tree | 499d78ab52e8937f672e3659105dda083a34c988 /src/bookmarks/ephy-bookmark-properties.c | |
parent | 3375c1878c4c0ebf4f5067d128024ea484208f62 (diff) | |
download | gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.bz2 gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.lz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.xz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip |
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'src/bookmarks/ephy-bookmark-properties.c')
-rw-r--r-- | src/bookmarks/ephy-bookmark-properties.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c index 050fa21cc..8006bdf71 100644 --- a/src/bookmarks/ephy-bookmark-properties.c +++ b/src/bookmarks/ephy-bookmark-properties.c @@ -43,7 +43,6 @@ static void ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass); static void ephy_bookmark_properties_init (EphyBookmarkProperties *editor); -static void ephy_bookmark_properties_finalize (GObject *object); static void ephy_bookmark_properties_set_property (GObject *object, guint prop_id, const GValue *value, @@ -53,6 +52,8 @@ static void ephy_bookmark_properties_get_property (GObject *object, GValue *value, GParamSpec *pspec); +#define EPHY_BOOKMARK_PROPERTIES_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_BOOKMARK_PROPERTIES, EphyBookmarkPropertiesPrivate)) + struct EphyBookmarkPropertiesPrivate { EphyBookmarks *bookmarks; @@ -109,8 +110,6 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass) parent_class = g_type_class_peek_parent (klass); - object_class->finalize = ephy_bookmark_properties_finalize; - object_class->set_property = ephy_bookmark_properties_set_property; object_class->get_property = ephy_bookmark_properties_get_property; @@ -119,7 +118,7 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *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, @@ -128,23 +127,8 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass) "Bookmark", "Bookmark", G_PARAM_READWRITE)); -} - -static void -ephy_bookmark_properties_finalize (GObject *object) -{ - EphyBookmarkProperties *editor; - - g_return_if_fail (object != NULL); - g_return_if_fail (EPHY_IS_BOOKMARK_PROPERTIES (object)); - - editor = EPHY_BOOKMARK_PROPERTIES (object); - - g_return_if_fail (editor->priv != NULL); - - g_free (editor->priv); - G_OBJECT_CLASS (parent_class)->finalize (object); + g_type_class_add_private (object_class, sizeof(EphyBookmarkPropertiesPrivate)); } static void @@ -440,7 +424,7 @@ build_ui (EphyBookmarkProperties *editor) static void ephy_bookmark_properties_init (EphyBookmarkProperties *editor) { - editor->priv = g_new0 (EphyBookmarkPropertiesPrivate, 1); + editor->priv = EPHY_BOOKMARK_PROPERTIES_GET_PRIVATE (editor); editor->priv->bookmark = NULL; editor->priv->tb_model = EPHY_TOOLBARS_MODEL |