Workaround an apparant gtk bug in next/prev_page

This commit is contained in:
Thomas Hurst 2008-09-22 18:31:35 +01:00
parent e78d57beab
commit 76b06bc5f7
1 changed files with 7 additions and 4 deletions

View File

@ -857,12 +857,15 @@ class Terminator:
def previous_tab(self, term): def previous_tab(self, term):
notebook = self.get_first_parent_notebook(term) notebook = self.get_first_parent_notebook(term)
notebook.prev_page() notebook.prev_page()
return # This seems to be required in some versions of (py)gtk.
# Without it, the selection changes, but the displayed page doesn't change
# Seen in gtk-2.12.11 and pygtk-2.12.1 at least.
notebook.set_current_page(notebook.get_current_page())
def next_tab(self, term): def next_tab(self, term):
notebook = self.get_first_parent_notebook(term) notebook = self.get_first_parent_notebook(term)
notebook.next_page() notebook.next_page()
return notebook.set_current_page(notebook.get_current_page())
def move_tab(self, term, direction): def move_tab(self, term, direction):
dbg("moving to direction %s" % direction) dbg("moving to direction %s" % direction)