diff --git a/hrafn.py b/hrafn.py index 337b099..77c2a27 100755 --- a/hrafn.py +++ b/hrafn.py @@ -466,12 +466,18 @@ class Hrafn(): # Ctrl + Shift + Tab or Ctrl + PgUp or Ctrl + Left should go to prev tab elif event.state & gtk.gdk.CONTROL_MASK and ((keyname == 'Tab' and event.state & gtk.gdk.SHIFT_MASK) or keyname == 'ISO_Left_Tab' or keyname == 'Page_Up' or keyname == 'Left'): - self.tweet_notebook.prev_page() + if self.tweet_notebook.get_current_page() == 0: + self.tweet_notebook.set_current_page(-1) + else: + self.tweet_notebook.prev_page() return True # Ctrl + Tab or Ctrl + PgDown or Ctrl + Right should go to next tab elif event.state & gtk.gdk.CONTROL_MASK and (keyname == 'Tab' or keyname == 'Page_Down' or keyname == 'Right'): - self.tweet_notebook.next_page() + if self.tweet_notebook.get_current_page() == self.tweet_notebook.get_n_pages() - 1: + self.tweet_notebook.set_current_page(0) + else: + self.tweet_notebook.next_page() return True else: