From a2d92d6e7eb5b365860566c09df890dbcbfa94d9 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Fri, 10 Aug 2012 12:00:22 +0200 Subject: Add an icon for the toolbar root entry in the BookmarkWidget Don't duplicate the toolbar root entry in some cases --- src/urlbar/bookmarkwidget.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp index ba5ade00..6026cb20 100644 --- a/src/urlbar/bookmarkwidget.cpp +++ b/src/urlbar/bookmarkwidget.cpp @@ -242,12 +242,14 @@ void BookmarkWidget::setupFolderComboBox() if (toolBarRoot.address() == root.address()) { - m_folder->addItem(i18n("Bookmark Toolbar"), + m_folder->addItem(KIcon("bookmark-toolbar"), + i18n("Bookmark Toolbar"), toolBarRoot.address()); } else { - m_folder->addItem(toolBarRoot.text(), + m_folder->addItem(KIcon("bookmark-toolbar"), + toolBarRoot.text(), toolBarRoot.address()); } m_folder->insertSeparator(1); @@ -261,7 +263,7 @@ void BookmarkWidget::setupFolderComboBox() for (KBookmark bookmark = toolBarRoot.first(); !bookmark.isNull(); bookmark = toolBarRoot.next(bookmark)) { - if (bookmark.isGroup()) + if (bookmark.isGroup() && bookmark.address() != m_bookmark->parentGroup().address()) { m_folder->addItem(bookmark.text(), bookmark.address()); } -- cgit v1.2.1