summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkcontextmenu.cpp18
-rw-r--r--src/bookmarks/bookmarkcontextmenu.h1
-rw-r--r--src/bookmarks/bookmarksmanager.cpp2
3 files changed, 19 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();
diff --git a/src/bookmarks/bookmarkcontextmenu.h b/src/bookmarks/bookmarkcontextmenu.h
index 38fbc71a..7f00738a 100644
--- a/src/bookmarks/bookmarkcontextmenu.h
+++ b/src/bookmarks/bookmarkcontextmenu.h
@@ -45,6 +45,7 @@ private slots:
void openInCurrentTab();
void openInNewTab();
void openInNewWindow();
+ void copyToClipboard();
void deleteBookmark();
void openFolderInTabs();
void editBookmark();
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index 8cdc5d8e..07b0238f 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -218,11 +218,13 @@ void BookmarkProvider::setupBookmarkBar(KToolBar *toolbar)
slotBookmarksChanged("", "");
}
+
void BookmarkProvider::removeToolBar(KToolBar *toolbar)
{
m_bookmarkToolBars.removeOne(toolbar);
}
+
void BookmarkProvider::slotBookmarksChanged(const QString &group, const QString &caller)
{
Q_UNUSED(group)