only if shift key is there check after one sec
This commit is contained in:
parent
3b0190f5ab
commit
ce03d79120
|
@ -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)
|
||||
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue