[epiphany] bookmarks-import: Display new bookmarks immediately after an import
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] bookmarks-import: Display new bookmarks immediately after an import
- Date: Sat, 1 Apr 2017 07:23:23 +0000 (UTC)
commit 1d8b2e33fcd343a54bf06b1541e58bba42710ce6
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 c6ab5c6..60b24eb 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -336,6 +336,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);
@@ -348,6 +349,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]