From 67fd877d11cb26c36043952c95095aa8e4c32f1c Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 24 Feb 2008 23:46:56 +0000 Subject: [PATCH] Move child exit behaviour to a properly named config value so it is simplified. Merge in patch from chantra. Closes LP #194771 --- terminator | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/terminator b/terminator index f56ae7bb..e199f1d3 100755 --- a/terminator +++ b/terminator @@ -85,7 +85,7 @@ class TerminatorTerm: 'scroll_on_output' : False, 'scrollback_lines' : 100, 'focus' : 'sloppy', - 'child_restart' : False, + 'exit_action' : 'close', 'palette' : '#000000000000:#CDCD00000000:#0000CDCD0000:#CDCDCDCD0000:#30BF30BFA38E:#A53C212FA53C:#0000CDCDCDCD:#FAFAEBEBD7D7:#404040404040:#FFFF00000000:#0000FFFF0000:#FFFFFFFF0000:#00000000FFFF:#FFFF0000FFFF:#0000FFFFFFFF:#FFFFFFFFFFFF', 'word_chars' : '-A-Za-z0-9,./?%&#:_', 'mouse_autohide' : True, @@ -168,14 +168,12 @@ class TerminatorTerm: # self._vte.connect ("window-title-changed", self.on_vte_title_change) exit_action = self.gconf_client.get_string (self.profile + "/exit_action") - if not exit_action: - if self.defaults['child_restart']: - exit_action = "restart" - else: - exit_action = "close" + exit_action = self.reconf ("exit_action") if exit_action == "restart": self._vte.connect ("child-exited", self.spawn_child) - if exit_action == "close": + # We need to support "left" because some buggy versions of gnome-terminal + # set it in some situations + if exit_action in ("close", "left"): self._vte.connect ("child-exited", lambda close_term: self.terminator.closeterm (self)) self._vte.add_events (gtk.gdk.ENTER_NOTIFY_MASK)