1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

core: rename options weechat.history.{max_lines|max_minutes} to weechat.history.{max_buffer_lines_number|max_buffer_lines_minutes}

This commit is contained in:
Sebastien Helleu
2011-11-05 12:53:29 +01:00
parent 8e5288ba27
commit f211a839f6
9 changed files with 47 additions and 44 deletions
+3 -2
View File
@@ -7,8 +7,9 @@ v0.3.7-dev, 2011-11-05
Version 0.3.7 (under dev!)
--------------------------
* core: add option weechat.history.max_minutes: maximum number of minutes in
history per buffer (task #10900)
* core: add option weechat.history.max_buffer_lines_minutes: maximum number of
minutes in history per buffer (task #10900), rename option
weechat.history.max_lines to weechat.history.max_buffer_lines_number
* core: fix help on plugin option when config_set_desc_plugin is called to set
help on newly created option
* core: add WEECHAT_HOME option in cmake and configure to setup default
+3 -2
View File
@@ -1,13 +1,14 @@
WeeChat News
============
Sébastien Helleu <flashcode@flashtux.org>
v0.3.7-dev, 2011-10-22
v0.3.7-dev, 2011-11-05
Version 0.3.7 (under dev!)
--------------------------
No release note.
* option 'weechat.history.max_lines' has been renamed to
'weechat.history.max_buffer_lines_number'
Version 0.3.6 (2011-10-22)
--------------------------
+7 -7
View File
@@ -318,20 +318,20 @@
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `5`)
* *weechat.history.max_commands*
** Beschreibung: `maximale Anzahl an Befehlen im Verlauf (0: kein Begrenzung)`
* *weechat.history.max_buffer_lines_minutes*
** Beschreibung: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `100`)
** Werte: 0 .. 2147483647 (Standardwert: `0`)
* *weechat.history.max_lines*
* *weechat.history.max_buffer_lines_number*
** Beschreibung: `maximale Anzahl an Zeilen im Verlaufsspeicher. Dies gilt pro Buffer (0: keine Zeilenbegrenzung)`
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `4096`)
* *weechat.history.max_minutes*
** Beschreibung: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
* *weechat.history.max_commands*
** Beschreibung: `maximale Anzahl an Befehlen im Verlauf (0: kein Begrenzung)`
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `0`)
** Werte: 0 .. 2147483647 (Standardwert: `100`)
* *weechat.history.max_visited_buffers*
** Beschreibung: `maximale Anzahl an besuchten Buffern welche im Speicher gehalten werden sollen`
+7 -7
View File
@@ -318,20 +318,20 @@
** type: integer
** values: 0 .. 2147483647 (default value: `5`)
* *weechat.history.max_commands*
** description: `maximum number of user commands in history (0 = unlimited)`
* *weechat.history.max_buffer_lines_minutes*
** description: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
** type: integer
** values: 0 .. 2147483647 (default value: `100`)
** values: 0 .. 2147483647 (default value: `0`)
* *weechat.history.max_lines*
* *weechat.history.max_buffer_lines_number*
** description: `maximum number of lines in history per buffer (0 = unlimited)`
** type: integer
** values: 0 .. 2147483647 (default value: `4096`)
* *weechat.history.max_minutes*
** description: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
* *weechat.history.max_commands*
** description: `maximum number of user commands in history (0 = unlimited)`
** type: integer
** values: 0 .. 2147483647 (default value: `0`)
** values: 0 .. 2147483647 (default value: `100`)
* *weechat.history.max_visited_buffers*
** description: `maximum number of visited buffers to keep in memory`
+7 -7
View File
@@ -318,20 +318,20 @@
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `5`)
* *weechat.history.max_commands*
** description: `nombre maximum de commandes utilisateur dans l'historique (0 = sans limite)`
* *weechat.history.max_buffer_lines_minutes*
** description: `nombre maximum de minutes dans l'historique par tampon (0 = sans limite, exemples: 1440 = une journée, 10080 = une semaine, 43200 = un mois, 525600 = une année)`
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `100`)
** valeurs: 0 .. 2147483647 (valeur par défaut: `0`)
* *weechat.history.max_lines*
* *weechat.history.max_buffer_lines_number*
** description: `nombre maximum de lignes dans l'historique par tampon (0 = sans limite)`
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `4096`)
* *weechat.history.max_minutes*
** description: `nombre maximum de minutes dans l'historique par tampon (0 = sans limite, exemples: 1440 = une journée, 10080 = une semaine, 43200 = un mois, 525600 = une année)`
* *weechat.history.max_commands*
** description: `nombre maximum de commandes utilisateur dans l'historique (0 = sans limite)`
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `0`)
** valeurs: 0 .. 2147483647 (valeur par défaut: `100`)
* *weechat.history.max_visited_buffers*
** description: `nombre maximum de tampons visités à garder en mémoire`
+7 -7
View File
@@ -318,20 +318,20 @@
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `5`)
* *weechat.history.max_commands*
** descrizione: `numero massimo di comandi utente nella cronologia (0 = nessun limite)`
* *weechat.history.max_buffer_lines_minutes*
** descrizione: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `100`)
** valori: 0 .. 2147483647 (valore predefinito: `0`)
* *weechat.history.max_lines*
* *weechat.history.max_buffer_lines_number*
** descrizione: `numero massimo di righe nella cronologia per buffer (0 = nessun limite)`
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `4096`)
* *weechat.history.max_minutes*
** descrizione: `maximum number of minutes in history per buffer (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
* *weechat.history.max_commands*
** descrizione: `numero massimo di comandi utente nella cronologia (0 = nessun limite)`
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `0`)
** valori: 0 .. 2147483647 (valore predefinito: `100`)
* *weechat.history.max_visited_buffers*
** descrizione: `numero massimo di buffer visitati da memorizzare`
+6 -6
View File
@@ -215,8 +215,8 @@ struct t_config_option *config_completion_partial_completion_count;
/* config, history section */
struct t_config_option *config_history_max_lines;
struct t_config_option *config_history_max_minutes;
struct t_config_option *config_history_max_buffer_lines_number;
struct t_config_option *config_history_max_buffer_lines_minutes;
struct t_config_option *config_history_max_commands;
struct t_config_option *config_history_max_visited_buffers;
struct t_config_option *config_history_display_default;
@@ -2495,15 +2495,15 @@ config_weechat_init_options ()
return 0;
}
config_history_max_lines = config_file_new_option (
config_history_max_buffer_lines_number = config_file_new_option (
weechat_config_file, ptr_section,
"max_lines", "integer",
"max_buffer_lines_number", "integer",
N_("maximum number of lines in history per buffer "
"(0 = unlimited)"),
NULL, 0, INT_MAX, "4096", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_history_max_minutes = config_file_new_option (
config_history_max_buffer_lines_minutes = config_file_new_option (
weechat_config_file, ptr_section,
"max_minutes", "integer",
"max_buffer_lines_minutes", "integer",
N_("maximum number of minutes in history per buffer "
"(0 = unlimited, examples: 1440 = one day, 10080 = one week, "
"43200 = one month, 525600 = one year)"),
+2 -2
View File
@@ -233,8 +233,8 @@ extern struct t_config_option *config_completion_partial_completion_command_arg;
extern struct t_config_option *config_completion_partial_completion_other;
extern struct t_config_option *config_completion_partial_completion_count;
extern struct t_config_option *config_history_max_lines;
extern struct t_config_option *config_history_max_minutes;
extern struct t_config_option *config_history_max_buffer_lines_number;
extern struct t_config_option *config_history_max_buffer_lines_minutes;
extern struct t_config_option *config_history_max_commands;
extern struct t_config_option *config_history_max_visited_buffers;
extern struct t_config_option *config_history_display_default;
+5 -4
View File
@@ -806,11 +806,12 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
lines_removed = 0;
current_time = time (NULL);
while (buffer->own_lines->first_line
&& (((CONFIG_INTEGER(config_history_max_lines) > 0)
&& (buffer->own_lines->lines_count + 1 > CONFIG_INTEGER(config_history_max_lines)))
|| ((CONFIG_INTEGER(config_history_max_minutes) > 0)
&& (((CONFIG_INTEGER(config_history_max_buffer_lines_number) > 0)
&& (buffer->own_lines->lines_count + 1 >
CONFIG_INTEGER(config_history_max_buffer_lines_number)))
|| ((CONFIG_INTEGER(config_history_max_buffer_lines_minutes) > 0)
&& (current_time - buffer->own_lines->first_line->data->date_printed >
CONFIG_INTEGER(config_history_max_minutes) * 60))))
CONFIG_INTEGER(config_history_max_buffer_lines_minutes) * 60))))
{
gui_line_free (buffer, buffer->own_lines->first_line);
lines_removed++;