Skip to content
Snippets Groups Projects
Commit dd2ca4dc authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

ctrl + V now print the text in message_textview even if the focus is on conversation_textview

parent 5e743e11
No related branches found
No related tags found
No related merge requests found
......@@ -282,13 +282,17 @@ def on_conversation_textview_key_press_event(self, widget, event):
elif event.keyval == gtk.keysyms.Page_Up: # CTRL + PAGE UP
self.notebook.emit('key_press_event', event)
elif event.keyval == gtk.keysyms.v: # CTRL + V
self.notebook.emit('key_press_event', event)
jid = self.get_active_jid()
message_textview = self.xmls[jid].get_widget('message_textview')
if not message_textview.is_focus():
message_textview.grab_focus()
message_textview.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()
if self.widget_name == 'tabbed_chat_window':
if event.keyval == gtk.keysyms.Escape: # ESCAPE
if event.keyval == gtk.keysyms.Escape: # ESCAPE
if self.widget_name == 'tabbed_chat_window':
print 'adding escape' #FIXME: doesn't get printed for GC as it should but Escape quits it still
self.remove_tab(jid)
elif event.keyval == gtk.keysyms.F4 and \
......@@ -346,9 +350,7 @@ def on_chat_notebook_key_press_event(self, widget, event):
gtk.keysyms.Control_L) or (event.keyval == gtk.keysyms.Control_R):
# we pressed a control key or ctrl+sth: we don't block the event
# in order to let ctrl+c (copy text) and others do their default work
print 'ctrl+sth' # FIXME: gets printed, but Ctrl+V doesn't paste
#possible because Ctrl+V doesn't do anything to *NOTEBOOK*
#so we should pass it somehow to the TEXTVIEW
pass
else: # it's a normal key press make sure message_textview has focus
message_textview = self.xmls[jid].get_widget('message_textview')
if not message_textview.is_focus():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment