diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4a396bf6a..b0a276f15 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -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 diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc index c47b96969..e63d127cb 100644 --- a/doc/en/weechat_dev.en.adoc +++ b/doc/en/weechat_dev.en.adoc @@ -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. diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc index 9d5d76fbb..d58a602c4 100644 --- a/doc/fr/weechat_dev.fr.adoc +++ b/doc/fr/weechat_dev.fr.adoc @@ -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. diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc index c530ac684..80660eec7 100644 --- a/doc/ja/weechat_dev.ja.adoc +++ b/doc/ja/weechat_dev.ja.adoc @@ -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 マウス動作 diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc index 5f342747e..b586bac4d 100644 --- a/doc/sr/weechat_dev.sr.adoc +++ b/doc/sr/weechat_dev.sr.adoc @@ -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 акције мишем. diff --git a/po/cs.po b/po/cs.po index 69775b93d..4576493b9 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: 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 \n" "Language-Team: weechat-dev \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:" diff --git a/po/de.po b/po/de.po index 8bfc611c4..5e5d2e2c2 100644 --- a/po/de.po +++ b/po/de.po @@ -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 \n" "Language-Team: German \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" diff --git a/po/es.po b/po/es.po index a672fc077..6b6ef0b3d 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: 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 \n" "Language-Team: weechat-dev \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:" diff --git a/po/fr.po b/po/fr.po index c19f14aef..2ed81227f 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: 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 \n" "Language-Team: weechat-dev \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" diff --git a/po/hu.po b/po/hu.po index 8f6c6b28d..5aea4ead0 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: 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 \n" "Language-Team: weechat-dev \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" diff --git a/po/it.po b/po/it.po index 89fd377ae..dcfe4c4d7 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: 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 \n" "Language-Team: weechat-dev \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:" diff --git a/po/ja.po b/po/ja.po index b0d0549c3..b0afd2f52 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: 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 \n" "Language-Team: Japanese \n" "Language-Team: Polish \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" diff --git a/po/pt.po b/po/pt.po index 0cdc1b79a..c1d40e8ee 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: 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 \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:" diff --git a/po/pt_BR.po b/po/pt_BR.po index cc1eaa5b9..e5813adb4 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: 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 \n" "Language-Team: weechat-dev \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:" diff --git a/po/ru.po b/po/ru.po index fe5f6106c..80d7973e5 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: 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 \n" "Language-Team: weechat-dev \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" diff --git a/po/sr.po b/po/sr.po index edf712a77..d6d28a016 100644 --- a/po/sr.po +++ b/po/sr.po @@ -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ć \n" "Language-Team: weechat-dev \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 сигнала" diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake index 5eed74044..1590120aa 100644 --- a/po/srcfiles.cmake +++ b/po/srcfiles.cmake @@ -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 diff --git a/po/tr.po b/po/tr.po index 4d60f5e21..a92721acd 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: 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 \n" "Language-Team: weechat-dev \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ı" diff --git a/po/weechat.pot b/po/weechat.pot index 9805c0e4c..28d7ec208 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: 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 \n" "Language-Team: weechat-dev \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 "" diff --git a/src/plugins/buflist/CMakeLists.txt b/src/plugins/buflist/CMakeLists.txt index 898ecb9c0..2257e804c 100644 --- a/src/plugins/buflist/CMakeLists.txt +++ b/src/plugins/buflist/CMakeLists.txt @@ -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 diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 7585bf3c6..e0e12483a 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -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)); + } } } } diff --git a/src/plugins/buflist/buflist-bar-item.h b/src/plugins/buflist/buflist-bar-item.h index e28f76df1..26eebb55f 100644 --- a/src/plugins/buflist/buflist-bar-item.h +++ b/src/plugins/buflist/buflist-bar-item.h @@ -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 (); diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 5aa346f1e..f86d0e5fd 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -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 [[,...]]", 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); } diff --git a/src/plugins/buflist/buflist-completion.c b/src/plugins/buflist/buflist-completion.c new file mode 100644 index 000000000..bf18a3b30 --- /dev/null +++ b/src/plugins/buflist/buflist-completion.c @@ -0,0 +1,100 @@ +/* + * buflist-completion.c - completion for buflist command + * + * Copyright (C) 2023 Sébastien Helleu + * + * 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 . + */ + +#include + +#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); +} diff --git a/src/plugins/buflist/buflist-completion.h b/src/plugins/buflist/buflist-completion.h new file mode 100644 index 000000000..442ce4182 --- /dev/null +++ b/src/plugins/buflist/buflist-completion.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2023 Sébastien Helleu + * + * 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 . + */ + +#ifndef WEECHAT_PLUGIN_BUFLIST_COMPLETION_H +#define WEECHAT_PLUGIN_BUFLIST_COMPLETION_H + +extern void buflist_completion_init (); + +#endif /* WEECHAT_PLUGIN_BUFLIST_COMPLETION_H */ diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c index 11d8e46b4..681ac6b99 100644 --- a/src/plugins/buflist/buflist-config.c +++ b/src/plugins/buflist/buflist-config.c @@ -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); } /* diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c index 6470f6e8a..e6061e616 100644 --- a/src/plugins/buflist/buflist.c +++ b/src/plugins/buflist/buflist.c @@ -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 ();