more simple tab switching (still doesn't work ... GTK bug ?)

This commit is contained in:
Yann Leboulanger 2005-06-26 22:41:25 +00:00
parent ea7d45ac2a
commit ef926b1c2b
1 changed files with 2 additions and 6 deletions

View File

@ -421,9 +421,7 @@ class Chat:
self.set_compact_view(not self.get_compact_view())
elif event.keyval == gtk.keysyms.Page_Down:
if event.state & gtk.gdk.CONTROL_MASK: # CTRL + PAGE DOWN
current = self.notebook.get_current_page()
if current > 0:
self.notebook.set_current_page(current-1)
self.notebook.prev_page()
elif event.state & gtk.gdk.SHIFT_MASK: # SHIFT + PAGE DOWN
conversation_textview = self.xmls[jid].\
get_widget('conversation_textview')
@ -433,9 +431,7 @@ class Chat:
conversation_textview.scroll_to_iter(iter, 0.1, True, 0, 0)
elif event.keyval == gtk.keysyms.Page_Up:
if event.state & gtk.gdk.CONTROL_MASK: # CTRL + PAGE UP
current = self.notebook.get_current_page()
if current < (self.notebook.get_n_pages()-1):
self.notebook.set_current_page(current + 1)
self.notebook.next_page()
elif event.state & gtk.gdk.SHIFT_MASK: # SHIFT + PAGE UP
conversation_textview = self.xmls[jid].\
get_widget('conversation_textview')