only try to switch pages in a notebook if we actually have one. Not a fix for, but somewhat workaround for the crashing aspect of LP #271850
This commit is contained in:
parent
99893f0b98
commit
fc9b50850e
|
@ -856,6 +856,7 @@ 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)
|
||||||
|
if notebook:
|
||||||
notebook.prev_page()
|
notebook.prev_page()
|
||||||
# This seems to be required in some versions of (py)gtk.
|
# This seems to be required in some versions of (py)gtk.
|
||||||
# Without it, the selection changes, but the displayed page doesn't change
|
# Without it, the selection changes, but the displayed page doesn't change
|
||||||
|
@ -864,6 +865,7 @@ class Terminator:
|
||||||
|
|
||||||
def next_tab(self, term):
|
def next_tab(self, term):
|
||||||
notebook = self.get_first_parent_notebook(term)
|
notebook = self.get_first_parent_notebook(term)
|
||||||
|
if notebook:
|
||||||
notebook.next_page()
|
notebook.next_page()
|
||||||
notebook.set_current_page(notebook.get_current_page())
|
notebook.set_current_page(notebook.get_current_page())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue