typing: add option typing.look.input_min_chars

This commit is contained in:
Sébastien Helleu 2021-07-04 14:02:15 +02:00
parent 5ae4af1549
commit 64b52da406
24 changed files with 113 additions and 17 deletions

View File

@ -1876,6 +1876,12 @@
** Werte: on, off
** Standardwert: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** Beschreibung: pass:none[min number of chars in message to trigger send of typing signals]
** Typ: integer
** Werte: 1 .. 2147483647
** Standardwert: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** Beschreibung: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** Typ: integer

View File

@ -1876,6 +1876,12 @@
** values: on, off
** default value: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** description: pass:none[min number of chars in message to trigger send of typing signals]
** type: integer
** values: 1 .. 2147483647
** default value: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** description: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** type: integer

View File

@ -1876,6 +1876,12 @@
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** description: pass:none[nombre minimum de caractères dans le message pour déclencher l'envoi des signaux typing]
** type: entier
** valeurs: 1 .. 2147483647
** valeur par défaut: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** description: pass:none[nombre maximum de caractères affichés dans l'objet de barre "typing" (0 = ne pas tronquer le contenu)]
** type: entier

View File

@ -1876,6 +1876,12 @@
** valori: on, off
** valore predefinito: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** descrizione: pass:none[min number of chars in message to trigger send of typing signals]
** tipo: intero
** valori: 1 .. 2147483647
** valore predefinito: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** descrizione: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** tipo: intero

View File

@ -1876,6 +1876,12 @@
** 値: on, off
** デフォルト値: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** 説明: pass:none[min number of chars in message to trigger send of typing signals]
** タイプ: 整数
** 値: 1 .. 2147483647
** デフォルト値: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** 説明: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** タイプ: 整数

View File

@ -1876,6 +1876,12 @@
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** opis: pass:none[min number of chars in message to trigger send of typing signals]
** typ: liczba
** wartości: 1 .. 2147483647
** domyślna wartość: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** opis: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** typ: liczba

View File

@ -1876,6 +1876,12 @@
** вредности: on, off
** подразумевана вредност: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** опис: pass:none[min number of chars in message to trigger send of typing signals]
** тип: целобројна
** вредности: 1 .. 2147483647
** подразумевана вредност: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** опис: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** тип: целобројна

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -12848,6 +12848,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-06-28 08:57+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -15390,6 +15390,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -13103,6 +13103,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"PO-Revision-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-07-04 14:01+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -15105,6 +15105,11 @@ msgstr ""
"activer le statut d'écriture pour ses propres messages (envoyer "
"l'information aux autres utilisateurs)"
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
"nombre minimum de caractères dans le message pour déclencher l'envoi des "
"signaux typing"
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -12268,6 +12268,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -13291,6 +13291,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -14419,6 +14419,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-06-28 21:11+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@ -14751,6 +14751,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -14260,6 +14260,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -12757,6 +12757,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -12306,6 +12306,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-06-03 15:15+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -14722,6 +14722,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2021-05-25 18:28+0200\n"
"Last-Translator: Emir SARI <bitigchi@me.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11639,6 +11639,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-07-04 13:35+0200\n"
"POT-Creation-Date: 2021-07-04 14:01+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -11094,6 +11094,9 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
msgid "min number of chars in message to trigger send of typing signals"
msgstr ""
msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"

View File

@ -41,6 +41,7 @@ struct t_config_option *typing_config_look_delay_purge_typing;
struct t_config_option *typing_config_look_delay_set_paused;
struct t_config_option *typing_config_look_enabled_nicks;
struct t_config_option *typing_config_look_enabled_self;
struct t_config_option *typing_config_look_input_min_chars;
struct t_config_option *typing_config_look_item_max_length;
@ -170,6 +171,12 @@ typing_config_init ()
NULL, NULL, NULL,
&typing_config_change_enabled, NULL, NULL,
NULL, NULL, NULL);
typing_config_look_input_min_chars = weechat_config_new_option (
typing_config_file, ptr_section,
"input_min_chars", "integer",
N_("min number of chars in message to trigger send of typing signals"),
NULL, 1, INT_MAX, "4", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
typing_config_look_item_max_length = weechat_config_new_option (
typing_config_file, ptr_section,
"item_max_length", "integer",

View File

@ -27,6 +27,7 @@ extern struct t_config_option *typing_config_look_delay_purge_typing;
extern struct t_config_option *typing_config_look_delay_set_paused;
extern struct t_config_option *typing_config_look_enabled_nicks;
extern struct t_config_option *typing_config_look_enabled_self;
extern struct t_config_option *typing_config_look_input_min_chars;
extern struct t_config_option *typing_config_look_item_max_length;
extern int typing_config_init ();

View File

@ -102,7 +102,7 @@ typing_input_text_changed_signal_cb (const void *pointer, void *data,
const char *signal,
const char *type_data, void *signal_data)
{
int text_search;
int text_search, input_valid;
const char *ptr_input, *ptr_input_for_buffer;
struct t_gui_buffer *ptr_buffer;
struct t_typing_status *ptr_typing_status;
@ -121,8 +121,10 @@ typing_input_text_changed_signal_cb (const void *pointer, void *data,
return WEECHAT_RC_OK;
ptr_input = weechat_buffer_get_string (ptr_buffer, "input");
input_valid = (ptr_input && ptr_input[0]) ?
weechat_utf8_strlen (ptr_input) >= weechat_config_integer (typing_config_look_input_min_chars) : 0;
if (ptr_input && ptr_input[0])
if (input_valid)
{
/* input is a command? ignore it */
ptr_input_for_buffer = weechat_string_input_for_buffer (ptr_input);