From fc6e3e7e654a616adbbb263aefa7fa1e2e9163c3 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Wed, 2 Dec 2015 20:57:59 +0100 Subject: [PATCH] Fix profile re-use when opening new window --- terminatorlib/terminal.py | 2 +- terminatorlib/terminator.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 85350869..fc3fd0a4 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1815,7 +1815,7 @@ class Terminal(Gtk.VBox): self.emit('ungroup-tab') def key_new_window(self): - self.terminator.new_window(self.get_cwd()) + self.terminator.new_window(self.get_cwd(), self.get_profile()) def key_new_tab(self): self.get_toplevel().tab_new(self) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index ac8f3a48..97f6f3f9 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -201,13 +201,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()