diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-03-20 21:51:13 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-03-20 21:51:13 +0100 |
commit | 667c9364ed1c1e36a555e9a54236a8d1b3df098d (patch) | |
tree | 381becd371b7d5133b003703847375059e94b29b | |
parent | 4238fe0e9ce13c7b11b238e8f470632aa1b96f5f (diff) | |
download | weechat-667c9364ed1c1e36a555e9a54236a8d1b3df098d.zip |
doc: add more info about the reload callback in function config_new (plugin API reference)
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 11 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 15 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 13 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 13 |
4 files changed, 47 insertions, 5 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 642466188..fc440c6c2 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -4988,7 +4988,7 @@ Arguments: * _name_: name of configuration file (without path or extension) * _callback_reload_: function called when configuration file is reloaded with - `/reload` (optional, can be NULL), arguments and return value: + `/reload` (optional, can be NULL, see below), arguments and return value: ** _const void *pointer_: pointer ** _void *data_: pointer ** _struct t_config_file *config_file_: configuration file pointer @@ -5002,6 +5002,15 @@ Arguments: WeeChat; if not NULL, it must have been allocated with malloc (or similar function) and it is automatically freed when the configuration file is freed +Reload callback: + +* The callback must only call the function <<_config_reload,config_reload>>, + it must not remove the configuration file. +* A callback is needed only if it does some things before and/or after the + call to the function <<_config_reload,config_reload>>. + + If no callback is given, WeeChat will call its internal reload function, + so the configuration file will be reloaded in all cases. + Return value: * pointer to new configuration file, NULL if an error occurred diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 097be04b5..64304521a 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -5065,8 +5065,8 @@ Paramètres : * _name_ : nom du nouveau fichier de configuration (sans chemin ou extension) * _callback_reload_ : fonction appelée quand le fichier de configuration est - rechargé avec `/reload` (optionnel, peut être NULL), paramètres et valeur de - retour : + rechargé avec `/reload` (optionnel, peut être NULL, voir ci-dessous), + paramètres et valeur de retour : ** _const void *pointer_ : pointeur ** _void *data_ : pointeur ** _struct t_config_file *config_file_ : pointeur vers le fichier de @@ -5082,6 +5082,17 @@ Paramètres : une fonction similaire) et est automatiquement libéré (par free) lorsque le fichier de configuration est libéré +Fonction de rechargement : + +* La fonction de rappel doit appeler seulement la fonction + <<_config_reload,config_reload>>, elle ne doit pas supprimer le fichier de + configuration. +* Une fonction de rappel est nécessaire seulement si des choses sont faites + avant ou après l'appel à la fonction <<_config_reload,config_reload>>. + + Si aucune fonction de rappel n'est donnée, WeeChat appellera sa fonction + interne de rechargement, donc le fichier de configuration sera rechargé dans + tous les cas. + Valeur de retour : * pointeur vers le nouveau fichier de configuration, NULL en cas d'erreur diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index b7ad2fd87..25688d6a4 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -5168,8 +5168,9 @@ struct t_config_file *weechat_config_new (const char *name, Argomenti: * _name_: nome del file di configurazione (senza percorso o estensione) +// TRANSLATION MISSING * _callback_reload_: funzione chiamata quando il file di configurazione viene - ricaricato con `/reload` (opzionale, può essere NULL), argomenti e valore + ricaricato con `/reload` (opzionale, può essere NULL, see below), argomenti e valore restituito: ** _const void *pointer_: puntatore ** _void *data_: puntatore @@ -5186,6 +5187,16 @@ Argomenti: function) and it is automatically freed when the configuration file is freed +// TRANSLATION MISSING +Reload callback: + +* The callback must only call the function <<_config_reload,config_reload>>, + it must not remove the configuration file. +* A callback is needed only if it does some things before and/or after the + call to the function <<_config_reload,config_reload>>. + + If no callback is given, WeeChat will call its internal reload function, + so the configuration file will be reloaded in all cases. + Valore restituito: * puntatore al nuovo file di configurazione, NULL in caso di errore diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 5f9b98035..14df95875 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -4990,8 +4990,9 @@ struct t_config_file *weechat_config_new (const char *name, 引数: * _name_: 設定ファイルの名前 (パスと拡張子は不要) +// TRANSLATION MISSING * _callback_reload_: `/reload` で設定ファイルをリロードする際に呼び出すコールバック関数 - (任意、NULL でも可)、引数と戻り値: + (任意、NULL でも可, see below)、引数と戻り値: ** _const void *pointer_: ポインタ ** _void *data_: ポインタ ** _struct t_config_file *config_file_: 設定ファイルへのポインタ @@ -5005,6 +5006,16 @@ struct t_config_file *weechat_config_new (const char *name, このポインタが NULL でない場合、このポインタは malloc (または類似の関数) によって割り当てられたものでなければいけません。さらに、このポインタはここで作成した設定ファイルが開放された時点で自動的に開放されます +// TRANSLATION MISSING +Reload callback: + +* The callback must only call the function <<_config_reload,config_reload>>, + it must not remove the configuration file. +* A callback is needed only if it does some things before and/or after the + call to the function <<_config_reload,config_reload>>. + + If no callback is given, WeeChat will call its internal reload function, + so the configuration file will be reloaded in all cases. + 戻り値: * 新しい設定ファイルへのポインタ、エラーが起きた場合は NULL |