[epiphany/wip/bookmarks: 281/315] bookmarks-manager: Emit 'tag-added' signal only if the function completed successfully



commit d0cb9a834a3dc168d5d019e1cb08f6ec0bb30b09
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Mon Aug 22 14:12:03 2016 +0300

    bookmarks-manager: Emit 'tag-added' signal only if the function completed successfully

 src/ephy-bookmarks-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-bookmarks-manager.c b/src/ephy-bookmarks-manager.c
index 96c102e..7ca5f21 100644
--- a/src/ephy-bookmarks-manager.c
+++ b/src/ephy-bookmarks-manager.c
@@ -377,10 +377,10 @@ ephy_bookmarks_manager_add_tag (EphyBookmarksManager *self, const char *tag)
 
   prev_tag_iter = g_sequence_iter_prev (tag_iter);
   if (g_sequence_iter_is_end (prev_tag_iter)
-      || g_strcmp0 (g_sequence_get (prev_tag_iter), tag) != 0)
+      || g_strcmp0 (g_sequence_get (prev_tag_iter), tag) != 0) {
     g_sequence_insert_before (tag_iter, g_strdup (tag));
-
-  g_signal_emit (self, signals[TAG_ADDED], 0, tag);
+    g_signal_emit (self, signals[TAG_ADDED], 0, tag);
+  }
 }
 
 void


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