aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/bookmarks/ephy-bookmarks-menu.c17
2 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e3dc58f0d..21e94be20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2004-10-08 Marco Pesenti Gritti <marco@gnome.org>
reviewed by: Christian Persch <chpe@cvs.gnome.org>
diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c
index 10e0dc201..62adeb395 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);