diff options
author | Manuel Quiñones <manuq@laptop.org> | 2011-12-05 21:31:28 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2011-12-05 21:31:28 (GMT) |
commit | c6cb9713466d7fc9fb81cd2c6102bd97e89089b5 (patch) | |
tree | 6cd25e115e8ca1c557b6203d62faf90559d9b73b /widgets.py | |
parent | 0c65b0902927b73e9f116ccd7aedf79a6ffec2f1 (diff) |
Fix bugs adding conditionals for BrowserNotebook with no pages
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Diffstat (limited to 'widgets.py')
-rw-r--r-- | widgets.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -69,11 +69,11 @@ class BrowserNotebook(Gtk.Notebook): empty_page.show() def on_add_tab(self, obj): - raise NotImplementedError, "implement this in the subclass" + raise NotImplementedError("implement this in the subclass") def __on_switch_page(self, notebook, page, page_num): """Don't switch to the extra tab at the end.""" - if page_num == Gtk.Notebook.get_n_pages(self) - 1: + if page_num > 0 and page_num == Gtk.Notebook.get_n_pages(self) - 1: self.handler_block(self._switch_handler) self.set_current_page(-1) self.handler_unblock(self._switch_handler) |