Add missing infos in API functions buffer_get_integer / buffer_get_string and in buffer infolist

v2.8-utf8proc
Sebastien Helleu 2010-01-25 16:57:24 +01:00
parent 2e48becbfc
commit f4d5ddd858
4 changed files with 99 additions and 13 deletions

View File

@ -1,9 +1,15 @@
WeeChat ChangeLog
=================
FlashCode <flashcode@flashtux.org>
v0.3.1, 2010-01-23
v0.3.2-dev, 2010-01-25
Version 0.3.2 (under dev!)
--------------------------
* api: add missing infos in functions buffer_get_integer / buffer_get_string
and in buffer infolist
* irc: add options irc.look.smart_filter_join and irc.look.smart_filter_quit
Version 0.3.1 (2010-01-23)
--------------------------

View File

@ -6585,20 +6585,36 @@ Arguments:
* 'buffer': buffer pointer
* 'property': property name:
** 'number': number of buffer (starts with 1)
** 'num_displayed': number of windows displaying buffer
** 'layout_number': number of buffer saved in layout
** 'type': buffer type (0: formatted, 1: free content)
** 'notify': notify level for buffer
** 'num_displayed': number of windows displaying buffer
** 'active': 1 if buffer is active, 0 if buffer is merged and not selected
** 'print_hooks_enabled': 1 if print hooks are enabled, otherwise 0
** 'lines_hidden': 1 if at least one line is hidden on buffer (filtered), or 0
if all lines are displayed
** 'prefix_max_length': max length for prefix in this buffer
** 'time_for_each_line': 1 if time is displayed for each line in buffer
(default), otherwise 0
** 'nicklist': 1 if nicklist is enabled, otherwise 0
** 'nicklist_case_sensitive': 1 if nicks are case sensitive, otherwise 0
** 'nicklist_max_length': max length for a nick
** 'nicklist_display_groups': 1 if groups are displayed, otherwise 0
** 'nicklist_visible_count': number of nicks/groups displayed
** 'input': 1 if input is enabled, otherwise 0
** 'input_get_unknown_commands': 1 if unknown commands are sent to input
callback, otherwise 0
** 'input_size': input size (in bytes)
** 'input_length': input length (number of chars)
** 'input_pos': cursor position in buffer input
** 'input_1st_display': first char displayed on screen
** 'num_history': number of commands in history
** 'text_search': text search type:
*** 0: no search at this moment
*** 1: backward search (direction: oldest messages)
*** 2: forward search (direction: newest messages)
** 'text_search_exact': 1 if text search is case sensitive
** 'text_search_found': 1 if text found, otherwise 0
** 'input_pos': cursor position in buffer input
Return value:
@ -6644,8 +6660,11 @@ Arguments:
buffer)
** 'name': name of buffer
** 'short_name': short name of buffer
** 'tilte': title of buffer
** 'title': title of buffer
** 'input': input text
** 'text_search_input': input saved before text search
** 'highlight_words': list of words to highlight
** 'highlight_tags': list of tags to highlight
** 'localvar_xxx': get content of local variable "xxx" (replace "xxx" by the
name of variable to read)

View File

@ -6677,20 +6677,38 @@ Paramètres :
* 'buffer' : pointeur vers le tampon
* 'property' : nom de la propriété :
** 'number' : numéro du tampon (commence à 1)
** 'num_displayed' : nombre de fenêtres affichant ce tampon
** 'layout_number': numéro du tampon sauvegardé dans le "layout"
** 'type': type de tampon (0: formaté, 1: contenu libre)
** 'notify' : niveau de notification du tampon
** 'num_displayed' : nombre de fenêtres affichant ce tampon
** 'active': 1 si le tampon est actif, 0 si le tampon est mélangé et n'est pas
sélectionné
** 'print_hooks_enabled': 1 si les hooks "print" sont activés, sinon 0
** 'lines_hidden' : 1 si au moins une ligne est cachée dans le tampon
(filtrée), ou 0 si toutes les lignes sont affichées
** 'prefix_max_length' : longueur maximale du préfixe dans ce tampon
** 'time_for_each_line' : 1 si l'heure est affichée pour chaque ligne du tampon
(par défaut), sinon 0
** 'nicklist': 1 si la liste de pseudos est activée, sinon 0
** 'nicklist_case_sensitive': 1 si les pseudos sont sensibles à la casse,
sinon 0
** 'nicklist_max_length': longueur maxi d'un pseudo
** 'nicklist_display_groups': 1 si les groupes sont affichés, sinon 0
** 'nicklist_visible_count': nombre de pseudos/groupes affichés
** 'input': 1 si la zone de saisie est activée, sinon 0
** 'input_get_unknown_commands': 1 si les commandes inconnues sont envoyées
au "callback input", sinon 0
** 'input_size': taille de la zone de saisie (en octets)
** 'input_length': longueur de la zone de saisie (nombre de caractères)
** 'input_pos': position du curseur dans la zone de saisie
** 'input_1st_display': premier caractère affiché à l'écran
** 'num_history': nombre de commandes dans l'historique
** 'text_search' : type de recherche de texte :
*** 0 : pas de recherche en cours
*** 1 : recherche arrière (vers les messages les plus anciens)
*** 2 : recherche avant (vers les messages les plus récents)
** 'text_search_exact' : 1 si la recherche de texte est sensible à la casse
** 'text_search_found' : 1 si du texte a été trouvé, sinon 0
** 'input_pos': position du curseur dans la zone de saisie
Valeur de retour :
@ -6736,8 +6754,11 @@ Paramètres :
principal WeeChat)
** 'name' : nom du tampon
** 'short_name' : nom court du tampon
** 'tilte' : titre du tampon
** 'title' : titre du tampon
** 'input' : texte saisi
** 'text_search_input': texte saisi sauvegardé avant la recherche de texte
** 'highlight_words': liste des mots pour le highlight
** 'highlight_tags': liste des étiquettes pour le highlight
** 'localvar_xxx' : contenu de la variable locale "xxx" (remplacer "xxx" par le
nom de la variable locale à lire)

