Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/widgets.py
diff options
context:
space:
mode:
authorManuel 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)
commitc6cb9713466d7fc9fb81cd2c6102bd97e89089b5 (patch)
tree6cd25e115e8ca1c557b6203d62faf90559d9b73b /widgets.py
parent0c65b0902927b73e9f116ccd7aedf79a6ffec2f1 (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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets.py b/widgets.py
index 608dbb6..3cfdf1e 100644
--- a/widgets.py
+++ b/widgets.py
@@ -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)