[epiphany] bookmarks-popover: Ignore smart bookmarks in tag added/removed callbacks



commit 1a09c3ec717d9e3b052215dc5cc924d3cf6ee61a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Feb 19 14:46:13 2017 -0600

    bookmarks-popover: Ignore smart bookmarks in tag added/removed callbacks
    
    Bookmarks popover is not designed to handle smart bookmarks. They're
    just going to make it crash.

 src/bookmarks/ephy-bookmarks-popover.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-popover.c b/src/bookmarks/ephy-bookmarks-popover.c
index a10dab2..49301f4 100644
--- a/src/bookmarks/ephy-bookmarks-popover.c
+++ b/src/bookmarks/ephy-bookmarks-popover.c
@@ -70,6 +70,9 @@ ephy_bookmarks_popover_bookmark_tag_added_cb (EphyBookmarksPopover *self,
   g_assert (EPHY_IS_BOOKMARK (bookmark));
   g_assert (EPHY_IS_BOOKMARKS_POPOVER (self));
 
+  if (ephy_bookmark_is_smart (bookmark))
+    return;
+
   /* If the bookmark no longer has 0 tags, we remove it from the tags list box */
   if (g_sequence_get_length (ephy_bookmark_get_tags (bookmark)) == 1) {
     GList *children;
@@ -106,6 +109,9 @@ ephy_bookmarks_popover_bookmark_tag_removed_cb (EphyBookmarksPopover *self,
   g_assert (EPHY_IS_BOOKMARK (bookmark));
   g_assert (EPHY_IS_BOOKMARKS_POPOVER (self));
 
+  if (ephy_bookmark_is_smart (bookmark))
+    return;
+
   /* If the bookmark has 0 tags after removing one, we add it to the tags list
    * box */
   if (g_sequence_is_empty (ephy_bookmark_get_tags (bookmark))) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]