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

buflist: add support of item names in command /buflist refresh

This commit is contained in:
Sébastien Helleu
2023-10-01 09:58:19 +02:00
parent 8bd4994ccd
commit e928bce76c
28 changed files with 425 additions and 68 deletions
+1
View File
@@ -29,6 +29,7 @@ New features::
* api: add support of path to variable and hashtable comparison in function hdata_compare (issue #1066)
* api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
* api: add info "buffer" (issue #1962)
* buflist: add support of item names in command `/buflist refresh`
* buflist: increase max number of buflist items from 3 to 5 (issue #1703)
* fset: add variable `allowed_values` in options, add options fset.color.allowed_values and fset.color.allowed_values_selected
* fset: allow long type name in type filter
+1
View File
@@ -238,6 +238,7 @@ WeeChat "core" is located in following directories:
|       buflist.c | Main buflist functions.
|       buflist-bar-item.c | Buflist bar items.
|       buflist-command.c | Buflist commands.
|       buflist-completion.c | Buflist completions.
|       buflist-config.c | Buflist config options (file buflist.conf).
|       buflist-info.c | Buflist info/infolists/hdata.
|       buflist-mouse.c | Buflist mouse actions.
+1
View File
@@ -240,6 +240,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|       buflist.c | Fonctions principales de Buflist.
|       buflist-bar-item.c | Objets de barre Buflist.
|       buflist-command.c | Commandes pour Buflist.
|       buflist-completion.c | Complétions pour Buflist.
|       buflist-config.c | Options de configuration pour Buflist (fichier buflist.conf).
|       buflist-info.c | Info/infolists/hdata pour Buflist.
|       buflist-mouse.c | Actions souris pour Buflist.
+2
View File
@@ -251,6 +251,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|       buflist.c | buflist の主要関数
|       buflist-bar-item.c | buflist バー要素
|       buflist-command.c | buflist コマンド
// TRANSLATION MISSING
|       buflist-completion.c | Buflist completions.
|       buflist-config.c | buflist 設定オプション (buflist.conf ファイル)
|       buflist-info.c | buflist の情報/インフォリスト/hdata
|       buflist-mouse.c | buflist マウス動作
+2
View File
@@ -240,6 +240,8 @@ WeeChat „језгро” се налази у следећим директо
|       buflist.c | Главне buflist функције.
|       buflist-bar-item.c | Buflist ставке траке.
|       buflist-command.c | Buflist команде.
// TRANSLATION MISSING
|       buflist-completion.c | Buflist completions.
|       buflist-config.c | Buflist опције кофиг (фајл buflist.conf).
|       buflist-info.c | Buflist info/infolists/hdata.
|       buflist-mouse.c | Buflist акције мишем.
+11 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5667,8 +5667,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -5742,6 +5742,14 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "seznam položek polí"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " napojené signály:"
+93 -3
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-15 12:46+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -7006,13 +7006,95 @@ 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 buflist3, "
#| "buflist4 and buflist5)\n"
#| "\n"
#| "The lines with buffers are displayed using string evaluation (see /help "
#| "eval for the format), with these options:\n"
#| " - buflist.look.display_conditions: conditions to display a buffer in "
#| "the list\n"
#| " - buflist.format.buffer: format for a buffer which is not current "
#| "buffer\n"
#| " - buflist.format.buffer_current: format for the current buffer\n"
#| "\n"
#| "The following variables can be used in these options:\n"
#| " - bar item data (see hdata \"bar_item\" in API doc for a complete "
#| "list), for example:\n"
#| " - ${bar_item.name}\n"
#| " - 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:\n"
#| " - ${window.number}\n"
#| " - ${window.buffer.full_name}\n"
#| " - buffer data (see hdata \"buffer\" in API doc for a complete list), "
#| "for example:\n"
#| " - ${buffer.number}\n"
#| " - ${buffer.name}\n"
#| " - ${buffer.full_name}\n"
#| " - ${buffer.short_name}\n"
#| " - ${buffer.nicklist_nicks_count}\n"
#| " - irc_server: IRC server data, defined only on an IRC buffer (see hdata "
#| "\"irc_server\" in API doc)\n"
#| " - irc_channel: IRC channel data, defined only on an IRC channel buffer "
#| "(see hdata \"irc_channel\" in API doc)\n"
#| " - extra variables added by buflist for convenience:\n"
#| " - ${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\n"
#| " - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
#| "current buffer; it can be used in a condition: ${if:"
#| "${current_buffer}?...:...}\n"
#| " - ${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}?...:...}\n"
#| " - ${format_number}: indented number with separator (evaluation of "
#| "option buflist.format.number)\n"
#| " - ${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\n"
#| " - ${number2}: indented number, for example \" 1\" if there are "
#| "between 10 and 99 buffers\n"
#| " - ${number_displayed}: \"1\" if the number is displayed, otherwise "
#| "\"0\"\n"
#| " - ${indent}: indentation for name (channel, private and list buffers "
#| "are indented) (evaluation of option buflist.format.indent)\n"
#| " - ${format_nick_prefix}: colored nick prefix for a channel "
#| "(evaluation of option buflist.format.nick_prefix)\n"
#| " - ${color_nick_prefix}: color of nick prefix for a channel (set only "
#| "if the option buflist.look.nick_prefix is enabled)\n"
#| " - ${nick_prefix}: nick prefix for a channel (set only if the option "
#| "buflist.look.nick_prefix is enabled)\n"
#| " - ${format_name}: formatted name (evaluation of option buflist.format."
#| "name)\n"
#| " - ${name}: the short name (if set), with a fallback on the name\n"
#| " - ${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)\n"
#| " - ${format_hotlist}: the formatted hotlist (evaluation of option "
#| "buflist.format.hotlist)\n"
#| " - ${hotlist}: the raw hotlist\n"
#| " - ${hotlist_priority}: \"none\", \"low\", \"message\", \"private\" or "
#| "\"highlight\"\n"
#| " - ${hotlist_priority_number}: -1 = none, 0 = low, 1 = message, 2 = "
#| "private, 3 = highlight\n"
#| " - ${format_lag}: the lag for an IRC server buffer, empty if there's "
#| "no lag (evaluation of option buflist.format.lag)\n"
#| " - ${format_tls_version}: indicator of TLS version for a server "
#| "buffer, empty for channels (evaluation of option buflist.format."
#| "tls_version)"
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 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -7169,6 +7251,14 @@ msgstr ""
" - ${format_tls_version}: Indikator der TLS Version für den Serverbuffer, "
"Channels bleiben unberührt (evaluiert aus Option buflist.format.tls_version)"
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "Auflistung der Bar-Items"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: %d Signale hooked"
+11 -3
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6299,8 +6299,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6374,6 +6374,14 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "lista de elementos de barra"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " señales enganchadas:"
+14 -6
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"PO-Revision-Date: 2023-09-22 23:13+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-10-01 09:57+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -6818,8 +6818,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6896,8 +6896,9 @@ msgstr ""
"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, "
"buflist3, buflist4 et buflist5)\n"
"refresh : forcer le rafraîchissement de certains objets de barre (si aucun "
"nom d'objet n'est donné, tous les objets de barre utilisés sont rafraîchis, "
"selon l'option buflist.look.use_items)\n"
"\n"
"Les lignes avec les tampons sont affichées en utilisant l'évaluation de "
"chaînes (voir /help eval pour le format), avec ces options :\n"
@@ -6974,6 +6975,13 @@ msgstr ""
"courant, vide pour les canaux (évaluation de l'option buflist.format."
"tls_version)"
msgid "all buflist bar items"
msgstr "tous les objets de barre de buflist"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
"les objets de barre buflist utilisés (selon l'option buflist.look.use_items)"
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: %d signaux accrochés"
+10 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5163,8 +5163,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -5238,6 +5238,13 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
msgid "all buflist bar items"
msgstr "Aliaszok listája:\n"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " üzenetkezelők:\n"
+11 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5961,8 +5961,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6036,6 +6036,14 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "elenco degli elementi barra"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " hook sui segnali:"
+11 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -6615,8 +6615,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6754,6 +6754,14 @@ msgstr ""
" - ${format_lag}: IRC サーババッファの遅延時間、遅延がない場合は空 "
"(buflist.format.lag オプションの評価結果)"
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "バー要素のリスト"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: %d 個のシグナルがフックされました"
+11 -3
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -7323,8 +7323,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -7472,6 +7472,14 @@ msgstr ""
" - ${format_tls_version}: wskaźnik wersji TLS w buforze serwera, pusty "
"dla kanałów (wynik przetworzenia opcji buflist.format.tls_version)"
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "lista elementów pasków"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: %d powiązanych sygnałów"
+11 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -6618,8 +6618,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6693,6 +6693,14 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "lista de itens da barra"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " sinais ligados:"
+11 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5889,8 +5889,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -5964,6 +5964,14 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "lista de itens da barra"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " sinais relacionados:"
+10 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5202,8 +5202,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -5277,6 +5277,13 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
#, fuzzy
msgid "all buflist bar items"
msgstr "Список сокращений:\n"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, fuzzy, c-format
msgid "%s: %d signals hooked"
msgstr " обработчики сообщений:\n"
+11 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6779,8 +6779,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -6930,6 +6930,14 @@ msgstr ""
" - ${format_tls_version}: индикатор TLS верзије за серверски бафер, "
"празно за канале (резултат израчунавања опције buflist.format.tls_version)"
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "листа ставки траке"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: прикачено је %d сигнала"
+2
View File
@@ -183,6 +183,8 @@ SET(WEECHAT_SOURCES
./src/plugins/buflist/buflist.c
./src/plugins/buflist/buflist-command.c
./src/plugins/buflist/buflist-command.h
./src/plugins/buflist/buflist-completion.c
./src/plugins/buflist/buflist-completion.h
./src/plugins/buflist/buflist-config.c
./src/plugins/buflist/buflist-config.h
./src/plugins/buflist/buflist.h
+11 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6863,8 +6863,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -7013,6 +7013,14 @@ msgstr ""
"göstergesi kanallar için boş (buflist.format.tls_version seçeneği "
"değerlendirmesi)"
#, fuzzy
#| msgid "list of bar items"
msgid "all buflist bar items"
msgstr "çubuk ögeleri listesi"
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr "%s: %d sinyal kancalandı"
+9 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-22 23:12+0200\n"
"POT-Creation-Date: 2023-10-01 09:56+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4747,8 +4747,8 @@ msgid ""
"disable: disable buflist\n"
" toggle: toggle buflist\n"
" bar: add the \"buflist\" bar\n"
"refresh: force the refresh of the bar items (buflist, buflist2 buflist3, "
"buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, all bar "
"items used are refreshed, according to option buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation (see /help eval "
"for the format), with these options:\n"
@@ -4822,6 +4822,12 @@ msgid ""
"empty for channels (evaluation of option buflist.format.tls_version)"
msgstr ""
msgid "all buflist bar items"
msgstr ""
msgid "used buflist bar items (according to option buflist.look.use_items)"
msgstr ""
#, c-format
msgid "%s: %d signals hooked"
msgstr ""
+1
View File
@@ -21,6 +21,7 @@ add_library(buflist MODULE
buflist.c buflist.h
buflist-bar-item.c buflist-bar-item.h
buflist-command.c buflist-command.h
buflist-completion.c buflist-completion.h
buflist-config.c buflist-config.h
buflist-info.c buflist-info.h
buflist-mouse.c buflist-mouse.h
+18 -8
View File
@@ -105,24 +105,34 @@ buflist_bar_item_get_index_with_pointer (struct t_gui_bar_item *item)
/*
* Updates buflist bar item if buflist is enabled (or if force argument is 1).
*
* If force == 1, all used items are refreshed
* (according to option buflist.look.use_items).
* If index == -1, all bar items (or all bar items used) are refreshed,
* otherwise only this bar item is refreshed.
*
* If force == 1, all used items are refreshed (according to option
* buflist.look.use_items).
* If force == 2, all items are refreshed.
*/
void
buflist_bar_item_update (int force)
buflist_bar_item_update (int index, int force)
{
int i, num_items;
if (force || weechat_config_boolean (buflist_config_look_enabled))
{
num_items = (force == 2) ?
BUFLIST_BAR_NUM_ITEMS :
weechat_config_integer (buflist_config_look_use_items);
for (i = 0; i < num_items; i++)
if ((index >= 0) && (index < BUFLIST_BAR_NUM_ITEMS))
{
weechat_bar_item_update (buflist_bar_item_get_name (i));
weechat_bar_item_update (buflist_bar_item_get_name (index));
}
else
{
num_items = (force == 2) ?
BUFLIST_BAR_NUM_ITEMS :
weechat_config_integer (buflist_config_look_use_items);
for (i = 0; i < num_items; i++)
{
weechat_bar_item_update (buflist_bar_item_get_name (i));
}
}
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ extern struct t_arraylist *buflist_list_buffers[BUFLIST_BAR_NUM_ITEMS];
extern const char *buflist_bar_item_get_name (int index);
extern int buflist_bar_item_get_index (const char *item_name);
extern int buflist_bar_item_get_index_with_pointer (struct t_gui_bar_item *item);
extern void buflist_bar_item_update (int force);
extern void buflist_bar_item_update (int index, int force);
extern int buflist_bar_item_init ();
extern void buflist_bar_item_end ();
+25 -5
View File
@@ -37,6 +37,8 @@ buflist_command_buflist (const void *pointer, void *data,
struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
int i, index;
/* make C compiler happy */
(void) pointer;
(void) data;
@@ -72,7 +74,20 @@ buflist_command_buflist (const void *pointer, void *data,
if (weechat_strcmp (argv[1], "refresh") == 0)
{
buflist_bar_item_update (0);
if (argc > 2)
{
for (i = 2; i < argc; i++)
{
index = buflist_bar_item_get_index (argv[i]);
if (index >= 0)
buflist_bar_item_update (index, 0);
}
}
else
{
/* refresh all bar items used */
buflist_bar_item_update (-1, 0);
}
return WEECHAT_RC_OK;
}
@@ -89,13 +104,16 @@ buflist_command_init ()
weechat_hook_command (
"buflist",
N_("bar item with list of buffers"),
"enable|disable|toggle || bar || refresh",
"enable|disable|toggle"
" || bar"
" || refresh [<item>[,<item>...]]",
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 "
"buflist3, buflist4 and buflist5)\n"
"refresh: force the refresh of some bar items (if no item is given, "
"all bar items used are refreshed, according to option "
"buflist.look.use_items)\n"
"\n"
"The lines with buffers are displayed using string evaluation "
"(see /help eval for the format), with these options:\n"
@@ -174,6 +192,8 @@ buflist_command_init ()
" - ${format_tls_version}: indicator of TLS version for a server "
"buffer, empty for channels (evaluation of option "
"buflist.format.tls_version)"),
"enable|disable|toggle || bar || refresh",
"enable|disable|toggle"
" || bar"
" || refresh %(buflist_used_items)|%*",
&buflist_command_buflist, NULL, NULL);
}
+100
View File
@@ -0,0 +1,100 @@
/*
* buflist-completion.c - completion for buflist command
*
* Copyright (C) 2023 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "../weechat-plugin.h"
#include "buflist.h"
#include "buflist-bar-item.h"
#include "buflist-config.h"
/*
* Adds all buflist items to completion list.
*/
int
buflist_completion_all_items_cb (const void *pointer, void *data,
const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
int i;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) completion_item;
(void) buffer;
for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++)
{
weechat_completion_list_add (completion,
buflist_bar_item_get_name (i),
0, WEECHAT_LIST_POS_END);
}
return WEECHAT_RC_OK;
}
/*
* Adds used buflist items to completion list.
*/
int
buflist_completion_used_items_cb (const void *pointer, void *data,
const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
int i;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) completion_item;
(void) buffer;
for (i = 0; i < weechat_config_integer (buflist_config_look_use_items); i++)
{
weechat_completion_list_add (completion,
buflist_bar_item_get_name (i),
0, WEECHAT_LIST_POS_END);
}
return WEECHAT_RC_OK;
}
/*
* Hooks completions.
*/
void
buflist_completion_init ()
{
weechat_hook_completion ("buflist_all_items",
N_("all buflist bar items"),
&buflist_completion_all_items_cb, NULL, NULL);
weechat_hook_completion ("buflist_used_items",
N_("used buflist bar items (according to option "
"buflist.look.use_items)"),
&buflist_completion_used_items_cb, NULL, NULL);
}
+25
View File
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2023 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_PLUGIN_BUFLIST_COMPLETION_H
#define WEECHAT_PLUGIN_BUFLIST_COMPLETION_H
extern void buflist_completion_init ();
#endif /* WEECHAT_PLUGIN_BUFLIST_COMPLETION_H */
+8 -8
View File
@@ -159,7 +159,7 @@ buflist_config_signal_buffer_cb (const void *pointer, void *data,
(void) type_data;
(void) signal_data;
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
return WEECHAT_RC_OK;
}
@@ -261,13 +261,13 @@ buflist_config_change_enabled (const void *pointer, void *data,
/* buflist enabled */
buflist_config_hook_signals_refresh ();
weechat_command (NULL, "/mute /bar show buflist");
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
}
else
{
/* buflist disabled */
weechat_command (NULL, "/mute /bar hide buflist");
buflist_bar_item_update (1);
buflist_bar_item_update (-1, 1);
}
}
@@ -334,7 +334,7 @@ buflist_config_change_sort (const void *pointer, void *data,
weechat_hashtable_free (hashtable_pointers);
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
}
/*
@@ -368,7 +368,7 @@ buflist_config_change_nick_prefix (const void *pointer, void *data,
(void) option;
buflist_config_change_signals_refresh (NULL, NULL, NULL);
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
}
/*
@@ -384,7 +384,7 @@ buflist_config_change_use_items (const void *pointer, void *data,
(void) data;
(void) option;
buflist_bar_item_update (2);
buflist_bar_item_update (-1, 2);
}
/*
@@ -400,7 +400,7 @@ buflist_config_change_buflist (const void *pointer, void *data,
(void) data;
(void) option;
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
}
/*
@@ -461,7 +461,7 @@ buflist_config_change_format (const void *pointer, void *data,
buflist_config_format_hotlist_eval = buflist_config_add_eval_for_formats (
weechat_config_string (buflist_config_format_hotlist));
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
}
/*
+3 -1
View File
@@ -28,6 +28,7 @@
#include "buflist.h"
#include "buflist-bar-item.h"
#include "buflist-command.h"
#include "buflist-completion.h"
#include "buflist-config.h"
#include "buflist-info.h"
#include "buflist-mouse.h"
@@ -458,10 +459,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
buflist_config_change_sort (NULL, NULL, NULL);
buflist_command_init ();
buflist_completion_init ();
buflist_add_bar ();
buflist_bar_item_update (0);
buflist_bar_item_update (-1, 0);
buflist_mouse_init ();