summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-03-22 12:09:30 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-03-22 12:09:30 +0100
commit98fc1dc5406c3d4f191f899154eda1b0fa144d1a (patch)
tree75dc40bfa4843428704aabb83348403bdf903c9c /src
parenttypo (diff)
downloadrekonq-98fc1dc5406c3d4f191f899154eda1b0fa144d1a.tar.xz
update toolbar when bookmarks change. Yeah..
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.cpp28
-rw-r--r--src/bookmarks.h1
2 files changed, 29 insertions, 0 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index 9b48de6f..bb2fb162 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -112,6 +112,34 @@ BookmarksProvider::BookmarksProvider(KMainWindow* parent)
}
m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() );
m_ac = new KActionCollection( this );
+
+ connect( m_manager, SIGNAL( changed(const QString &, const QString &) ), this, SLOT( slotBookmarksChanged(const QString &) ) );
+}
+
+
+void BookmarksProvider::slotBookmarksChanged(const QString & group)
+{
+ KBookmarkGroup toolbarGroup = m_manager->toolbar();
+// KBookmarkGroup tb = getToolbar(); // heavy for non cached toolbar version
+ kWarning() << "KBookmarkBar::slotBookmarksChanged( " << group << " )";
+
+ if ( toolbarGroup.isNull() )
+ return;
+
+/* if ( KBookmark::commonParent(group, tb.address()) == group) // Is group a parent of tb.address?
+ {
+ */m_bmToolbar->clear();
+ provideBmToolbar(m_bmToolbar);
+// }
+// else
+// {
+// // Iterate recursively into child menus
+// for ( QList<KBookmarkMenu *>::ConstIterator smit = m_lstSubMenus.constBegin(), smend = m_lstSubMenus.constEnd();
+// smit != smend; ++smit )
+// {
+// (*smit)->slotBookmarksChanged( group );
+// }
+// }
}
diff --git a/src/bookmarks.h b/src/bookmarks.h
index d6e74baa..9ef82624 100644
--- a/src/bookmarks.h
+++ b/src/bookmarks.h
@@ -169,6 +169,7 @@ public:
public slots:
void contextMenu(const QPoint & point);
+ void slotBookmarksChanged(const QString &);
private:
KMainWindow *m_parent;