Preserve cwd into new windows. Closes LP #597651
This commit is contained in:
parent
838d27bb60
commit
581a738c62
|
@ -1482,7 +1482,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
self.emit('ungroup-tab')
|
self.emit('ungroup-tab')
|
||||||
|
|
||||||
def key_new_window(self):
|
def key_new_window(self):
|
||||||
self.terminator.new_window()
|
self.terminator.new_window(self.terminator.pid_cwd(self.pid))
|
||||||
|
|
||||||
def key_new_terminator(self):
|
def key_new_terminator(self):
|
||||||
cmd = sys.argv[0]
|
cmd = sys.argv[0]
|
||||||
|
|
|
@ -139,11 +139,13 @@ class Terminator(Borg):
|
||||||
dbg('Terminator::deregister_terminal: %d terminals remain' %
|
dbg('Terminator::deregister_terminal: %d terminals remain' %
|
||||||
len(self.terminals))
|
len(self.terminals))
|
||||||
|
|
||||||
def new_window(self):
|
def new_window(self, cwd=None):
|
||||||
"""Create a window with a Terminal in it"""
|
"""Create a window with a Terminal in it"""
|
||||||
maker = Factory()
|
maker = Factory()
|
||||||
window = maker.make('Window')
|
window = maker.make('Window')
|
||||||
terminal = maker.make('Terminal')
|
terminal = maker.make('Terminal')
|
||||||
|
if cwd:
|
||||||
|
terminal.set_cwd(cwd)
|
||||||
window.add(terminal)
|
window.add(terminal)
|
||||||
window.show()
|
window.show()
|
||||||
terminal.spawn_child()
|
terminal.spawn_child()
|
||||||
|
|
Loading…
Reference in New Issue