summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmanager.cpp
diff options
context:
space:
mode:
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();
+ }
+}