Make ctrl+tab behavior wrap
This commit is contained in:
parent
8d3420c17c
commit
6691c751bc
10
hrafn.py
10
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:
|
||||
|
|
Reference in New Issue
Block a user