core: rename options weechat.look.day_change_message(2) to weechat.look.day_change_message_{1date|2dates}

This commit is contained in:
Sebastien Helleu 2013-09-03 10:27:14 +02:00
parent 14c958a0e6
commit 9c36b7c693
10 changed files with 29 additions and 30 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog WeeChat ChangeLog
================= =================
Sébastien Helleu <flashcode@flashtux.org> Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-rc1, 2013-09-02 v0.4.2-rc1, 2013-09-03
This document lists all changes for each version. This document lists all changes for each version.
@ -17,9 +17,9 @@ Version 0.4.2 (under dev!)
* core: fix computation of columns in output of /help (take care about size of * core: fix computation of columns in output of /help (take care about size of
time/buffer/prefix) time/buffer/prefix)
* core: display day change message dynamically (do not store it as a line in * core: display day change message dynamically (do not store it as a line in
buffer), rename option weechat.look.day_change_time_format to buffer), split option weechat.look.day_change_time_format into two options
weechat.look.day_change_message, new options weechat.look.day_change_message2 weechat.look.day_change_message_{1date|2dates}, new option
and weechat.color.chat_day_change (task #12775) weechat.color.chat_day_change (task #12775)
* core: add syntax "@buffer:item" in bar items to force the buffer used when * core: add syntax "@buffer:item" in bar items to force the buffer used when
displaying the bar item (task #12717) displaying the bar item (task #12717)
* core: add search of regular expression in buffer, don't reset search type on * core: add search of regular expression in buffer, don't reset search type on

11
NEWS
View File

@ -1,7 +1,7 @@
WeeChat Release Notes WeeChat Release Notes
===================== =====================
Sébastien Helleu <flashcode@flashtux.org> Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-rc1, 2013-09-02 v0.4.2-rc1, 2013-09-03
This document lists important changes for each version, that require manual This document lists important changes for each version, that require manual
@ -21,12 +21,11 @@ Version 0.4.2 (under dev!)
The day change message is now dynamically displayed, and therefore is not stored The day change message is now dynamically displayed, and therefore is not stored
as a line in buffer any more. as a line in buffer any more.
Option 'weechat.look.day_change_time_format' has been renamed to Option 'weechat.look.day_change_time_format' has been split into two options
'weechat.look.day_change_message' (color codes are allowed in this option, see 'weechat.look.day_change_message_{1date|2dates}' (color codes are allowed in
`/help eval`). these options, see `/help eval`).
New options 'weechat.look.day_change_message2' and New color option 'weechat.color.chat_day_change' has been added.
'weechat.color.chat_day_change' have been added.
After `/upgrade` from an old version, you will see two messages for each day After `/upgrade` from an old version, you will see two messages for each day
change. This is a normal behavior and will not happen again with the next day change. This is a normal behavior and will not happen again with the next day

View File

@ -483,12 +483,12 @@
** Typ: boolesch ** Typ: boolesch
** Werte: on, off (Standardwert: `on`) ** Werte: on, off (Standardwert: `on`)
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message* * [[option_weechat.look.day_change_message_1date]] *weechat.look.day_change_message_1date*
** Beschreibung: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** Beschreibung: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"-- %a, %d %b %Y --"`) ** Werte: beliebige Zeichenkette (Standardwert: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.day_change_message2]] *weechat.look.day_change_message2* * [[option_weechat.look.day_change_message_2dates]] *weechat.look.day_change_message_2dates*
** Beschreibung: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** Beschreibung: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`) ** Werte: beliebige Zeichenkette (Standardwert: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`)

View File

@ -483,12 +483,12 @@
** type: boolean ** type: boolean
** values: on, off (default value: `on`) ** values: on, off (default value: `on`)
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message* * [[option_weechat.look.day_change_message_1date]] *weechat.look.day_change_message_1date*
** description: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** description: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** type: string ** type: string
** values: any string (default value: `"-- %a, %d %b %Y --"`) ** values: any string (default value: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.day_change_message2]] *weechat.look.day_change_message2* * [[option_weechat.look.day_change_message_2dates]] *weechat.look.day_change_message_2dates*
** description: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** description: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** type: string ** type: string
** values: any string (default value: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`) ** values: any string (default value: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`)

View File

@ -483,12 +483,12 @@
** type: booléen ** type: booléen
** valeurs: on, off (valeur par défaut: `on`) ** valeurs: on, off (valeur par défaut: `on`)
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message* * [[option_weechat.look.day_change_message_1date]] *weechat.look.day_change_message_1date*
** description: `message affiché lorsque le jour a changé, avec une date affichée (par exemple au début d'un tampon) (voir man strftime pour le format de date/heure) (note: le contenu est évalué, donc vous pouvez utiliser des couleurs avec le format "${color:xxx}", voir /help eval)` ** description: `message affiché lorsque le jour a changé, avec une date affichée (par exemple au début d'un tampon) (voir man strftime pour le format de date/heure) (note: le contenu est évalué, donc vous pouvez utiliser des couleurs avec le format "${color:xxx}", voir /help eval)`
** type: chaîne ** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"-- %a, %d %b %Y --"`) ** valeurs: toute chaîne (valeur par défaut: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.day_change_message2]] *weechat.look.day_change_message2* * [[option_weechat.look.day_change_message_2dates]] *weechat.look.day_change_message_2dates*
** description: `message affiché lorsque le jour a changé, avec deux dates affichées (entre deux messages); les formats pour la seconde date doivent démarrer par deux "%" car strftime est appelé deux fois sur cette chaîne (voir man strftime pour le format de date/heure) (note: le contenu est évalué, donc vous pouvez utiliser des couleurs avec le format "${color:xxx}", voir /help eval)` ** description: `message affiché lorsque le jour a changé, avec deux dates affichées (entre deux messages); les formats pour la seconde date doivent démarrer par deux "%" car strftime est appelé deux fois sur cette chaîne (voir man strftime pour le format de date/heure) (note: le contenu est évalué, donc vous pouvez utiliser des couleurs avec le format "${color:xxx}", voir /help eval)`
** type: chaîne ** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`) ** valeurs: toute chaîne (valeur par défaut: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`)

