fixing an issue where tab order was broken

step to repro:
- open terminator
- open a new tab
- in new tab, split axis
- go to first tab
- create a new tab
- Ctrl-shift-N around and the order is not respected
This commit is contained in:
Emmanuel Bretelle 2008-05-23 20:39:26 +01:00
parent c37d934665
commit 48e6477a68
2 changed files with 7 additions and 2 deletions

View File

@ -1171,8 +1171,12 @@ class Terminator:
## Now, we set focus on the new term ## Now, we set focus on the new term
notebook.set_current_page(-1) notebook.set_current_page(-1)
terminal._vte.grab_focus () terminal._vte.grab_focus ()
index = self.term_list.index(widget) #adding a new tab, thus we need to get the
# last term of the previous tab and add
# the new term just after
sibling = self._notebook_last_term(notebook.get_nth_page(notebook.page_num(terminal)-1))
index = self.term_list.index(sibling)
self.term_list.insert (index + 1, terminal) self.term_list.insert (index + 1, terminal)
return (True) return (True)

View File

@ -113,6 +113,7 @@ class TerminatorConfValuestore:
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'], 'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
'encoding' : 'UTF-8', 'encoding' : 'UTF-8',
'active_encodings' : ['UTF-8', 'ISO-8859-1'], 'active_encodings' : ['UTF-8', 'ISO-8859-1'],
'background_image' : '',
} }
def __getattr__ (self, keyname): def __getattr__ (self, keyname):