Fix profile re-use when opening new window
This commit is contained in:
parent
4ead7ba3bb
commit
2e82e24fee
|
@ -1812,7 +1812,7 @@ class Terminal(gtk.VBox):
|
|||
self.emit('ungroup-tab')
|
||||
|
||||
def key_new_window(self):
|
||||
self.terminator.new_window(self.terminator.pid_cwd(self.pid))
|
||||
self.terminator.new_window(self.terminator.pid_cwd(self.pid), self.get_profile())
|
||||
|
||||
def key_new_tab(self):
|
||||
self.get_toplevel().tab_new(self)
|
||||
|
|
|
@ -187,13 +187,15 @@ class Terminator(Borg):
|
|||
return terminal
|
||||
return None
|
||||
|
||||
def new_window(self, cwd=None):
|
||||
def new_window(self, cwd=None, profile=None):
|
||||
"""Create a window with a Terminal in it"""
|
||||
maker = Factory()
|
||||
window = maker.make('Window')
|
||||
terminal = maker.make('Terminal')
|
||||
if cwd:
|
||||
terminal.set_cwd(cwd)
|
||||
if profile and self.config['always_split_with_profile']:
|
||||
terminal.force_set_profile(None, profile)
|
||||
window.add(terminal)
|
||||
window.show(True)
|
||||
terminal.spawn_child()
|
||||
|
|
Loading…
Reference in New Issue