View File

@ -646,26 +646,54 @@ gui_buffer_get_integer (struct t_gui_buffer *buffer, const char *property)
{
if (string_strcasecmp (property, "number") == 0)
return buffer->number;
else if (string_strcasecmp (property, "num_displayed") == 0)
return buffer->num_displayed;
else if (string_strcasecmp (property, "print_hooks_enabled") == 0)
return buffer->print_hooks_enabled;
else if (string_strcasecmp (property, "layout_number") == 0)
return buffer->layout_number;
else if (string_strcasecmp (property, "type") == 0)
return buffer->type;
else if (string_strcasecmp (property, "notify") == 0)
return buffer->notify;
else if (string_strcasecmp (property, "num_displayed") == 0)
return buffer->num_displayed;
else if (string_strcasecmp (property, "active") == 0)
return buffer->active;
else if (string_strcasecmp (property, "print_hooks_enabled") == 0)
return buffer->print_hooks_enabled;
else if (string_strcasecmp (property, "lines_hidden") == 0)
return buffer->lines->lines_hidden;
else if (string_strcasecmp (property, "prefix_max_length") == 0)
return buffer->lines->prefix_max_length;
else if (string_strcasecmp (property, "time_for_each_line") == 0)
return buffer->time_for_each_line;
else if (string_strcasecmp (property, "nicklist") == 0)
return buffer->nicklist;
else if (string_strcasecmp (property, "nicklist_case_sensitive") == 0)
return buffer->nicklist_case_sensitive;
else if (string_strcasecmp (property, "nicklist_max_length") == 0)
return buffer->nicklist_max_length;
else if (string_strcasecmp (property, "nicklist_display_groups") == 0)
return buffer->nicklist_display_groups;
else if (string_strcasecmp (property, "nicklist_visible_count") == 0)
return buffer->nicklist_visible_count;
else if (string_strcasecmp (property, "input") == 0)
return buffer->input;
else if (string_strcasecmp (property, "input_get_unknown_commands") == 0)
return buffer->input_get_unknown_commands;
else if (string_strcasecmp (property, "input_size") == 0)
return buffer->input_buffer_size;
else if (string_strcasecmp (property, "input_length") == 0)
return buffer->input_buffer_length;
else if (string_strcasecmp (property, "input_pos") == 0)
return buffer->input_buffer_pos;
else if (string_strcasecmp (property, "input_1st_display") == 0)
return buffer->input_buffer_1st_display;
else if (string_strcasecmp (property, "num_history") == 0)
return buffer->num_history;
else if (string_strcasecmp (property, "text_search") == 0)
return buffer->text_search;
else if (string_strcasecmp (property, "text_search_exact") == 0)
return buffer->text_search_exact;
else if (string_strcasecmp (property, "text_search_found") == 0)
return buffer->text_search_found;
else if (string_strcasecmp (property, "input_pos") == 0)
return buffer->input_buffer_pos;
}
return 0;
@ -692,6 +720,12 @@ gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property)
return buffer->title;
else if (string_strcasecmp (property, "input") == 0)
return buffer->input_buffer;
else if (string_strcasecmp (property, "text_search_input") == 0)
return buffer->text_search_input;
else if (string_strcasecmp (property, "highlight_words") == 0)
return buffer->highlight_words;
else if (string_strcasecmp (property, "highlight_tags") == 0)
return buffer->highlight_tags;
else if (string_strncasecmp (property, "localvar_", 9) == 0)
{
ptr_local_var = gui_buffer_local_var_search (buffer, property + 9);
@ -2265,6 +2299,10 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!infolist_new_var_integer (ptr_item, "nicklist_display_groups", buffer->nicklist_display_groups))
return 0;
if (!infolist_new_var_integer (ptr_item, "nicklist_max_length", buffer->nicklist_max_length))
return 0;
if (!infolist_new_var_integer (ptr_item, "nicklist_visible_count", buffer->nicklist_visible_count))
return 0;
if (!infolist_new_var_string (ptr_item, "title", buffer->title))
return 0;
if (!infolist_new_var_integer (ptr_item, "input", buffer->input))
@ -2283,6 +2321,8 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!infolist_new_var_integer (ptr_item, "input_buffer_1st_display", buffer->input_buffer_1st_display))
return 0;
if (!infolist_new_var_integer (ptr_item, "num_history", buffer->num_history))
return 0;
if (!infolist_new_var_integer (ptr_item, "text_search", buffer->text_search))
return 0;
if (!infolist_new_var_integer (ptr_item, "text_search_exact", buffer->text_search_exact))