From 0b0626d98b753a53cb25bbea4b513c7402d3f945 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 24 Apr 2011 09:07:15 +0200 Subject: [PATCH] core: add option weechat.look.hotlist_add_buffer_if_away --- ChangeLog | 4 ++-- doc/de/autogen/user/weechat_options.txt | 5 +++++ doc/en/autogen/user/weechat_options.txt | 5 +++++ doc/fr/autogen/user/weechat_options.txt | 5 +++++ doc/it/autogen/user/weechat_options.txt | 5 +++++ po/cs.po | 7 ++++++- po/de.po | 7 ++++++- po/es.po | 7 ++++++- po/fr.po | 11 +++++++++-- po/hu.po | 7 ++++++- po/it.po | 7 ++++++- po/pl.po | 7 ++++++- po/pt_BR.po | 7 ++++++- po/ru.po | 7 ++++++- po/weechat.pot | 7 ++++++- src/core/wee-config.c | 7 +++++++ src/core/wee-config.h | 1 + src/gui/gui-hotlist.c | 4 +++- 18 files changed, 96 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d577a6a9..6349fac23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.5-rc1, 2011-04-23 +v0.3.5-rc1, 2011-04-24 Version 0.3.5 (under dev!) -------------------------- * core: add buffer to hotlist if away is set on buffer (even if buffer is - displayed) (task #10948) + displayed), new option weechat.look.hotlist_add_buffer_if_away (task #10948) * core: do not update hotlist during upgrade * core: add option "balance" for command /window (key: alt+"w" + alt+"b") * core: add option "swap" for command /window (key: alt+"w" + alt+"s") diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index 09077ec7b..efe4f3171 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -378,6 +378,11 @@ ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"-"`) +* *weechat.look.hotlist_add_buffer_if_away* +** Beschreibung: `add any buffer to hotlist (including current or visible buffers) if local variable "away" is set on buffer` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * *weechat.look.hotlist_buffer_separator* ** Beschreibung: `Zeichen welches zum Trennen zwischen den verschiedenen Buffern in der Hotlist genutzt werden soll.` ** Typ: Zeichenkette diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index f2ac00653..80a7344e1 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -378,6 +378,11 @@ ** type: string ** values: any string (default value: `"-"`) +* *weechat.look.hotlist_add_buffer_if_away* +** description: `add any buffer to hotlist (including current or visible buffers) if local variable "away" is set on buffer` +** type: boolean +** values: on, off (default value: `on`) + * *weechat.look.hotlist_buffer_separator* ** description: `string displayed between buffers in hotlist` ** type: string diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 7ec2f94a6..0ceb96695 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -378,6 +378,11 @@ ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"-"`) +* *weechat.look.hotlist_add_buffer_if_away* +** description: `ajouter tout tampon dans la hotlist (incluant le tampon courant ou les tampons visibles) si la variable locale "away" est définie sur le tampon` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * *weechat.look.hotlist_buffer_separator* ** description: `chaîne affichée entre les tampons dans la hotlist` ** type: chaîne diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 7a2096949..687e550b4 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -378,6 +378,11 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"-"`) +* *weechat.look.hotlist_add_buffer_if_away* +** descrizione: `add any buffer to hotlist (including current or visible buffers) if local variable "away" is set on buffer` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * *weechat.look.hotlist_buffer_separator* ** descrizione: `string displayed between buffers in hotlist` ** tipo: stringa diff --git a/po/cs.po b/po/cs.po index 702096dd6..bfff029d4 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -2027,6 +2027,11 @@ msgstr "" "hodnota vykreslí skutečnou čáru při použití ncurses, ale může způsobit " "problém s výběrem URL v některých terminálech" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "seznam bufferů v hotlistu" diff --git a/po/de.po b/po/de.po index 3201600e0..cdc7276f3 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-15 21:04+0100\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev \n" @@ -2194,6 +2194,11 @@ msgstr "" "Linie. Dies kann allerdings bei einigen Terminals zu Fehlern führen, falls " "die URL Auswahl genutzt wird. Wide Chars sind für diese Option NICHT erlaubt." +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + msgid "string displayed between buffers in hotlist" msgstr "" "Zeichen welches zum Trennen zwischen den verschiedenen Buffern in der " diff --git a/po/es.po b/po/es.po index 89b5967d1..ec3f6f3a4 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 17:31+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2078,6 +2078,11 @@ msgstr "" "dibujará una línea verdadera con ncurses, pero puede causar errores con la " "selección de URLs en algunas terminales" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "lista de buffers en la lista de actividad" diff --git a/po/fr.po b/po/fr.po index 885615381..e1b716276 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" -"PO-Revision-Date: 2011-04-23 13:10+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" +"PO-Revision-Date: 2011-04-24 08:58+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -2144,6 +2144,13 @@ msgstr "" "problèmes d'affichage avec la sélection d'URL sous certains terminaux), les " "caractères larges ne sont PAS autorisés ici" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" +"ajouter tout tampon dans la hotlist (incluant le tampon courant ou les " +"tampons visibles) si la variable locale \"away\" est définie sur le tampon" + msgid "string displayed between buffers in hotlist" msgstr "chaîne affichée entre les tampons dans la hotlist" diff --git a/po/hu.po b/po/hu.po index 7b08f270d..ed481aff7 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 11:21+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1809,6 +1809,11 @@ msgid "" "terminals), wide chars are NOT allowed here" msgstr "" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "kiemelendő szavak listája" diff --git a/po/it.po b/po/it.po index 94bffd46b..8d4cd9ee7 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -2131,6 +2131,11 @@ msgstr "" "con la selezione dell'URL in alcuni terminali), i caratteri wide NON sono " "consentiti" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "elenco dei buffer nella hotlist" diff --git a/po/pl.po b/po/pl.po index 0f6950071..d13ad82c8 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: weechat-dev \n" @@ -2084,6 +2084,11 @@ msgstr "" "linii w ncurses, jednak może powodowac błędy w zaznaczaniu URLi w niektórych " "terminalach" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "lista buforów w hotliście" diff --git a/po/pt_BR.po b/po/pt_BR.po index bd33cb2c5..538b5987e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 11:22+0200\n" "Last-Translator: Ivan Sichmann Freitas \n" "Language-Team: weechat-dev \n" @@ -2075,6 +2075,11 @@ msgstr "" "vai desenha ruma linha real com ncurses, mas pode causar bugs com seleção de " "URL em alguns terminais" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + msgid "string displayed between buffers in hotlist" msgstr "" diff --git a/po/ru.po b/po/ru.po index 2bad0f21e..996f7e23a 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1818,6 +1818,11 @@ msgid "" "terminals), wide chars are NOT allowed here" msgstr "" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + #, fuzzy msgid "string displayed between buffers in hotlist" msgstr "максимальная длина имён в хотлисте" diff --git a/po/weechat.pot b/po/weechat.pot index 342ae5caa..60543a3b3 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"POT-Creation-Date: 2011-04-24 08:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1564,6 +1564,11 @@ msgid "" "terminals), wide chars are NOT allowed here" msgstr "" +msgid "" +"add any buffer to hotlist (including current or visible buffers) if local " +"variable \"away\" is set on buffer" +msgstr "" + msgid "string displayed between buffers in hotlist" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index e0fd3775e..40465deab 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -89,6 +89,7 @@ struct t_config_option *config_look_highlight; struct t_config_option *config_look_highlight_regex; struct t_config_option *config_look_highlight_tags; struct t_config_option *config_look_hline_char; +struct t_config_option *config_look_hotlist_add_buffer_if_away; struct t_config_option *config_look_hotlist_buffer_separator; struct t_config_option *config_look_hotlist_count_max; struct t_config_option *config_look_hotlist_count_min_msg; @@ -1625,6 +1626,12 @@ config_weechat_init_options () "will draw a real line with ncurses, but may cause bugs with URL " "selection under some terminals), wide chars are NOT allowed here"), NULL, 0, 0, "-", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); + config_look_hotlist_add_buffer_if_away = config_file_new_option ( + weechat_config_file, ptr_section, + "hotlist_add_buffer_if_away", "boolean", + N_("add any buffer to hotlist (including current or visible buffers) " + "if local variable \"away\" is set on buffer"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_hotlist_buffer_separator = config_file_new_option ( weechat_config_file, ptr_section, "hotlist_buffer_separator", "string", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index e1191b946..73f6da86b 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -115,6 +115,7 @@ extern struct t_config_option *config_look_day_change_time_format; extern struct t_config_option *config_look_highlight; extern struct t_config_option *config_look_highlight_regex; extern struct t_config_option *config_look_hline_char; +extern struct t_config_option *config_look_hotlist_add_buffer_if_away; extern struct t_config_option *config_look_hotlist_buffer_separator; extern struct t_config_option *config_look_hotlist_count_max; extern struct t_config_option *config_look_hotlist_count_min_msg; diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index d15d84df0..9e88e085e 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -298,7 +298,9 @@ gui_hotlist_add (struct t_gui_buffer *buffer, /* do not add buffer if it is displayed and away is not set */ away = hashtable_get (buffer->local_variables, "away"); - if ((buffer->num_displayed > 0) && (!away || !away[0])) + if ((buffer->num_displayed > 0) + && ((!away || !away[0]) + || !CONFIG_BOOLEAN(config_look_hotlist_add_buffer_if_away))) return NULL; if (priority > GUI_HOTLIST_MAX)