From 463ea45d3a94e56e04f9f6c5318cfb96c9f09787 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 11 Apr 2010 15:31:42 +0100 Subject: [PATCH] When removing a Notebook, make sure focus goes to a terminal. Closes LP #558375 --- terminatorlib/notebook.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 80340ea2..a4db1096 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -321,6 +321,9 @@ class Notebook(Container, gtk.Notebook): self.cnxids.remove_all() parent.add(child) del(self) + # Find the last terminal in the new parent and give it focus + terms = parent.get_visible_terminals() + terms.keys()[-1].grab_focus() class TabLabel(gtk.HBox): """Class implementing a label widget for Notebook tabs"""