summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmanager.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-07-18 19:15:44 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-07-18 19:15:44 +0200
commit737dd6ec3b8daa1517b392dbad1f13b090e5d33b (patch)
tree6005c75d4062e5f5a1de6390eb5eb3aa187f005b /src/bookmarks/bookmarksmanager.cpp
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-737dd6ec3b8daa1517b392dbad1f13b090e5d33b.tar.xz
- Performance improvements (partial updates of the tree)
- Synchronisation of the folded states between each windows - Code cleanup
Diffstat (limited to 'src/bookmarks/bookmarksmanager.cpp')
-rw-r--r--src/bookmarks/bookmarksmanager.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index 537b5366..57a29907 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -483,3 +483,34 @@ void BookmarkProvider::slotAddBookmark()
parentBookmark.addBookmark(bookmarkOwner()->currentTitle(), bookmarkOwner()->currentUrl());
bookmarkManager()->emitChanged();
}
+
+
+void BookmarkProvider::registerBookmarkPanel(BookmarksPanel *panel)
+{
+ if (panel && !m_bookmarkPanels.contains(panel))
+ {
+ m_bookmarkPanels.append(panel);
+ connect(panel, SIGNAL(expansionChanged()), this, SLOT(slotPanelChanged()));
+ }
+}
+
+
+void BookmarkProvider::removeBookmarkPanel(BookmarksPanel *panel)
+{
+ m_bookmarkPanels.removeOne(panel);
+
+ if (m_bookmarkPanels.isEmpty())
+ {
+ Application::bookmarkProvider()->bookmarkManager()->emitChanged();
+ }
+}
+
+
+void BookmarkProvider::slotPanelChanged()
+{
+ foreach (BookmarksPanel *panel, m_bookmarkPanels)
+ {
+ if (panel && panel != sender())
+ panel->startLoadFoldedState();
+ }
+}