Add a new option tabs->tabs-are-windows.
This commit is contained in:
parent
615be2a4bc
commit
8ec42908f1
@ -380,6 +380,10 @@ DATA = collections.OrderedDict([
|
||||
('indicator-space',
|
||||
SettingValue(typ.Int(minval=0), '3'),
|
||||
"Spacing between tab edge and indicator."),
|
||||
|
||||
('tabs-are-windows',
|
||||
SettingValue(typ.Bool(), 'false'),
|
||||
"Whether to open windows instead of tabs."),
|
||||
)),
|
||||
|
||||
('storage', sect.KeyValue(
|
||||
|
@ -320,6 +320,12 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
if url is not None:
|
||||
qtutils.ensure_valid(url)
|
||||
log.webview.debug("Creating new tab with URL {}".format(url))
|
||||
if config.get('tabs', 'tabs-are-windows') and self.count() > 0:
|
||||
from qutebrowser.widgets import mainwindow
|
||||
window = mainwindow.MainWindow.spawn()
|
||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||
window=window)
|
||||
return tabbed_browser.tabopen(url, background, explicit)
|
||||
tab = webview.WebView(self._win_id, self)
|
||||
self._connect_tab_signals(tab)
|
||||
if explicit:
|
||||
|
Loading…
Reference in New Issue
Block a user