From 7df4dfc6556b658786b3b02cb7ac8d3cd63911a9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 31 Mar 2005 15:03:07 +0000 Subject: [PATCH] when we press ctrl+PageUp/Down / Tab in the conversation textview, send the event to the notebook --- plugins/gtkgui/chat.py | 12 ++++++++++++ plugins/gtkgui/gtkgui.glade | 1 + 2 files changed, 13 insertions(+) diff --git a/plugins/gtkgui/chat.py b/plugins/gtkgui/chat.py index 9421f79d0..38aee7577 100644 --- a/plugins/gtkgui/chat.py +++ b/plugins/gtkgui/chat.py @@ -269,6 +269,18 @@ class Chat: self.show_title() + def on_conversation_textview_key_press_event(self, widget, event): + """Do not black these evnts and send them to the notebook""" + if event.keyval == gtk.keysyms.Tab and \ + (event.state & gtk.gdk.CONTROL_MASK): # CTRL + TAB + self.notebook.emit('key_press_event', event) + elif event.keyval == gtk.keysyms.Page_Down: # PAGE DOWN + if event.state & gtk.gdk.CONTROL_MASK: # CTRL + PAGE DOWN + self.notebook.emit('key_press_event', event) + elif event.keyval == gtk.keysyms.Page_Up: # PAGE UP + if event.state & gtk.gdk.CONTROL_MASK: # CTRL + PAGE UP + self.notebook.emit('key_press_event', event) + def on_chat_notebook_key_press_event(self, widget, event): st = '1234567890' # zero is here cause humans count from 1, pc from 0 :P jid = self.get_active_jid() diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 435727469..1640437b7 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -8770,6 +8770,7 @@ Custom +