diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-03-22 12:09:30 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-03-22 12:09:30 +0100 |
commit | 98fc1dc5406c3d4f191f899154eda1b0fa144d1a (patch) | |
tree | 75dc40bfa4843428704aabb83348403bdf903c9c /src | |
parent | typo (diff) | |
download | rekonq-98fc1dc5406c3d4f191f899154eda1b0fa144d1a.tar.xz |
update toolbar when bookmarks change. Yeah..
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks.cpp | 28 | ||||
-rw-r--r-- | src/bookmarks.h | 1 |
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; |