diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-23 00:02:05 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-23 00:02:05 +0200 |
commit | 430e12e9e9776ae9f0ab0c48ca9890ed97080001 (patch) | |
tree | 6706d0e35143464fe3bd929b32c35aaffa44f79c /src/bookmarks/bookmarkscontextmenu.cpp | |
parent | fix Messages.sh after yesterday change in extract-messages.sh (diff) | |
parent | Don't add open folder in tabs if there are only folders (diff) | |
download | rekonq-430e12e9e9776ae9f0ab0c48ca9890ed97080001.tar.xz |
Merge commit 'refs/merge-requests/184' of git://gitorious.org/rekonq/mainline into m184
Diffstat (limited to 'src/bookmarks/bookmarkscontextmenu.cpp')
-rw-r--r-- | src/bookmarks/bookmarkscontextmenu.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/bookmarks/bookmarkscontextmenu.cpp b/src/bookmarks/bookmarkscontextmenu.cpp index a473966a..da986fd2 100644 --- a/src/bookmarks/bookmarkscontextmenu.cpp +++ b/src/bookmarks/bookmarkscontextmenu.cpp @@ -69,10 +69,22 @@ void BookmarksContextMenu::addBookmarkActions() void BookmarksContextMenu::addFolderActions() { - if (!bookmark().toGroup().first().isNull()) + KBookmarkGroup group = bookmark().toGroup(); + + if (!group.first().isNull()) { - addAction(bmOwner->action(BookmarkOwner::OPEN_FOLDER)); - addSeparator(); + KBookmark child = group.first(); + + while (child.isGroup() || child.isSeparator()) + { + child = group.next(child); + } + + if (!child.isNull()) + { + addAction(bmOwner->action(BookmarkOwner::OPEN_FOLDER)); + addSeparator(); + } } addAction(bmOwner->action(BookmarkOwner::BOOKMARK_PAGE)); |