diff options
-rw-r--r-- | data/defaultbookmarks.xbel | 39 | ||||
-rw-r--r-- | src/bookmarks.cpp | 28 | ||||
-rw-r--r-- | src/bookmarks.h | 1 |
3 files changed, 47 insertions, 21 deletions
diff --git a/data/defaultbookmarks.xbel b/data/defaultbookmarks.xbel index 4cad6c78..b4919c5c 100644 --- a/data/defaultbookmarks.xbel +++ b/data/defaultbookmarks.xbel @@ -1,25 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xbel> <xbel version="1.0"> - <folder folded="no"> - <title>Default Bookmark</title> - <bookmark href="http://qtsoftware.com/"> - <title>QtSoftware</title> - </bookmark> - <bookmark href="http://webkit.org/"> - <title>WebKit.org</title> - </bookmark> - <bookmark href="http://rekonq.sourceforge.net/"> - <title>rekonq site</title> - </bookmark> - <bookmark href="http://labs.trolltech.com/"> - <title>Trolltech Labs</title> - </bookmark> - <bookmark href="http://kde-apps.org/"> - <title>KDE-Apps.org</title> - </bookmark> - <bookmark href="http://www.kde.org/"> - <title>KDE site</title> - </bookmark> - </folder> + <bookmark href="http://qtsoftware.com/"> + <title>QtSoftware</title> + </bookmark> + <bookmark href="http://webkit.org/"> + <title>WebKit.org</title> + </bookmark> + <bookmark href="http://rekonq.sourceforge.net/"> + <title>rekonq site</title> + </bookmark> + <bookmark href="http://labs.trolltech.com/"> + <title>Trolltech Labs</title> + </bookmark> + <bookmark href="http://kde-apps.org/"> + <title>KDE-Apps.org</title> + </bookmark> + <bookmark href="http://www.kde.org/"> + <title>KDE site</title> + </bookmark> </xbel> 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; |