Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/widgets.py
diff options
context:
space:
mode:
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)