Add tab-bg{,-silent} to new-instance-open-target.
This commit is contained in:
parent
143228d593
commit
476ccd8fe1
@ -342,7 +342,7 @@ class Application(QApplication):
|
||||
win_id = window.win_id
|
||||
window_to_raise = window
|
||||
win_id = window.win_id
|
||||
if open_target != 'tab-silent':
|
||||
if open_target not in ('tab-silent', 'tab-bg-silent'):
|
||||
window_to_raise = window
|
||||
if window_to_raise is not None:
|
||||
window_to_raise.setWindowState(window.windowState() &
|
||||
@ -389,7 +389,10 @@ class Application(QApplication):
|
||||
message.error(0, "Error in startup argument '{}': "
|
||||
"{}".format(cmd, e))
|
||||
else:
|
||||
tabbed_browser.tabopen(url, background=False)
|
||||
open_target = config.get('general',
|
||||
'new-instance-open-target')
|
||||
background = open_target in ('tab-bg', 'tab-bg-silent')
|
||||
tabbed_browser.tabopen(url, background=background)
|
||||
|
||||
def _open_startpage(self, win_id=None):
|
||||
"""Open startpage.
|
||||
|
@ -1440,9 +1440,14 @@ class NewInstanceOpenTarget(BaseType):
|
||||
|
||||
valid_values = ValidValues(('tab', "Open a new tab in the existing "
|
||||
"window and activate it."),
|
||||
('tab-bg', "Open a new background tab in the "
|
||||
"existing window and activate it."),
|
||||
('tab-silent', "Open a new tab in the existing "
|
||||
"window without activating "
|
||||
"it."),
|
||||
('tab-bg-silent', "Open a new background tab "
|
||||
"in the existing window "
|
||||
"without activating it."),
|
||||
('window', "Open in a new window."))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user