diff options
author | Peter Harvey <peter.a.harvey@gmail.com> | 2006-01-29 18:24:56 +0800 |
---|---|---|
committer | Peter Anthony Harvey <paharvey@src.gnome.org> | 2006-01-29 18:24:56 +0800 |
commit | 30842d47d875fc89f84584aed9ef4894612aa037 (patch) | |
tree | 8894f89e7a4fcc10d19a16b0a2224bafc081821c /src/bookmarks/ephy-topics-palette.c | |
parent | b464665b4db8ad07b8f5d55b28a27fa01b5a6872 (diff) | |
download | gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar.gz gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar.bz2 gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar.lz gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar.xz gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.tar.zst gsoc2013-epiphany-30842d47d875fc89f84584aed9ef4894612aa037.zip |
src/bookmarks/ephy-topics-entry.c src/bookmarks/ephy-topics-palette.c
2006-01-29 Peter Harvey <peter.a.harvey@gmail.com>
* src/bookmarks/ephy-topics-entry.c
* src/bookmarks/ephy-topics-palette.c
Make both topcs palette and entry even more robust.
Substantially improved behaviour of the topics entry.
Diffstat (limited to 'src/bookmarks/ephy-topics-palette.c')
-rw-r--r-- | src/bookmarks/ephy-topics-palette.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/src/bookmarks/ephy-topics-palette.c b/src/bookmarks/ephy-topics-palette.c index 29ff7b0c5..91618699d 100644 --- a/src/bookmarks/ephy-topics-palette.c +++ b/src/bookmarks/ephy-topics-palette.c @@ -269,16 +269,31 @@ tree_changed_cb (EphyBookmarks *bookmarks, g_idle_add ((GSourceFunc) update_list_idle, palette); } +static void +node_added_cb (EphyNode *parent, + EphyNode *child, + EphyTopicsPalette *palette) +{ + g_idle_add ((GSourceFunc) update_list_idle, palette); +} static void -child_changed_cb (EphyNode *node, - EphyNode *child, - guint property_id, - EphyTopicsPalette *palette) +node_changed_cb (EphyNode *parent, + EphyNode *child, + guint property_id, + EphyTopicsPalette *palette) { g_idle_add ((GSourceFunc) update_list_idle, palette); } +static void +node_removed_cb (EphyNode *parent, + EphyNode *child, + guint index, + EphyTopicsPalette *palette) +{ + g_idle_add ((GSourceFunc) update_list_idle, palette); +} static void ephy_topics_palette_set_property (GObject *object, @@ -287,17 +302,22 @@ ephy_topics_palette_set_property (GObject *object, GParamSpec *pspec) { EphyTopicsPalette *palette = EPHY_TOPICS_PALETTE (object); + EphyNode *node; switch (prop_id) { case PROP_BOOKMARKS: palette->priv->bookmarks = g_value_get_object (value); + node = ephy_bookmarks_get_keywords (palette->priv->bookmarks); + ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_ADDED, + (EphyNodeCallback) node_added_cb, object); + ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_CHANGED, + (EphyNodeCallback) node_changed_cb, object); + ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_REMOVED, + (EphyNodeCallback) node_removed_cb, object); g_signal_connect_object (palette->priv->bookmarks, "tree-changed", G_CALLBACK (tree_changed_cb), palette, G_CONNECT_AFTER); - ephy_node_signal_connect_object - (ephy_bookmarks_get_keywords (palette->priv->bookmarks), - EPHY_NODE_CHILD_CHANGED, (EphyNodeCallback) child_changed_cb, object); break; case PROP_BOOKMARK: palette->priv->bookmark = g_value_get_pointer (value); |