| 1592 |
1592 |
| 1593 static gboolean |
1593 static gboolean |
| 1594 update_typing_deleting_cb(PidginConversation *gtkconv) |
1594 update_typing_deleting_cb(PidginConversation *gtkconv) |
| 1595 { |
1595 { |
| 1596 PurpleIMConversation *im = PURPLE_IM_CONVERSATION(gtkconv->active_conv); |
1596 PurpleIMConversation *im = PURPLE_IM_CONVERSATION(gtkconv->active_conv); |
| 1597 GtkTextBuffer *buffer= NULL; |
1597 GtkTextBuffer *buffer = NULL; |
| 1598 |
1598 |
| 1599 buffer = talkatu_editor_get_buffer(TALKATU_EDITOR(gtkconv->editor)); |
1599 buffer = talkatu_editor_get_buffer(TALKATU_EDITOR(gtkconv->editor)); |
| 1600 |
1600 |
| 1601 if (!talkatu_buffer_get_is_empty(buffer)) { |
1601 if (!talkatu_buffer_get_is_empty(TALKATU_BUFFER(buffer))) { |
| 1602 /* We deleted all the text, so turn off typing. */ |
1602 /* We deleted all the text, so turn off typing. */ |
| 1603 purple_im_conversation_stop_send_typed_timeout(im); |
1603 purple_im_conversation_stop_send_typed_timeout(im); |
| 1604 |
1604 |
| 1605 purple_serv_send_typing(purple_conversation_get_connection(gtkconv->active_conv), |
1605 purple_serv_send_typing(purple_conversation_get_connection(gtkconv->active_conv), |
| 1606 purple_conversation_get_name(gtkconv->active_conv), |
1606 purple_conversation_get_name(gtkconv->active_conv), |
| 1607 PURPLE_IM_NOT_TYPING); |
1607 PURPLE_IM_NOT_TYPING); |
| 1608 } |
1608 } else { |
| 1609 else { |
|
| 1610 /* We're deleting, but not all of it, so it counts as typing. */ |
1609 /* We're deleting, but not all of it, so it counts as typing. */ |
| 1611 got_typing_keypress(gtkconv, FALSE); |
1610 got_typing_keypress(gtkconv, FALSE); |
| 1612 } |
1611 } |
| 1613 |
1612 |
| 1614 return FALSE; |
1613 return FALSE; |