From 916c22a3d03b0060d4c0d764eaaefa3df37785c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 24 Apr 2020 22:39:02 +0200 Subject: [PATCH] buflist: add options enable/disable/toggle in command /buflist --- ChangeLog.adoc | 1 + doc/de/autogen/user/buflist_commands.adoc | 68 ++++++++++++----------- doc/en/autogen/user/buflist_commands.adoc | 6 +- doc/fr/autogen/user/buflist_commands.adoc | 6 +- doc/it/autogen/user/buflist_commands.adoc | 6 +- doc/ja/autogen/user/buflist_commands.adoc | 6 +- doc/pl/autogen/user/buflist_commands.adoc | 68 ++++++++++++----------- po/cs.po | 5 +- po/de.po | 6 +- po/es.po | 5 +- po/fr.po | 10 +++- po/hu.po | 5 +- po/it.po | 5 +- po/ja.po | 5 +- po/pl.po | 6 +- po/pt.po | 5 +- po/pt_BR.po | 5 +- po/ru.po | 5 +- po/tr.po | 5 +- po/weechat.pot | 5 +- src/plugins/buflist/buflist-command.c | 28 +++++++++- 21 files changed, 176 insertions(+), 85 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6b2031a2b..5af912c1c 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -22,6 +22,7 @@ New features:: * core: add command line option "--stdout" in weechat-headless binary to log to stdout rather than ~/.weechat/weechat.log (issue #1475, issue #1477) * core: reload configuration files on SIGHUP (issue #1476) + * buflist: add options enable/disable/toggle in command /buflist * buflist: evaluate option buflist.look.sort so that sort can be customized for each of the three buflist bar items (issue #1465) * relay: add command "handshake" in weechat relay protocol and nonce to prevent replay attacks, add options relay.network.password_hash_algo, relay.network.password_hash_iterations, relay.network.nonce_size (issue #1474) * relay: add option relay.network.auth_timeout diff --git a/doc/de/autogen/user/buflist_commands.adoc b/doc/de/autogen/user/buflist_commands.adoc index b87ca7e4e..aafe12099 100644 --- a/doc/de/autogen/user/buflist_commands.adoc +++ b/doc/de/autogen/user/buflist_commands.adoc @@ -6,48 +6,52 @@ * `+buflist+`: Bar-Item mit der Liste von Buffern ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh - bar: fügt eine "buflist" Bar hinzu -refresh: erzwingt eine Aktualisierung der Bar-Item (buflist, buflist2 und buflist3) + enable: enable buflist +disable: disable buflist + toggle: toggle buflist + bar: add the "buflist" bar +refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) -Jede Zeile die einen Buffer anzeigt wird mittels Zeichenketten-Evaluation dargestellt (siehe /help eval für das Format), dazu werden folgende Optionen genutzt: - - buflist.look.display_conditions: Bedingungen um einen Buffer in der Liste darzustellen - - buflist.format.buffer: Format für den Buffer, der nicht der aktuell dargestellte Buffer ist - - buflist.format.buffer_current: Format für den aktuell dargestellten Buffer +The lines with buffers are displayed using string evaluation (see /help eval for the format), with these options: + - buflist.look.display_conditions: conditions to display a buffer in the list + - buflist.format.buffer: format for a buffer which is not current buffer + - buflist.format.buffer_current: format for the current buffer -Die folgenden Variablen können in den obigen Optionen genutzt werden: - - bar item data (siehe hdata "bar_item" in API Dokumentation für eine vollständige Liste), zum Beispiel: +The following variables can be used in these options: + - bar item data (see hdata "bar_item" in API doc for a complete list), for example: - ${bar_item.name} - - window data, wo das Bar-Item dargestellt werden soll (in "root" Bars existieren keine Fenster, siehe hdata "window" in API Dokumentation für eine vollständige Liste), zum Beispiel: + - window data, where the bar item is displayed (there's no window in root bars, see hdata "window" in API doc for a complete list), for example: - ${window.number} - ${window.buffer.full_name} - - buffer data (siehe hdata "buffer" in API Dokumentation für eine vollständige Liste), zum Beispiel: + - buffer data (see hdata "buffer" in API doc for a complete list), for example: - ${buffer.number} - ${buffer.name} - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} - - irc_server: IRC Serverdaten, ausschließlich genutzt bei einem IRC Buffer (siehe hdata "irc_server" in API Dokumentation) - - irc_channel: IRC Channeldaten, ausschließlich genutzt bei einem IRC Channel Buffer (siehe hdata "irc_channel" in API Dokumentation) - - zusätzliche Variablen die durch buflist bereitgestellt werden: - - ${format_buffer}: der evaluierte Wert der Option buflist.format.buffer; dies kann in der Option buflist.format.buffer_current genutzt werden um zum Beispiel die Hintergrundfarbe zu verändern - - ${current_buffer}: ein Boolean ("0" oder "1"), "1" falls es sich um den aktuellen Buffer handelt; dies kann in einer Bedingung verwendet werden: ${if:${current_buffer}?...:...} - - ${merged}: ein Boolean ("0" oder "1"), "1" wenn der Buffer mit einem anderen zusammengefügt ist; kann innerhalb einer Bedingung genutzt werden: ${if:${merged}?...:...} - - ${format_number}: eingerückte Nummer mit Trennzeichen (evaluiert aus Option buflist.format.number) - - ${number}: eingerückte Nummer, zum Beispiel " 1", falls die Anzahl der Buffer zwischen 10 und 99 liegt; bei zusammengefügten Buffern enthält die Variable für den ersten Buffer die entsprechende Nummer, die weiteren Buffer enthalten ein Leerzeichen anstelle der Nummer - - ${number2}: eingerückte Nummer, zum Beispiel " 1", falls die Anzahl der Buffer zwischen 10 und 99 liegt - - ${number_displayed}: "1" falls Nummer angezeigt wird, ansonsten "0" - - ${indent}: Einrückung für Name (Channel und private Buffer werden eingerückt) (evaluiert aus Option buflist.format.indent) - - ${format_nick_prefix}: Nick-Präfix mit entsprechender Farbe für einen Channel (evaluiert aus Option buflist.format.nick_prefix) - - ${color_nick_prefix}: Farbe für den Nick-Präfix von einem Channel (wird nur genutzt wenn die Option buflist.look.nick_prefix aktiviert ist) - - ${nick_prefix}: der Nick-Präfix für einen Channel (wird nur genutzt falls die Option buflist.look.nick_prefix aktiviert ist) - - ${format_name}: der formatierte Name (evaluiert aus Option buflist.format.name) - - ${name}: der Kurzname (falls einer gesetzt ist), ersatzweise wird auf den Originalnamen zurückgegriffen - - ${color_hotlist}: die Farbe mit der höchsten Priorität für den entsprechenden Buffer (evaluiert aus Option buflist.format.hotlist_xxx wobei xxx der entsprechende Level ist) - - ${format_hotlist}: die formatierte Hotlist (evaluiert aus Option buflist.format.hotlist) - - ${hotlist}: die Hotlist in der Rohform - - ${hotlist_priority}: "none", "low", "message", "private" oder "highlight" - - ${format_lag}: die Verzögerung für einen IRC Server-Buffer, ist leer falls es keine Verzögerung gibt (evaluiert aus Option buflist.format.lag) + - irc_server: IRC server data, defined only on an IRC buffer (see hdata "irc_server" in API doc) + - irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc) + - extra variables added by buflist for convenience: + - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...} + - ${merged}: a boolean ("0" or "1"), "1" if the buffer is merged with at least another buffer; it can be used in a condition: ${if:${merged}?...:...} + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) + - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers; for merged buffers, this variable is set with number for the first buffer and spaces for the next buffers with same number + - ${number2}: indented number, for example " 1" if there are between 10 and 99 buffers + - ${number_displayed}: "1" if the number is displayed, otherwise "0" + - ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent) + - ${format_nick_prefix}: colored nick prefix for a channel (evaluation of option buflist.format.nick_prefix) + - ${color_nick_prefix}: color of nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled) + - ${nick_prefix}: nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled) + - ${format_name}: formatted name (evaluation of option buflist.format.name) + - ${name}: the short name (if set), with a fallback on the name + - ${color_hotlist}: the color depending on the highest hotlist level for the buffer (evaluation of option buflist.format.hotlist_xxx where xxx is the level) + - ${format_hotlist}: the formatted hotlist (evaluation of option buflist.format.hotlist) + - ${hotlist}: the raw hotlist + - ${hotlist_priority}: "none", "low", "message", "private" or "highlight" + - ${format_lag}: the lag for an IRC server buffer, empty if there's no lag (evaluation of option buflist.format.lag) ---- diff --git a/doc/en/autogen/user/buflist_commands.adoc b/doc/en/autogen/user/buflist_commands.adoc index e8a0dc86c..1061eebfe 100644 --- a/doc/en/autogen/user/buflist_commands.adoc +++ b/doc/en/autogen/user/buflist_commands.adoc @@ -6,9 +6,13 @@ * `+buflist+`: bar item with list of buffers ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh + enable: enable buflist +disable: disable buflist + toggle: toggle buflist bar: add the "buflist" bar refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) diff --git a/doc/fr/autogen/user/buflist_commands.adoc b/doc/fr/autogen/user/buflist_commands.adoc index 30e6e5922..5e099d877 100644 --- a/doc/fr/autogen/user/buflist_commands.adoc +++ b/doc/fr/autogen/user/buflist_commands.adoc @@ -6,9 +6,13 @@ * `+buflist+`: objet de barre avec la liste des tampons ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh + enable : activer buflist +disable : désactiver buflist + toggle : activer/désactiver buflist bar : ajouter la barre "buflist" refresh : forcer le rafraichissement des objets de barre (buflist, buflist2 et buflist3) diff --git a/doc/it/autogen/user/buflist_commands.adoc b/doc/it/autogen/user/buflist_commands.adoc index e8a0dc86c..1061eebfe 100644 --- a/doc/it/autogen/user/buflist_commands.adoc +++ b/doc/it/autogen/user/buflist_commands.adoc @@ -6,9 +6,13 @@ * `+buflist+`: bar item with list of buffers ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh + enable: enable buflist +disable: disable buflist + toggle: toggle buflist bar: add the "buflist" bar refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) diff --git a/doc/ja/autogen/user/buflist_commands.adoc b/doc/ja/autogen/user/buflist_commands.adoc index 69a1d530a..3a44f8e0c 100644 --- a/doc/ja/autogen/user/buflist_commands.adoc +++ b/doc/ja/autogen/user/buflist_commands.adoc @@ -6,9 +6,13 @@ * `+buflist+`: バッファのリストを表示するバー要素 ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh + enable: enable buflist +disable: disable buflist + toggle: toggle buflist bar: add the "buflist" bar refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) diff --git a/doc/pl/autogen/user/buflist_commands.adoc b/doc/pl/autogen/user/buflist_commands.adoc index d1232515b..23c6e9acc 100644 --- a/doc/pl/autogen/user/buflist_commands.adoc +++ b/doc/pl/autogen/user/buflist_commands.adoc @@ -6,48 +6,52 @@ * `+buflist+`: element paska z listą buforów ---- -/buflist bar +/buflist enable|disable|toggle + bar refresh - bar: dodaje pasek "buflist" -refresh: wymusza odświeżenie elementów paska (buflist, buflist2 oraz buflist3) + enable: enable buflist +disable: disable buflist + toggle: toggle buflist + bar: add the "buflist" bar +refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) -Linie z buforami są wyświetlane za pomocą przetwarzania ciągów (zobacz /help eval żeby poznać format), za pomocą tych opcji: - - buflist.look.display_conditions: warunki wyświetlenia buforu na liście - - buflist.format.buffer: format dla buforu nie będącego obecnym buforem - - buflist.format.buffer_current: format format dla obecnego buforu +The lines with buffers are displayed using string evaluation (see /help eval for the format), with these options: + - buflist.look.display_conditions: conditions to display a buffer in the list + - buflist.format.buffer: format for a buffer which is not current buffer + - buflist.format.buffer_current: format for the current buffer -Następujące zmienne mogą być użyte w powyższych opcjach: - - dane elementu paska (pełną listę można znaleźć w dokumentacji API dla hdata "bar_item"), na przykład: +The following variables can be used in these options: + - bar item data (see hdata "bar_item" in API doc for a complete list), for example: - ${bar_item.name} - - dane okna, w którym element paska jest wyświetlany (okna nie ma w głównych paskach, zobacz hdata "window" w dokumentacji API dla pełnej listy zmiennych), na przykład: + - window data, where the bar item is displayed (there's no window in root bars, see hdata "window" in API doc for a complete list), for example: - ${window.number} - ${window.buffer.full_name} - - dane buforu (zobacz hdata "buffer" w dokumentacji API dla pełnej listy zmiennych), na przykład: + - buffer data (see hdata "buffer" in API doc for a complete list), for example: - ${buffer.number} - ${buffer.name} - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} - - irc_server: dane serwera IRC, zdefiniowane tylko w buforze IRC (zobacz hdata "irc_server" w dokumentacji API) - - irc_channel: dane kanału IRC, zdefiniowane tylko w buforze kanału IRC (zobacz hdata "irc_channel" w dokumentacji API) - - dodatkowe zmienne dodane dla wygody przez listę buforów: - - ${format_buffer}: przetworzona wartość opcji buflist.format.buffer; może to zostać użyte w opcji buflist.format.buffer_current na przykład do zmiany koloru tła - - ${current_buffer}: boolowskie ("0" lub "1"), "1" jeśli jest to obecny bufor; może zostać użyte w warunku: ${if: ${current_buffer}?...:...} - - ${merged}: boolowskie ("0" lub "1"), "1" jeśli bufor jest połączony z przynajmniej jednym innym buforem; może zostać użyte w warunku: ${if:${merged}?...:...} - - ${format_number}: wyrównany numer z separatorem (przetworzona opcja buflist.format.number) - - ${number}: wyrównany numer, na przykład " 1" jeśli buforów jest między 10 a 99 - - ${number2}: wyrównany numer, na przykład " 1" jeśli buforów jest między 10 a 99 - - ${number_displayed}: "1" jeśli numer jest wyświetlany, w przeciwnym wypadku "0" - - ${indent}: wyrównanie dla nazwy (kanały i bufory prywatne są wyrównywane) (przetworzona opcja buflist.format.indent) - - ${format_nick_prefix}: kolorowy prefiks nicka dla kanału (przetworzona opcja buflist.format.nick_prefix) - - ${color_nick_prefix}: kolor prefiksu nicka dla kanału (ustawiany, jeśli opcja buflist.look.nick_prefix jest włączona) - - ${nick_prefix}: prefix nicka dla kanału (ustawiany, jeśli opcja buflist.look.nick_prefix jest włączona) - - ${format_name}: sformatowana nazwa (przetworzona opcja buflist.format.name) - - ${name}: skrócona nazwa (jeśli ustawiona inaczej zwraca pełną nazwę) - - ${color_hotlist}: kolor zależący od najwyższego poziomu hotlisty dla bufora (przetworzona opcja buflist.format.hotlist_xxx, gdzie xxx to poziom) - - ${format_hotlist}: sformatowana hotlista (przetworzenie opcji buflist.format.hotlist) - - ${hotlist}: niesformatowana hotlista - - ${hotlist_priority}: "none", "low", "message", "private" lub "highlight" - - ${format_lag}: opóźnienie buforu serwera IRC, puste jeśli nie ma opóźnienia (przetworzona opcja buflist.format.lag) + - irc_server: IRC server data, defined only on an IRC buffer (see hdata "irc_server" in API doc) + - irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc) + - extra variables added by buflist for convenience: + - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...} + - ${merged}: a boolean ("0" or "1"), "1" if the buffer is merged with at least another buffer; it can be used in a condition: ${if:${merged}?...:...} + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) + - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers; for merged buffers, this variable is set with number for the first buffer and spaces for the next buffers with same number + - ${number2}: indented number, for example " 1" if there are between 10 and 99 buffers + - ${number_displayed}: "1" if the number is displayed, otherwise "0" + - ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent) + - ${format_nick_prefix}: colored nick prefix for a channel (evaluation of option buflist.format.nick_prefix) + - ${color_nick_prefix}: color of nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled) + - ${nick_prefix}: nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled) + - ${format_name}: formatted name (evaluation of option buflist.format.name) + - ${name}: the short name (if set), with a fallback on the name + - ${color_hotlist}: the color depending on the highest hotlist level for the buffer (evaluation of option buflist.format.hotlist_xxx where xxx is the level) + - ${format_hotlist}: the formatted hotlist (evaluation of option buflist.format.hotlist) + - ${hotlist}: the raw hotlist + - ${hotlist_priority}: "none", "low", "message", "private" or "highlight" + - ${format_lag}: the lag for an IRC server buffer, empty if there's no lag (evaluation of option buflist.format.lag) ---- diff --git a/po/cs.po b/po/cs.po index 59f24c712..3f3c45da3 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4912,6 +4912,9 @@ msgid "bar item with list of buffers" msgstr "seznam bufferů" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/de.po b/po/de.po index 500edeadf..240e9aaf0 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-19 12:01+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -5873,7 +5873,11 @@ msgstr "" msgid "bar item with list of buffers" msgstr "Bar-Item mit der Liste von Buffern" +#, fuzzy msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/es.po b/po/es.po index 88291c2c6..c4024379c 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5112,6 +5112,9 @@ msgid "bar item with list of buffers" msgstr "lista de buffers" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/fr.po b/po/fr.po index 0a251aeda..8fb4d92b6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" -"PO-Revision-Date: 2020-04-21 22:39+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" +"PO-Revision-Date: 2020-04-24 22:36+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -5739,6 +5739,9 @@ msgid "bar item with list of buffers" msgstr "objet de barre avec la liste des tampons" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" @@ -5810,6 +5813,9 @@ msgid "" " - ${format_lag}: the lag for an IRC server buffer, empty if there's no " "lag (evaluation of option buflist.format.lag)" msgstr "" +" enable : activer buflist\n" +"disable : désactiver buflist\n" +" toggle : activer/désactiver buflist\n" " bar : ajouter la barre \"buflist\"\n" "refresh : forcer le rafraichissement des objets de barre (buflist, buflist2 " "et buflist3)\n" diff --git a/po/hu.po b/po/hu.po index 0202591e3..6ef3a2186 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4451,6 +4451,9 @@ msgid "bar item with list of buffers" msgstr "Aliaszok listája:\n" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/it.po b/po/it.po index fa2932f11..253d40c64 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -5247,6 +5247,9 @@ msgid "bar item with list of buffers" msgstr "elenco dei buffer" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/ja.po b/po/ja.po index 41422a735..10a99c9c9 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -5601,7 +5601,11 @@ msgstr "" msgid "bar item with list of buffers" msgstr "element paska z listą buforów" +#, fuzzy msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/pt.po b/po/pt.po index 7ea2bbdb0..fdabe8c61 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -5521,6 +5521,9 @@ msgid "bar item with list of buffers" msgstr "lista de buffers" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 9a91eb21d..e414ee178 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -5063,6 +5063,9 @@ msgid "bar item with list of buffers" msgstr "lista de buffers" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/ru.po b/po/ru.po index 1c1ecd527..a14f23b7e 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2020-04-18 11:34+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4488,6 +4488,9 @@ msgid "bar item with list of buffers" msgstr "Список сокращений:\n" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/tr.po b/po/tr.po index 765206094..56cc9d9a4 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2019-11-03 08:38+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -4058,6 +4058,9 @@ msgid "bar item with list of buffers" msgstr "" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/po/weechat.pot b/po/weechat.pot index 7bda33f04..494d66f62 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2020-04-21 22:38+0200\n" +"POT-Creation-Date: 2020-04-24 11:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -4042,6 +4042,9 @@ msgid "bar item with list of buffers" msgstr "" msgid "" +" enable: enable buflist\n" +"disable: disable buflist\n" +" toggle: toggle buflist\n" " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 and " "buflist3)\n" diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 951e0f76e..3c83fff75 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -25,6 +25,7 @@ #include "buflist.h" #include "buflist-bar-item.h" #include "buflist-command.h" +#include "buflist-config.h" /* @@ -45,6 +46,24 @@ buflist_command_buflist (const void *pointer, void *data, if (argc == 1) return WEECHAT_RC_OK; + if (weechat_strcasecmp (argv[1], "enable") == 0) + { + weechat_config_option_set (buflist_config_look_enabled, "on", 1); + return WEECHAT_RC_OK; + } + + if (weechat_strcasecmp (argv[1], "disable") == 0) + { + weechat_config_option_set (buflist_config_look_enabled, "off", 1); + return WEECHAT_RC_OK; + } + + if (weechat_strcasecmp (argv[1], "toggle") == 0) + { + weechat_config_option_set (buflist_config_look_enabled, "toggle", 1); + return WEECHAT_RC_OK; + } + if (weechat_strcasecmp (argv[1], "bar") == 0) { buflist_add_bar (); @@ -70,8 +89,11 @@ buflist_command_init () weechat_hook_command ( "buflist", N_("bar item with list of buffers"), - "bar || refresh", - N_(" bar: add the \"buflist\" bar\n" + "enable|disable|toggle || bar || refresh", + N_(" enable: enable buflist\n" + "disable: disable buflist\n" + " toggle: toggle buflist\n" + " bar: add the \"buflist\" bar\n" "refresh: force the refresh of the bar items (buflist, buflist2 " "and buflist3)\n" "\n" @@ -147,6 +169,6 @@ buflist_command_init () "\"private\" or \"highlight\"\n" " - ${format_lag}: the lag for an IRC server buffer, empty if " "there's no lag (evaluation of option buflist.format.lag)"), - "bar || refresh", + "enable|disable|toggle || bar || refresh", &buflist_command_buflist, NULL, NULL); }