Skip to content

Commit

Permalink
irc: add buffer for /list reply (closes #1972)
Browse files Browse the repository at this point in the history
New options:

- irc.color.list_buffer_line_selected
- irc.color.list_buffer_line_selected_bg
- irc.look.list_buffer_sort
- irc.look.list_buffer_scroll_horizontal
- irc.look.new_list_position
- irc.look.list_buffer_topic_strip_colors
  • Loading branch information
flashcode committed Aug 12, 2023
1 parent d25a421 commit 2f1de09
Show file tree
Hide file tree
Showing 39 changed files with 4,396 additions and 322 deletions.
1 change: 1 addition & 0 deletions ChangeLog.adoc
Expand Up @@ -21,6 +21,7 @@ New features::
* 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
* irc: add buffer for /list reply, add options irc.color.list_buffer_line_selected, irc.color.list_buffer_line_selected_bg, irc.look.list_buffer_sort, irc.look.list_buffer_scroll_horizontal, irc.look.new_list_position, irc.look.list_buffer_topic_strip_colors (issue #1972)
* irc: display commands 716/717 in private buffer (if present) (issue #146)
* irc: create default options irc.ctcp.* when file irc.conf is created (issue #1974)
* irc: evaluate options irc.ctcp.* (issue #1974)
Expand Down
2 changes: 2 additions & 0 deletions doc/en/weechat_dev.en.adoc
Expand Up @@ -281,6 +281,7 @@ WeeChat "core" is located in following directories:
|       irc-info.c | IRC info/infolists/hdata.
|       irc-input.c | Input of commands/text.
|       irc-join.c | Functions for list of channels to join.
|       irc-list.c | Buffer for reply to /list command.
|       irc-message.c | Functions to manipulate IRC messages.
|       irc-mode.c | Functions about channel/nick modes.
|       irc-modelist.c | IRC channel mode lists (+b, +e, +I, ...).
Expand Down Expand Up @@ -439,6 +440,7 @@ WeeChat "core" is located in following directories:
|             test-irc-ctcp.cpp | Tests: IRC CTCP.
|             test-irc-ignore.cpp | Tests: IRC ignores.
|             test-irc-join.cpp | Tests: IRC join functions.
|             test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|             test-irc-message.cpp | Tests: IRC messages.
|             test-irc-mode.cpp | Tests: IRC modes.
|             test-irc-nick.cpp | Tests: IRC nicks.
Expand Down
2 changes: 2 additions & 0 deletions doc/fr/weechat_dev.fr.adoc
Expand Up @@ -283,6 +283,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|       irc-info.c | Info/infolists/hdata pour IRC.
|       irc-input.c | Entrée de commandes/texte.
|       irc-join.c | Fonctions pour les listes de canaux à rejoindre.
|       irc-list.c | Tampon pour la réponse à la commande /list.
|       irc-message.c | Fonctions pour manipuler les messages IRC.
|       irc-mode.c | Fonctions pour les modes de canal/pseudo.
|       irc-modelist.c | Listes de modes de canaux IRC (+b, +e, +I, ...).
Expand Down Expand Up @@ -441,6 +442,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|             test-irc-ctcp.cpp | Tests : CTCP IRC.
|             test-irc-ignore.cpp | Tests : ignores IRC.
|             test-irc-join.cpp | Tests : fonctions de join IRC.
|             test-irc-list.cpp | Tests : tampon IRC pour la réponse à la commande /list.
|             test-irc-message.cpp | Tests : messages IRC.
|             test-irc-mode.cpp | Tests : modes IRC.
|             test-irc-nick.cpp | Tests : pseudos IRC.
Expand Down
4 changes: 4 additions & 0 deletions doc/ja/weechat_dev.ja.adoc
Expand Up @@ -295,6 +295,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|       irc-input.c | コマンドおよびテキストの入力
// TRANSLATION MISSING
|       irc-join.c | Functions for list of channels to join.
// TRANSLATION MISSING
|       irc-list.c | Buffer for reply to /list command.
|       irc-message.c | IRC メッセージを操作する関数
|       irc-mode.c | チャンネルおよびニックネームのモードを操作する関数
|       irc-modelist.c | IRC チャンネルモードリスト (+b、+e、+I、...).
Expand Down Expand Up @@ -485,6 +487,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
// TRANSLATION MISSING
|             test-irc-join.cpp | Tests: IRC join functions.
// TRANSLATION MISSING
|             test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
// TRANSLATION MISSING
|             test-irc-message.cpp | Tests: IRC messages.
// TRANSLATION MISSING
|             test-irc-mode.cpp | Tests: IRC modes.
Expand Down
4 changes: 4 additions & 0 deletions doc/sr/weechat_dev.sr.adoc
Expand Up @@ -283,6 +283,8 @@ WeeChat „језгро” се налази у следећим директо
|       irc-info.c | IRC info/infolists/hdata.
|       irc-input.c | Унос команди/текста.
|       irc-join.c | Функције за листе канала којима се приступа.
// TRANSLATION MISSING
|       irc-list.c | Buffer for reply to /list command.
|       irc-message.c | Функције за манипулисање IRC порукама.
|       irc-mode.c | Функције у вези режима канала/надимка.
|       irc-modelist.c | Листе режима IRC канала (+b, +e, +I, ...).
Expand Down Expand Up @@ -442,6 +444,8 @@ WeeChat „језгро” се налази у следећим директо
|             test-irc-ctcp.cpp | Tests: IRC CTCP.
|             test-irc-ignore.cpp | Тестови: IRC игнорисања.
|             test-irc-join.cpp | Тестови: IRC функције приступања.
// TRANSLATION MISSING
|             test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|             test-irc-message.cpp | Тестови: IRC поруке.
|             test-irc-mode.cpp | Тестови: IRC режими.
|             test-irc-nick.cpp | Тестови: IRC надимци.
Expand Down
172 changes: 154 additions & 18 deletions po/cs.po
Expand Up @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-08 07:11+0200\n"
"POT-Creation-Date: 2023-08-12 10:59+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -6900,6 +6900,9 @@ msgstr "%s%s: nedostatek paměti pro regulární výraz"
msgid "%s%s: \"%s\" is not a valid regular expression (%s)"
msgstr "%s%s: \"%s\" není validní regulární výraz (%s)"

msgid "Receiving list of channels, please wait..."
msgstr ""

#, c-format
msgid ""
"%s%s: you must specify channel for \"%s\" command if you're not in a channel"
Expand Down Expand Up @@ -7717,39 +7720,79 @@ msgid "list channels and their topics"
msgstr "vypsat kanály a jejich témata"

#, fuzzy
msgid "[-server <server>] [-re <regex>] [<channel>[,<channel>...]] [<target>]"
msgid ""
"[-server <server>] [-re <regex>] [<channel>[,<channel>...]] [<target>] || -"
"up|-down [<number>] || -left|-right [<percent>] || -go <line>|end || -join"
msgstr "[-server <server>] [<kanál1>[,<kanál2>...]] [<klíč1>[,<klíč2>...]]"

#, fuzzy
msgid ""
" server: send to this server (internal name)\n"
" regex: POSIX extended regular expression used to filter results (case "
"insensitive, can start by \"(?-i)\" to become case sensitive)\n"
"channel: channel to list\n"
" target: server name\n"
" -up: move the selected line up by \"number\" lines\n"
" -down: move the selected line down by \"number\" lines\n"
" -left: scroll the list buffer by \"percent\" of width on the left\n"
" -right: scroll the list buffer by \"percent\" of width on the right\n"
" -go: select a line by number, first line number is 0 (\"end\" to select "
"the last line)\n"
" -join: join the channel on the selected line\n"
"\n"
"Keys and input on /list buffer:\n"
" up move one line up\n"
" down move one line down\n"
" pgup move one page up\n"
" pgdn move one page down\n"
" alt-home << move to first line\n"
" alt-end >> move to last line\n"
" F11 < scroll horizontally on the left\n"
" F12 > scroll horizontally on the right\n"
" * show all channels (no filter)\n"
" xxx show only channels with \"xxx\" in name or topic "
"(case insensitive)\n"
" n:xxx show only channels with \"xxx\" in name (case "
"insensitive)\n"
" u:n show only channels with at least \"n\" users\n"
" u:>n show only channels with more than \"n\" users\n"
" u:<n show only channels with less than \"n\" users\n"
" t:xxx show only channels with \"xxx\" in topic (case "
"insensitive)\n"
" c:xxx show only channels matching the evaluated "
"condition \"xxx\", using following variables: name, name2, users, topic\n"
" ctrl-j j join channel on selected line\n"
" s:x,y sort channels by fields x,y (see below)\n"
" s: reset sort to its default value (see below)\n"
" $ refresh list\n"
" q close buffer\n"
"\n"
"Sort keys on /list buffer:\n"
" name channel name (eg: \"##test\")\n"
" name2 channel name without prefix (eg: \"test\")\n"
" users number of users on channel\n"
" topic channel topic\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
" list all channels on server and display them in a dedicated buffer (can be "
"slow on large networks):\n"
" /list\n"
" list channel #weechat:\n"
" /list #weechat\n"
" list all channels beginning with \"#weechat\" (can be very slow on large "
"networks):\n"
" /list -re #weechat.*"
" /list -re #weechat.*\n"
" on /list buffer:\n"
" channels with \"weechat\" in name:\n"
" n:weechat\n"
" channels with at least 100 users:\n"
" u:100\n"
" channels with \"freebsd\" (case insensitive) in topic and more than 10 "
"users:\n"
" c:${topic} =- freebsd && ${users} > 10\n"
" sort channels by users (big channels first), then name2 (name without "
"prefix):\n"
" s:-users,name2"
msgstr ""
" kanál: kanál, který vypsat\n"
"server: jméno serveru\n"
"regexp: regulární výraz pro filtrování výsledků\n"
"\n"
"Příklady:\n"
" vypsat všechny kanály na serveru (na velkých sítích může být velmi "
"pomalé):\n"
" /list\n"
" vypsat kanál #weechat:\n"
" /list #weechat\n"
" vypsat všechny kanály začínající na \"#weechat\" (na velkých sítích může "
"být velmi pomalé):\n"
" /list -re #weechat.*"

msgid "get statistics about the size of the IRC network"
msgstr "získat statistiku o velikosti IRC sítě"
Expand Down Expand Up @@ -9146,6 +9189,21 @@ msgstr ""
"kanálu nezačíná se správným znakem druhu kanálu na serveru; například: \"/"
"join weechat\" ve skutečnosti odešle: \"/join #weechat\""

msgid "left/right scroll in /list buffer (percent of width)"
msgstr ""

msgid ""
"comma-separated list of fields to sort channels (see /help list for a list "
"of fields); char \"-\" can be used before field to reverse order, char \"~\" "
"can be used to do a case insensitive comparison; example: \"-count,~name\" "
"for biggest channels first then case insensitive sort on name"
msgstr ""

#, fuzzy
#| msgid "text color in script buffer"
msgid "strip channel topic colors in /list buffer"
msgstr "barva textu v skript buferu"

msgid ""
"default target buffer for msgbuffer options when target is private and that "
"private buffer is not found"
Expand All @@ -9162,6 +9220,20 @@ msgstr ""
"by být poslední buffer), next = aktuální buffer + 1, near_server = za "
"posledním kanálem/pv serveru)"

#, fuzzy
#| msgid ""
#| "force position of new private in list of buffers (none = default position "
#| "(should be last buffer), next = current buffer + 1, near_server = after "
#| "last channel/pv of server)"
msgid ""
"force position of new /list buffer in list of buffers (none = default "
"position (should be last buffer), next = current buffer + 1, near_server = "
"after last channel/pv of server)"
msgstr ""
"vynutit pozici nového soukroméno bufferu v seznamu bufferů (none = výchozí "
"pozice (měl by být poslední buffer), next = aktuální buffer + 1, near_server "
"= za posledním kanálem/pv serveru)"

msgid ""
"force position of new private in list of buffers (none = default position "
"(should be last buffer), next = current buffer + 1, near_server = after last "
Expand Down Expand Up @@ -9378,6 +9450,14 @@ msgstr "barva přípony přezdívky (přípona je uživatelský řetězec za př
msgid "color for higher supported TLS version in bar item \"tls_version\""
msgstr "barva přípony přezdívky (přípona je uživatelský řetězec za přezdívkou)"

#, fuzzy
msgid "color for selected line on /list buffer"
msgstr "barva textu řádku vybraného klienta"

#, fuzzy
msgid "background color for selected line on /list buffer"
msgstr "barva textu řádku vybraného klienta"

#, fuzzy
msgid "color for text in account messages"
msgstr "barva textu vezprávách připojení"
Expand Down Expand Up @@ -9784,6 +9864,12 @@ msgstr "irc server"
msgid "irc batch"
msgstr "irc kanál"

msgid "irc channel on /list buffer"
msgstr ""

msgid "irc data for /list buffer"
msgstr ""

#, c-format
msgid "%sCTCP query to %s%s%s: %s%s%s%s%s"
msgstr "%sCTCP dotaz pro %s%s%s: %s%s%s%s%s"
Expand All @@ -9796,6 +9882,17 @@ msgstr "%s%s: nejste připojen k serveru"
msgid "%s%s: this buffer is not a channel!"
msgstr "%s%s: tenhle buffer není kanál!"

#, c-format
msgid ""
"%d channels (total: %d) | Filter: %s | Sort: %s | Key(input): ctrl+j=join "
"channel, ($)=refresh, (q)=close buffer"
msgstr ""

#, fuzzy, c-format
#| msgid "%s%s: error in function \"%s\""
msgid "%s%s: error in redirection of /list: %s"
msgstr "%s%s: chyba ve funkci \"%s\""

#, fuzzy, c-format
msgid "%s%s: cannot allocate new modelist"
msgstr "%s%s: nemohu přidělit nový kanál"
Expand Down Expand Up @@ -14212,3 +14309,42 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"

#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "sekce konfigu"

#, fuzzy
#~ msgid "background color for selected line"
#~ msgstr "barva textu řádku vybraného klienta"

#, fuzzy
#~ msgid ""
#~ " server: send to this server (internal name)\n"
#~ " regex: POSIX extended regular expression used to filter results (case "
#~ "insensitive, can start by \"(?-i)\" to become case sensitive)\n"
#~ "channel: channel to list\n"
#~ " target: server name\n"
#~ "\n"
#~ "Examples:\n"
#~ " list all channels on server (can be very slow on large networks):\n"
#~ " /list\n"
#~ " list channel #weechat:\n"
#~ " /list #weechat\n"
#~ " list all channels beginning with \"#weechat\" (can be very slow on "
#~ "large networks):\n"
#~ " /list -re #weechat.*"
#~ msgstr ""
#~ " kanál: kanál, který vypsat\n"
#~ "server: jméno serveru\n"
#~ "regexp: regulární výraz pro filtrování výsledků\n"
#~ "\n"
#~ "Příklady:\n"
#~ " vypsat všechny kanály na serveru (na velkých sítích může být velmi "
#~ "pomalé):\n"
#~ " /list\n"
#~ " vypsat kanál #weechat:\n"
#~ " /list #weechat\n"
#~ " vypsat všechny kanály začínající na \"#weechat\" (na velkých sítích "
#~ "může být velmi pomalé):\n"
#~ " /list -re #weechat.*"

0 comments on commit 2f1de09

Please sign in to comment.