summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp2
-rw-r--r--src/bookmarks.cpp10
-rw-r--r--src/bookmarks.h7
-rw-r--r--src/mainwindow.cpp2
4 files changed, 12 insertions, 9 deletions
diff --git a/src/application.cpp b/src/application.cpp
index ebd99004..c072b9f7 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -293,7 +293,7 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
return;
}
- WebView *webView;
+ WebView *webView = 0;
switch(type)
{
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index d5bd107e..c9db4a9b 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -64,10 +64,10 @@ void BookmarkOwner::openBookmark(const KBookmark & bookmark,
Qt::MouseButtons mouseButtons,
Qt::KeyboardModifiers keyboardModifiers)
{
- Q_UNUSED(mouseButtons)
- Q_UNUSED(keyboardModifiers)
-
- emit openUrl(bookmark.url());
+ if (keyboardModifiers & Qt::ControlModifier || mouseButtons == Qt::MidButton)
+ emit openUrl(bookmark.url(), Rekonq::SettingOpenTab);
+ else
+ emit openUrl(bookmark.url(), Rekonq::CurrentTab);
}
@@ -183,7 +183,7 @@ BookmarkProvider::BookmarkProvider(QWidget *parent)
// setup menu
m_owner = new BookmarkOwner(this);
- connect(m_owner, SIGNAL(openUrl(const KUrl&)), this, SIGNAL(openUrl(const KUrl&)));
+ connect(m_owner, SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType &)), this, SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType &)));
m_bookmarkMenu = new BookmarkMenu(m_manager, m_owner, m_menu, m_actionCollection);
// setup toolbar
diff --git a/src/bookmarks.h b/src/bookmarks.h
index 9db71ab5..13562f06 100644
--- a/src/bookmarks.h
+++ b/src/bookmarks.h
@@ -29,6 +29,9 @@
#ifndef BOOKMARKS_H
#define BOOKMARKS_H
+// Local Includes
+#include "application.h"
+
// Qt Includes
#include <QWidget>
@@ -115,7 +118,7 @@ signals:
* @param url the URL to load
*
*/
- void openUrl(const KUrl &);
+ void openUrl(const KUrl &, const Rekonq::OpenType &);
private:
@@ -206,7 +209,7 @@ signals:
*
* @param url the URL to load
*/
- void openUrl(const KUrl &url);
+ void openUrl(const KUrl &, const Rekonq::OpenType &);
public slots:
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 5399a488..4ed885bc 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -176,7 +176,7 @@ void MainWindow::postLaunch()
connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &)));
// bookmarks loading
- connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&)));
+ connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)), Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&)));
// setting up toolbars to NOT have context menu enabled
setContextMenuPolicy(Qt::DefaultContextMenu);