summaryrefslogtreecommitdiff
path: root/src
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
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')
-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)