aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-08 21:44:46 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-08 21:44:46 +0800
commit52584020dd55c64d632c225fb17b8952538dbf1d (patch)
tree1a78c51762b020d21718153ae22702776bf3b4f9
parent7c730da7a711402b5b60576f00652450a3a4f2f9 (diff)
downloadgsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar.gz
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar.bz2
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar.lz
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar.xz
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.tar.zst
gsoc2013-epiphany-52584020dd55c64d632c225fb17b8952538dbf1d.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.
-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);