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-topics-selector.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-topics-selector.c')
-rw-r--r-- | src/bookmarks/ephy-topics-selector.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/bookmarks/ephy-topics-selector.c b/src/bookmarks/ephy-topics-selector.c index 9d8447731..e1a583a72 100644 --- a/src/bookmarks/ephy-topics-selector.c +++ b/src/bookmarks/ephy-topics-selector.c @@ -31,7 +31,6 @@ static void ephy_topics_selector_class_init (EphyTopicsSelectorClass *klass); static void ephy_topics_selector_init (EphyTopicsSelector *editor); -static void ephy_topics_selector_finalize (GObject *object); static void ephy_topics_selector_set_property (GObject *object, guint prop_id, const GValue *value, @@ -41,6 +40,8 @@ static void ephy_topics_selector_get_property (GObject *object, GValue *value, GParamSpec *pspec); +#define EPHY_TOPICS_SELECTOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_TOPICS_SELECTOR, EphyTopicsSelectorPrivate)) + struct EphyTopicsSelectorPrivate { EphyBookmarks *bookmarks; @@ -99,8 +100,6 @@ ephy_topics_selector_class_init (EphyTopicsSelectorClass *klass) parent_class = g_type_class_peek_parent (klass); - object_class->finalize = ephy_topics_selector_finalize; - object_class->set_property = ephy_topics_selector_set_property; object_class->get_property = ephy_topics_selector_get_property; @@ -109,7 +108,7 @@ ephy_topics_selector_class_init (EphyTopicsSelectorClass *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, @@ -118,23 +117,8 @@ ephy_topics_selector_class_init (EphyTopicsSelectorClass *klass) "Bookmark", "Bookmark", G_PARAM_READWRITE)); -} - -static void -ephy_topics_selector_finalize (GObject *object) -{ - EphyTopicsSelector *editor; - - g_return_if_fail (object != NULL); - g_return_if_fail (EPHY_IS_TOPIC_SELECTOR (object)); - - editor = EPHY_TOPICS_SELECTOR (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(EphyTopicsSelectorPrivate)); } void @@ -395,7 +379,7 @@ ephy_topics_build_ui (EphyTopicsSelector *editor) static void ephy_topics_selector_init (EphyTopicsSelector *editor) { - editor->priv = g_new0 (EphyTopicsSelectorPrivate, 1); + editor->priv = EPHY_TOPICS_SELECTOR_GET_PRIVATE (editor); editor->priv->bookmark = NULL; } @@ -409,7 +393,7 @@ ephy_topics_selector_new (EphyBookmarks *bookmarks, g_assert (bookmarks != NULL); editor = EPHY_TOPICS_SELECTOR (g_object_new - (EPHY_TYPE_TOPIC_SELECTOR, + (EPHY_TYPE_TOPICS_SELECTOR, "bookmarks", bookmarks, "bookmark", bookmark, NULL)); |