Simplify window/private distinction in commands.py
This commit is contained in:
parent
cde36f34b0
commit
eda95d7926
@ -127,7 +127,7 @@ class CommandDispatcher:
|
|||||||
if private is None:
|
if private is None:
|
||||||
private = self._tabbed_browser.private
|
private = self._tabbed_browser.private
|
||||||
|
|
||||||
if window:
|
if window or private:
|
||||||
tabbed_browser = self._new_tabbed_browser(private)
|
tabbed_browser = self._new_tabbed_browser(private)
|
||||||
tabbed_browser.tabopen(url)
|
tabbed_browser.tabopen(url)
|
||||||
elif tab:
|
elif tab:
|
||||||
@ -255,16 +255,14 @@ class CommandDispatcher:
|
|||||||
else:
|
else:
|
||||||
urls = self._parse_url_input(url)
|
urls = self._parse_url_input(url)
|
||||||
|
|
||||||
if private:
|
|
||||||
window = True
|
|
||||||
|
|
||||||
for i, cur_url in enumerate(urls):
|
for i, cur_url in enumerate(urls):
|
||||||
if secure:
|
if secure:
|
||||||
cur_url.setScheme('https')
|
cur_url.setScheme('https')
|
||||||
if not window and i > 0:
|
if not window and i > 0:
|
||||||
tab = False
|
tab = False
|
||||||
bg = True
|
bg = True
|
||||||
if tab or bg or window:
|
|
||||||
|
if tab or bg or window or private:
|
||||||
self._open(cur_url, tab, bg, window, explicit=not implicit,
|
self._open(cur_url, tab, bg, window, explicit=not implicit,
|
||||||
private=private)
|
private=private)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user