summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkcontextmenu.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-04-06 16:48:05 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-08 00:56:40 +0200
commitc53637d8b4c45b444c5e5d1d74d4a2bc0a34ef97 (patch)
treef86b90a57eefcddae0901448b8f173ba567de499 /src/bookmarks/bookmarkcontextmenu.cpp
parent- Enable context menu for folders and separators of the bookmark bar (diff)
downloadrekonq-c53637d8b4c45b444c5e5d1d74d4a2bc0a34ef97.tar.xz
Add a missing slot
Diffstat (limited to 'src/bookmarks/bookmarkcontextmenu.cpp')
-rw-r--r--src/bookmarks/bookmarkcontextmenu.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bookmarks/bookmarkcontextmenu.cpp b/src/bookmarks/bookmarkcontextmenu.cpp
index ccb63143..1d50cfe9 100644
--- a/src/bookmarks/bookmarkcontextmenu.cpp
+++ b/src/bookmarks/bookmarkcontextmenu.cpp
@@ -31,6 +31,9 @@
#include "application.h"
#include "bookmarksmanager.h"
+// Qt Includes
+#include <QClipboard>
+
// KDE Includes
#include <KMessageBox>
#include <KActionCollection>
@@ -188,6 +191,17 @@ void BookmarkContextMenu::openInNewWindow()
Application::instance()->loadUrl(bookmark().url(), Rekonq::NewWindow);
}
+
+void BookmarkContextMenu::copyToClipboard()
+{
+ if(bookmark().isNull())
+ return;
+
+ QClipboard *cb = QApplication::clipboard();
+ cb->setText(bookmark().url().url());
+}
+
+
void BookmarkContextMenu::deleteBookmark()
{
KBookmark bm = bookmark();
@@ -228,7 +242,6 @@ void BookmarkContextMenu::openFolderInTabs()
void BookmarkContextMenu::newBookmarkGroup()
{
- KBookmark newBk;
KBookmark selected = bookmark();
KBookmarkDialog *dialog = owner()->bookmarkDialog(manager(), QApplication::activeWindow());
@@ -236,11 +249,12 @@ void BookmarkContextMenu::newBookmarkGroup()
{
if(selected.isGroup())
{
- newBk = dialog->createNewFolder("New folder", selected);
+ dialog->createNewFolder("New folder", selected);
}
else
{
+ KBookmark newBk;
newBk = dialog->createNewFolder("New folder", selected.parentGroup());
selected.parentGroup().moveBookmark(newBk, selected);
manager()->emitChanged();