From 50983f01b85778b779ce3a4d249a6a804cf1f4fd Mon Sep 17 00:00:00 2001 From: Aneesh Roy Date: Mon, 16 Oct 2017 17:14:48 +0100 Subject: [PATCH] New tab opens as unrelated --- qutebrowser/mainwindow/tabbedbrowser.py | 3 ++- qutebrowser/mainwindow/tabwidget.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 91ae1a410..d8f883889 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -116,7 +116,7 @@ class TabbedBrowser(tabwidget.TabWidget): self._tab_insert_idx_right = -1 self.shutting_down = False self.tabCloseRequested.connect(self.on_tab_close_requested) - self.new_tab_requested.connect(self.openurl) + self.new_tab_requested.connect(self.tabopen) self.currentChanged.connect(self.on_current_changed) self.cur_load_started.connect(self.on_cur_load_started) self.cur_fullscreen_requested.connect(self.tabBar().maybe_hide) @@ -403,6 +403,7 @@ class TabbedBrowser(tabwidget.TabWidget): @pyqtSlot('QUrl') @pyqtSlot('QUrl', bool) + @pyqtSlot('QUrl', bool, bool) def tabopen(self, url=None, background=None, related=True, idx=None, *, ignore_tabs_are_windows=False): """Open a new tab with a given URL. diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 9dfd720d3..f12978604 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -50,7 +50,7 @@ class TabWidget(QTabWidget): """ tab_index_changed = pyqtSignal(int, int) - new_tab_requested = pyqtSignal('QUrl', bool) + new_tab_requested = pyqtSignal('QUrl', bool, bool) def __init__(self, win_id, parent=None): super().__init__(parent) @@ -267,7 +267,7 @@ class TabWidget(QTabWidget): @pyqtSlot() def _on_new_tab_requested(self): """Open a new tab.""" - self.new_tab_requested.emit(config.val.url.default_page, True) + self.new_tab_requested.emit(config.val.url.default_page, False, False) def tab_url(self, idx): """Get the URL of the tab at the given index.