doc: add more info about the reload callback in function config_new (plugin API reference)
parent
4238fe0e9c
commit
667c9364ed
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue