From add8ced755757343372088798475a7925fe4ca6e Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 22 Mar 2012 11:22:46 +0100 Subject: [PATCH] Gtk: Allow tab cycling via Ctrl+Tab (bug 1580) --- src/gpodder/gtkui/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gpodder/gtkui/main.py b/src/gpodder/gtkui/main.py index 13c312c1..4ee58be1 100644 --- a/src/gpodder/gtkui/main.py +++ b/src/gpodder/gtkui/main.py @@ -3323,7 +3323,7 @@ class gPodder(BuilderWidget, dbus.service.Object): self.delete_episode_list(episodes) def on_key_press(self, widget, event): - # Allow tab switching with Ctrl + PgUp/PgDown + # Allow tab switching with Ctrl + PgUp/PgDown/Tab if event.state & gtk.gdk.CONTROL_MASK: if event.keyval == gtk.keysyms.Page_Up: self.wNotebook.prev_page() @@ -3331,6 +3331,14 @@ class gPodder(BuilderWidget, dbus.service.Object): elif event.keyval == gtk.keysyms.Page_Down: self.wNotebook.next_page() return True + elif event.keyval == gtk.keysyms.Tab: + current_page = self.wNotebook.get_current_page() + + if current_page == self.wNotebook.get_n_pages()-1: + self.wNotebook.set_current_page(0) + else: + self.wNotebook.next_page() + return True return False -- 2.11.4.GIT