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',
|
('indicator-space',
|
||||||
SettingValue(typ.Int(minval=0), '3'),
|
SettingValue(typ.Int(minval=0), '3'),
|
||||||
"Spacing between tab edge and indicator."),
|
"Spacing between tab edge and indicator."),
|
||||||
|
|
||||||
|
('tabs-are-windows',
|
||||||
|
SettingValue(typ.Bool(), 'false'),
|
||||||
|
"Whether to open windows instead of tabs."),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
('storage', sect.KeyValue(
|
('storage', sect.KeyValue(
|
||||||
|
@ -320,6 +320,12 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
if url is not None:
|
if url is not None:
|
||||||
qtutils.ensure_valid(url)
|
qtutils.ensure_valid(url)
|
||||||
log.webview.debug("Creating new tab with URL {}".format(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)
|
tab = webview.WebView(self._win_id, self)
|
||||||
self._connect_tab_signals(tab)
|
self._connect_tab_signals(tab)
|
||||||
if explicit:
|
if explicit:
|
||||||
|
Loading…
Reference in New Issue
Block a user