diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-10-08 21:45:20 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-10-08 21:45:20 +0800 |
commit | 02082b84fae3819e598e8b339f28e1b2efc575f2 (patch) | |
tree | 7db596326d15e39164a59ae5026368206d479225 /src/bookmarks/ephy-bookmarks-menu.c | |
parent | 2fd6f15b8a862001a661064426f5ec4a84eb58b2 (diff) | |
download | gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar.gz gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar.bz2 gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar.lz gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar.xz gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.tar.zst gsoc2013-epiphany-02082b84fae3819e598e8b339f28e1b2efc575f2.zip |
When adding a bookmark, check if it has same node ID as one scheduled for
2004-10-08 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks-menu.c: (bookmark_added_cb):
When adding a bookmark, check if it has same node ID as one
scheduled for removal, and if so, process the removal immediately.
Fixes bug #154805.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-menu.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-menu.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c index 0e06ac199..d64005a4b 100644 --- a/src/bookmarks/ephy-bookmarks-menu.c +++ b/src/bookmarks/ephy-bookmarks-menu.c @@ -616,6 +616,23 @@ bookmark_added_cb (EphyNode *bookmarks, if (menu->priv->bmk_actions != NULL) { + /* If the new bookmark has the node ID of one scheduled to + * be removed, remove the old one first then add new one. + * This works since the action name depends only on the + * node ID. See bug #154805. + */ + GSList *l; + + l = g_slist_find (menu->priv->removed_bmks, + GUINT_TO_POINTER (ephy_node_get_id (bmk))); + if (l != NULL) + { + remove_action (l->data, menu->priv->bmk_actions); + + menu->priv->removed_bmks = g_slist_delete_link + (menu->priv->removed_bmks, l); + } + add_action_for_bookmark (menu, bmk); ephy_bookmarks_menu_maybe_update (menu); |