src/conversation.c

changeset 3549
f350c0a6dc7e
parent 3547
b32e6e60ca04
child 3554
2e890297b051
equal deleted inserted replaced
3548:8a9dddb74841 3549:f350c0a6dc7e
1064 gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); 1064 gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event");
1065 } 1065 }
1066 1066
1067 if (c && (!(misc_options & OPT_MISC_STEALTH_TYPING)) && !c->is_chat) { 1067 if (c && (!(misc_options & OPT_MISC_STEALTH_TYPING)) && !c->is_chat) {
1068 char *txt = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1); 1068 char *txt = gtk_editable_get_chars(GTK_EDITABLE(c->entry), 0, -1);
1069 if ((strlen(txt) == 0 && gdk_keyval_to_unicode(event->keyval) && isprint(event->keyval)) || 1069 if (gdk_keyval_to_unicode(event->keyval) &&
1070 (c->type_again != 0 && time(NULL) > c->type_again)) { 1070 (strlen(txt) == 0 || (c->type_again != 0 && time(NULL) > c->type_again))) {
1071 int timeout = serv_send_typing(c->gc, c->name, TRUE); 1071 int timeout = serv_send_typing(c->gc, c->name, TRUE);
1072 if (timeout) 1072 if (timeout)
1073 c->type_again = time(NULL) + timeout; 1073 c->type_again = time(NULL) + timeout;
1074 else 1074 else
1075 c->type_again = 0; 1075 c->type_again = 0;

mercurial