[epiphany/wip/sync] bookmarks-import: Display new bookmarks immediately after an import



commit bc962a4afdbe5b5f2c29166a07ee84a63048b9fd
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Fri Mar 31 18:33:46 2017 +0300

    bookmarks-import: Display new bookmarks immediately after an import
    
    This fixes the problem where the browser has to be restarted after
    importing a set of bookmarks from a gvdb file/firefox profile.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780564

 src/bookmarks/ephy-bookmarks-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index f4c1098..c3a0a27 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -545,6 +545,7 @@ ephy_bookmarks_manager_add_bookmarks (EphyBookmarksManager *self,
 {
   GSequenceIter *iter;
   GSequenceIter *new_iter;
+  int position;
 
   g_return_if_fail (EPHY_IS_BOOKMARKS_MANAGER (self));
   g_return_if_fail (bookmarks != NULL);
@@ -557,6 +558,9 @@ ephy_bookmarks_manager_add_bookmarks (EphyBookmarksManager *self,
     new_iter = ephy_bookmarks_search_and_insert_bookmark (self->bookmarks,
                                                           g_object_ref (bookmark));
     if (new_iter) {
+      position = g_sequence_iter_get_position (new_iter);
+      g_list_model_items_changed (G_LIST_MODEL (self), position, 0, 1);
+
       g_signal_emit (self, signals[BOOKMARK_ADDED], 0, bookmark);
       ephy_bookmarks_manager_watch_bookmark (self, bookmark);
     }


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