don't handle keypressed in message textview is textview is not sensitive (not yet connected). Fixes #5833

This commit is contained in:
Yann Leboulanger 2010-08-09 12:14:59 +02:00
parent 05f90734ee
commit ea07baeab9
1 changed files with 3 additions and 0 deletions

View File

@ -1875,6 +1875,9 @@ class GroupchatControl(ChatControlBase):
# NOTE: handles mykeypress which is custom signal connected to this # NOTE: handles mykeypress which is custom signal connected to this
# CB in new_room(). for this singal see message_textview.py # CB in new_room(). for this singal see message_textview.py
if not widget.get_sensitive():
# Textview is not sensitive, don't handle keypress
return
# construct event instance from binding # construct event instance from binding
event = gtk.gdk.Event(gtk.gdk.KEY_PRESS) # it's always a key-press here event = gtk.gdk.Event(gtk.gdk.KEY_PRESS) # it's always a key-press here
event.keyval = event_keyval event.keyval = event_keyval