Add patch from Thomas Meire to prevent closing terminals from removing focus from any terminal. Closes LP #179054

This commit is contained in:
Chris Jones 2007-12-29 10:18:53 +00:00
parent 1e2891a129
commit 6d5cac4b09
1 changed files with 9 additions and 4 deletions

View File

@ -535,6 +535,7 @@ class Terminator:
return return
if isinstance (parent, gtk.Paned): if isinstance (parent, gtk.Paned):
index = self.term_list.index (widget)
grandparent = parent.get_parent () grandparent = parent.get_parent ()
# Discover sibling while all objects exist # Discover sibling while all objects exist
@ -554,10 +555,14 @@ class Terminator:
widget.get_box ().destroy () widget.get_box ().destroy ()
parent.destroy () parent.destroy ()
if not isinstance (sibling, gtk.Paned):
for term in self.term_list: for term in self.term_list:
if term.get_box () == sibling: if term.get_box () == sibling:
term._vte.grab_focus () term._vte.grab_focus ()
break break
else:
if index == 0: index = 1
self.term_list[index - 1]._vte.grab_focus ()
return return