| 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; |