diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-03-02 05:30:47 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-03-02 05:30:47 +0800 |
commit | f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8 (patch) | |
tree | 70d0d4b98c5735aecb4b415b958acd777363f864 | |
parent | 67a48b9741659c516d6e62f0a9f85a3493d8010f (diff) | |
download | gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar.gz gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar.bz2 gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar.lz gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar.xz gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.tar.zst gsoc2013-epiphany-f460e4b8e7ab36fc1deeb753a1ca8baa7d6116b8.zip |
Correctly sync the smarturl property of EphyBookmarksAction when it
2004-03-01 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmark-action.c: (smart_child_added_cb),
(smart_child_removed_cb), (ephy_bookmark_action_init):
Correctly sync the smarturl property of EphyBookmarksAction when
it changes. Fixes incorrect show/hide of the entry on the bookmarks
toolbar.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmark-action.c | 30 |
2 files changed, 39 insertions, 0 deletions
@@ -1,5 +1,14 @@ 2004-03-01 Christian Persch <chpe@cvs.gnome.org> + * src/bookmarks/ephy-bookmark-action.c: (smart_child_added_cb), + (smart_child_removed_cb), (ephy_bookmark_action_init): + + Correctly sync the smarturl property of EphyBookmarksAction when + it changes. Fixes incorrect show/hide of the entry on the bookmarks + toolbar. + +2004-03-01 Christian Persch <chpe@cvs.gnome.org> + * src/bookmarks/ephy-bookmarks.c: (update_has_smart_address): When changing a bookmark address and it was a smart bookmark but diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c index ee2104506..68bad78fd 100644 --- a/src/bookmarks/ephy-bookmark-action.c +++ b/src/bookmarks/ephy-bookmark-action.c @@ -525,6 +525,29 @@ bookmarks_child_changed_cb (EphyNode *node, } static void +smart_child_added_cb (EphyNode *smart_bmks, + EphyNode *child, + EphyBookmarkAction *action) +{ + if (action->priv->bookmark_id == ephy_node_get_id (child)) + { + g_object_set (action, "smarturl", TRUE, NULL); + } +} + +static void +smart_child_removed_cb (EphyNode *smart_bmks, + EphyNode *child, + guint old_index, + EphyBookmarkAction *action) +{ + if (action->priv->bookmark_id == ephy_node_get_id (child)) + { + g_object_set (action, "smarturl", FALSE, NULL); + } +} + +static void ephy_bookmark_action_init (EphyBookmarkAction *action) { EphyBookmarks *bookmarks; @@ -540,6 +563,13 @@ ephy_bookmark_action_init (EphyBookmarkAction *action) ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_CHANGED, (EphyNodeCallback) bookmarks_child_changed_cb, G_OBJECT (action)); + node = ephy_bookmarks_get_smart_bookmarks (bookmarks); + ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_ADDED, + (EphyNodeCallback) smart_child_added_cb, + G_OBJECT (action)); + ephy_node_signal_connect_object (node, EPHY_NODE_CHILD_REMOVED, + (EphyNodeCallback) smart_child_removed_cb, + G_OBJECT (action)); } GtkAction * |