View File

@ -483,12 +483,12 @@
** tipo: bool ** tipo: bool
** valori: on, off (valore predefinito: `on`) ** valori: on, off (valore predefinito: `on`)
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message* * [[option_weechat.look.day_change_message_1date]] *weechat.look.day_change_message_1date*
** descrizione: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** descrizione: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"-- %a, %d %b %Y --"`) ** valori: qualsiasi stringa (valore predefinito: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.day_change_message2]] *weechat.look.day_change_message2* * [[option_weechat.look.day_change_message_2dates]] *weechat.look.day_change_message_2dates*
** descrizione: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** descrizione: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`) ** valori: qualsiasi stringa (valore predefinito: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`)

View File

@ -483,12 +483,12 @@
** タイプ: ブール ** タイプ: ブール
** 値: on, off (デフォルト値: `on`) ** 値: on, off (デフォルト値: `on`)
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message* * [[option_weechat.look.day_change_message_1date]] *weechat.look.day_change_message_1date*
** 説明: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** 説明: `message displayed when the day has changed, with one date displayed (for example at beginning of buffer) (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"-- %a, %d %b %Y --"`) ** 値: 未制約文字列 (デフォルト値: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.day_change_message2]] *weechat.look.day_change_message2* * [[option_weechat.look.day_change_message_2dates]] *weechat.look.day_change_message_2dates*
** 説明: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)` ** 説明: `message displayed when the day has changed, with two dates displayed (between two messages); the second date specifiers must start with two "%" because strftime is called two times on this string (see man strftime for date/time specifiers) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)`
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`) ** 値: 未制約文字列 (デフォルト値: `"-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"`)

View File

@ -99,8 +99,8 @@ struct t_config_option *config_look_color_real_white;
struct t_config_option *config_look_command_chars; struct t_config_option *config_look_command_chars;
struct t_config_option *config_look_confirm_quit; struct t_config_option *config_look_confirm_quit;
struct t_config_option *config_look_day_change; struct t_config_option *config_look_day_change;
struct t_config_option *config_look_day_change_message; struct t_config_option *config_look_day_change_message_1date;
struct t_config_option *config_look_day_change_message2; struct t_config_option *config_look_day_change_message_2dates;
struct t_config_option *config_look_eat_newline_glitch; struct t_config_option *config_look_eat_newline_glitch;
struct t_config_option *config_look_emphasized_attributes; struct t_config_option *config_look_emphasized_attributes;
struct t_config_option *config_look_highlight; struct t_config_option *config_look_highlight;
@ -2069,18 +2069,18 @@ config_weechat_init_options ()
"day_change", "boolean", "day_change", "boolean",
N_("display special message when day changes"), N_("display special message when day changes"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_day_change_message = config_file_new_option ( config_look_day_change_message_1date = config_file_new_option (
weechat_config_file, ptr_section, weechat_config_file, ptr_section,
"day_change_message", "string", "day_change_message_1date", "string",
/* TRANSLATORS: string "${color:xxx}" must NOT be translated */ /* TRANSLATORS: string "${color:xxx}" must NOT be translated */
N_("message displayed when the day has changed, with one date displayed " N_("message displayed when the day has changed, with one date displayed "
"(for example at beginning of buffer) (see man strftime for " "(for example at beginning of buffer) (see man strftime for "
"date/time specifiers) (note: content is evaluated, so you can use " "date/time specifiers) (note: content is evaluated, so you can use "
"colors with format \"${color:xxx}\", see /help eval)"), "colors with format \"${color:xxx}\", see /help eval)"),
NULL, 0, 0, "-- %a, %d %b %Y --", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); NULL, 0, 0, "-- %a, %d %b %Y --", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_day_change_message2 = config_file_new_option ( config_look_day_change_message_2dates = config_file_new_option (
weechat_config_file, ptr_section, weechat_config_file, ptr_section,
"day_change_message2", "string", "day_change_message_2dates", "string",
/* TRANSLATORS: string "${color:xxx}" must NOT be translated */ /* TRANSLATORS: string "${color:xxx}" must NOT be translated */
N_("message displayed when the day has changed, with two dates displayed " N_("message displayed when the day has changed, with two dates displayed "
"(between two messages); the second date specifiers must start with " "(between two messages); the second date specifiers must start with "

View File

@ -116,8 +116,8 @@ extern struct t_config_option *config_look_color_real_white;
extern struct t_config_option *config_look_command_chars; extern struct t_config_option *config_look_command_chars;
extern struct t_config_option *config_look_confirm_quit; extern struct t_config_option *config_look_confirm_quit;
extern struct t_config_option *config_look_day_change; extern struct t_config_option *config_look_day_change;
extern struct t_config_option *config_look_day_change_message; extern struct t_config_option *config_look_day_change_message_1date;
extern struct t_config_option *config_look_day_change_message2; extern struct t_config_option *config_look_day_change_message_2dates;
extern struct t_config_option *config_look_eat_newline_glitch; extern struct t_config_option *config_look_eat_newline_glitch;
extern struct t_config_option *config_look_emphasized_attributes; extern struct t_config_option *config_look_emphasized_attributes;
extern struct t_config_option *config_look_highlight; extern struct t_config_option *config_look_highlight;

View File

@ -606,13 +606,13 @@ gui_chat_display_day_changed (struct t_gui_window *window,
if (date1) if (date1)
{ {
strftime (temp_message, sizeof (temp_message), strftime (temp_message, sizeof (temp_message),
CONFIG_STRING(config_look_day_change_message2), date1); CONFIG_STRING(config_look_day_change_message_2dates), date1);
strftime (message, sizeof (message), temp_message, date2); strftime (message, sizeof (message), temp_message, date2);
} }
else else
{ {
strftime (message, sizeof (message), strftime (message, sizeof (message),
CONFIG_STRING(config_look_day_change_message), date2); CONFIG_STRING(config_look_day_change_message_1date), date2);
} }
message_with_color = (strstr (message, "${")) ? message_with_color = (strstr (message, "${")) ?