summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkscontextmenu.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-10-09 17:30:03 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-10-13 21:17:05 +0200
commit25f7a9dc17f047715db0a06729151f8721513800 (patch)
tree87250bb9b16b15e44cd9f4ef7d55d945e339beb4 /src/bookmarks/bookmarkscontextmenu.cpp
parentEnabling WebKit Page Cache feature: please, refers to (diff)
downloadrekonq-25f7a9dc17f047715db0a06729151f8721513800.tar.xz
- get rid of the selected bookmark in BookmarkOwner
we can now create actions as we want and not only in a context menu - an important cleanup - validOpenUrl() is now useless
Diffstat (limited to 'src/bookmarks/bookmarkscontextmenu.cpp')
-rw-r--r--src/bookmarks/bookmarkscontextmenu.cpp44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/bookmarks/bookmarkscontextmenu.cpp b/src/bookmarks/bookmarkscontextmenu.cpp
index 8f1a570c..93df6ce3 100644
--- a/src/bookmarks/bookmarkscontextmenu.cpp
+++ b/src/bookmarks/bookmarkscontextmenu.cpp
@@ -35,35 +35,33 @@ BookmarksContextMenu::BookmarksContextMenu(const KBookmark &bookmark, KBookmarkM
: KBookmarkContextMenu(bookmark, manager, owner, parent)
, m_bmOwner(owner)
{
- m_bmOwner->setCurrentBookmark(bookmark);
}
BookmarksContextMenu::~BookmarksContextMenu()
{
- m_bmOwner->unsetCurrentBookmark();
}
void BookmarksContextMenu::addBookmarkActions()
{
- addAction(m_bmOwner->action(BookmarkOwner::OPEN_IN_TAB));
- addAction(m_bmOwner->action(BookmarkOwner::OPEN_IN_WINDOW));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::OPEN_IN_TAB));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::OPEN_IN_WINDOW));
addSeparator();
- addAction(m_bmOwner->action(BookmarkOwner::BOOKMARK_PAGE));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_FOLDER));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_SEPARATOR));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::BOOKMARK_PAGE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_FOLDER));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_SEPARATOR));
addSeparator();
- addAction(m_bmOwner->action(BookmarkOwner::COPY));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::COPY));
addSeparator();
- addAction(m_bmOwner->action(BookmarkOwner::EDIT));
- addAction(m_bmOwner->action(BookmarkOwner::DELETE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::EDIT));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::DELETE));
}
@@ -82,39 +80,39 @@ void BookmarksContextMenu::addFolderActions()
if (!child.isNull())
{
- addAction(m_bmOwner->action(BookmarkOwner::OPEN_FOLDER));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::OPEN_FOLDER));
addSeparator();
}
}
- addAction(m_bmOwner->action(BookmarkOwner::BOOKMARK_PAGE));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_FOLDER));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_SEPARATOR));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::BOOKMARK_PAGE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_FOLDER));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_SEPARATOR));
addSeparator();
- addAction(m_bmOwner->action(BookmarkOwner::EDIT));
- addAction(m_bmOwner->action(BookmarkOwner::DELETE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::EDIT));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::DELETE));
}
void BookmarksContextMenu::addSeparatorActions()
{
- addAction(m_bmOwner->action(BookmarkOwner::BOOKMARK_PAGE));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_FOLDER));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_SEPARATOR));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::BOOKMARK_PAGE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_FOLDER));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_SEPARATOR));
addSeparator();
- addAction(m_bmOwner->action(BookmarkOwner::DELETE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::DELETE));
}
void BookmarksContextMenu::addNullActions()
{
- addAction(m_bmOwner->action(BookmarkOwner::BOOKMARK_PAGE));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_FOLDER));
- addAction(m_bmOwner->action(BookmarkOwner::NEW_SEPARATOR));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::BOOKMARK_PAGE));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_FOLDER));
+ addAction(m_bmOwner->action(bookmark(), BookmarkOwner::NEW_SEPARATOR));
}