ctrl + V now print the text in message_textview even if the focus is on conversation_textview
This commit is contained in:
parent
5e743e1120
commit
dd2ca4dcd4
12
src/chat.py
12
src/chat.py
|
@ -282,13 +282,17 @@ class Chat:
|
|||
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 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 @@ class Chat:
|
|||
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():
|
||||
|
|
Loading…
Reference in New Issue