summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkscontextmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/bookmarkscontextmenu.cpp')
-rw-r--r--src/bookmarks/bookmarkscontextmenu.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bookmarks/bookmarkscontextmenu.cpp b/src/bookmarks/bookmarkscontextmenu.cpp
index a55f7777..25cb9f24 100644
--- a/src/bookmarks/bookmarkscontextmenu.cpp
+++ b/src/bookmarks/bookmarkscontextmenu.cpp
@@ -29,6 +29,11 @@
// Local Includes
#include "bookmarkowner.h"
+#include "bookmarkprovider.h"
+#include "application.h"
+
+// KDE Includes
+#include <KBookmarkManager>
BookmarksContextMenu::BookmarksContextMenu(const KBookmark &bookmark, KBookmarkManager *manager, BookmarkOwner *owner, QWidget *parent)
@@ -64,6 +69,15 @@ void BookmarksContextMenu::addFolderActions()
{
KBookmarkGroup group = bookmark().toGroup();
+ if (bookmark().internalElement().attributeNode("toolbar").value() == "yes")
+ {
+ addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::UNSET_TOOLBAR_FOLDER));
+ }
+ else
+ {
+ addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::SET_TOOLBAR_FOLDER));
+ }
+
if (!group.first().isNull())
{
KBookmark child = group.first();
@@ -105,6 +119,11 @@ void BookmarksContextMenu::addSeparatorActions()
void BookmarksContextMenu::addNullActions()
{
+ KBookmarkManager *manager = rApp->bookmarkProvider()->bookmarkManager();
+ if (manager->toolbar().hasParent())
+ {
+ addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::UNSET_TOOLBAR_FOLDER));
+ }
addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::BOOKMARK_PAGE));
addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::NEW_FOLDER));
addAction(m_bmOwner->createAction(bookmark(), BookmarkOwner::NEW_SEPARATOR));