only if shift key is there check after one sec

This commit is contained in:
Nikos Kouremenos 2005-08-08 10:20:24 +00:00
parent 3b0190f5ab
commit ce03d79120
1 changed files with 13 additions and 7 deletions

View File

@ -487,12 +487,18 @@ class TabbedChatWindow(chat.Chat):
# in an workaround way (we could also get somehow the listed shortcuts
# but I don't know if it's possible)
# get images too (eg. emoticons)
message = message_buffer.get_slice(start_iter, end_iter, True)
message = message.strip() # enter and space does not mean writing
chars_no = len(message)
gobject.timeout_add(1000, self.check_for_possible_composing,
message_buffer, jid, chars_no)
if event.state & gtk.gdk.SHIFT_MASK:
# get images too (eg. emoticons)
message = message_buffer.get_slice(start_iter, end_iter, True)
message = message.strip() # enter and space does not mean writing
chars_no = len(message)
gobject.timeout_add(1000, self.check_for_possible_composing,
message_buffer, jid, chars_no)
else:
self.kbd_activity_in_last_5_secs = True
self.kbd_activity_in_last_30_secs = True
self.send_chatstate('composing', jid)
def check_for_possible_composing(self, message_buffer, jid, chars_no):
start_iter, end_iter = message_buffer.get_bounds()