diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-27 00:57:11 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-27 00:57:11 +0200 |
| commit | 8a1961707348c85b6564a18a4c0c3e1d8e34b65c (patch) | |
| tree | 59766da86b4e26268cee433907044c19a371e6bb /src/browsertab.cpp | |
| parent | ad15a056672f049cf8302fc7a0a94b71f42db356 (diff) | |
| download | kristall-8a1961707348c85b6564a18a4c0c3e1d8e34b65c.tar.gz | |
Fixes typo, adds middle-click to open link in new tab.
Diffstat (limited to 'src/browsertab.cpp')
| -rw-r--r-- | src/browsertab.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 { |
