From 8a1961707348c85b6564a18a4c0c3e1d8e34b65c Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Sat, 27 Jun 2020 00:57:11 +0200 Subject: Fixes typo, adds middle-click to open link in new tab. --- src/browsertab.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index ae7fd20..0f0d8b2 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -642,9 +642,8 @@ void BrowserTab::on_fav_button_clicked() void BrowserTab::on_text_browser_anchorClicked(const QUrl &url) { - static int click_count = 0; - qDebug() << (++click_count) << url; - + // Ctrl scheme is *always* the current tab, it's + // used for fake-buttons if(url.scheme() == "kristall+ctrl") { if(this->is_internal_location) { @@ -712,7 +711,11 @@ void BrowserTab::on_text_browser_anchorClicked(const QUrl &url) if (support == ProtocolSetup::Enabled) { - this->navigateTo(real_url, PushImmediate); + if(this->ui->text_browser->last_button == Qt::MiddleButton) { + mainWindow->addNewTab(false, real_url); + } else { + this->navigateTo(real_url, PushImmediate); + } } else { -- cgit v1.2.3