diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-10-19 21:51:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-10-19 21:51:00 +0200 |
commit | 534dda90942c74b1666c7a5b5e2d88abde49ff74 (patch) | |
tree | 67dfec2fde5c947d5c4cbcc8386113965244e775 | |
parent | b82ce1e15d18348d0bb765f2c5fd1faa6f6dc356 (diff) | |
download | weechat-534dda90942c74b1666c7a5b5e2d88abde49ff74.zip |
buflist: add two new bar items using the same format configuration options (closes #990)
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/autogen/user/buflist_commands.adoc | 58 | ||||
-rw-r--r-- | doc/en/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/fr/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/it/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/ja/autogen/user/buflist_commands.adoc | 58 | ||||
-rw-r--r-- | doc/pl/autogen/user/buflist_commands.adoc | 58 | ||||
-rw-r--r-- | po/cs.po | 8 | ||||
-rw-r--r-- | po/de.po | 9 | ||||
-rw-r--r-- | po/es.po | 8 | ||||
-rw-r--r-- | po/fr.po | 94 | ||||
-rw-r--r-- | po/hu.po | 8 | ||||
-rw-r--r-- | po/it.po | 8 | ||||
-rw-r--r-- | po/ja.po | 9 | ||||
-rw-r--r-- | po/pl.po | 9 | ||||
-rw-r--r-- | po/pt.po | 8 | ||||
-rw-r--r-- | po/pt_BR.po | 8 | ||||
-rw-r--r-- | po/ru.po | 8 | ||||
-rw-r--r-- | po/tr.po | 8 | ||||
-rw-r--r-- | po/weechat.pot | 8 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.c | 139 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.h | 8 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-command.c | 8 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-config.c | 14 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-mouse.c | 24 | ||||
-rw-r--r-- | src/plugins/buflist/buflist.c | 25 | ||||
-rw-r--r-- | src/plugins/buflist/buflist.h | 1 |
27 files changed, 400 insertions, 199 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index db3b9d99d..e212023f4 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -24,6 +24,7 @@ New features:: * core: add signals "buffer_filters_enabled" and "buffer_filters_disabled" * core: support loading of plugins from path in environment variable "WEECHAT_EXTRA_LIBDIR" (issue #971, issue #979) * alias: add infolist "alias_default" (list of default aliases) + * buflist: add two new bar items ("buflist2" and "buflist3") using the same format configuration options (issue #990) * buflist: add option buflist.look.add_newline (issue #1027) * fset: new plugin "fset" (fast set of WeeChat and plugins options) * php: new plugin "php" (issue #909) diff --git a/doc/de/autogen/user/buflist_commands.adoc b/doc/de/autogen/user/buflist_commands.adoc index bd8778e9a..666edb2c5 100644 --- a/doc/de/autogen/user/buflist_commands.adoc +++ b/doc/de/autogen/user/buflist_commands.adoc @@ -9,39 +9,41 @@ /buflist bar refresh - bar: fügt eine "buflist" Bar hinzu -refresh: erzwingt eine Aktualisierung des "buflist" Bar-Item + 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: - - buffer data (siehe hdata "buffer" 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} + - 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 Numer 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 - - ${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 + - ${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 65c80ea58..d53477ff8 100644 --- a/doc/en/autogen/user/buflist_commands.adoc +++ b/doc/en/autogen/user/buflist_commands.adoc @@ -10,7 +10,7 @@ refresh bar: add the "buflist" bar -refresh: force the refresh of the "buflist" bar item +refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) 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 @@ -18,6 +18,8 @@ The lines with buffers are displayed using string evaluation (see /help eval for - buflist.format.buffer_current: format for the current buffer 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} - buffer data (see hdata "buffer" in API doc for a complete list), for example: - ${buffer.number} - ${buffer.name} diff --git a/doc/fr/autogen/user/buflist_commands.adoc b/doc/fr/autogen/user/buflist_commands.adoc index 27b7c8e3d..c69fdbede 100644 --- a/doc/fr/autogen/user/buflist_commands.adoc +++ b/doc/fr/autogen/user/buflist_commands.adoc @@ -10,7 +10,7 @@ refresh bar : ajouter la barre "buflist" -refresh : forcer le rafraichissement de l'objet de barre "buflist" +refresh : forcer le rafraichissement des objets de barre (buflist, buflist2 et buflist3) Les lignes avec les tampons sont affichées en utilisant l'évaluation de chaînes (voir /help eval pour le format), avec ces options : - buflist.look.display_conditions : conditions pour afficher un tampon dans la liste @@ -18,6 +18,8 @@ Les lignes avec les tampons sont affichées en utilisant l'évaluation de chaîn - buflist.format.buffer_current: format pour le tampon courant Les variables suivantes peuvent être utilisées dans ces options : + - données de l'objet de barre (voir le hdata "bar_item" dans la doc API pour une liste complète), par exemple : + - ${bar_item.name} - données du tampon (voir le hdata "buffer" dans la doc API pour une liste complète), par exemple : - ${buffer.number} - ${buffer.name} diff --git a/doc/it/autogen/user/buflist_commands.adoc b/doc/it/autogen/user/buflist_commands.adoc index 65c80ea58..d53477ff8 100644 --- a/doc/it/autogen/user/buflist_commands.adoc +++ b/doc/it/autogen/user/buflist_commands.adoc @@ -10,7 +10,7 @@ refresh bar: add the "buflist" bar -refresh: force the refresh of the "buflist" bar item +refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) 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 @@ -18,6 +18,8 @@ The lines with buffers are displayed using string evaluation (see /help eval for - buflist.format.buffer_current: format for the current buffer 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} - buffer data (see hdata "buffer" in API doc for a complete list), for example: - ${buffer.number} - ${buffer.name} diff --git a/doc/ja/autogen/user/buflist_commands.adoc b/doc/ja/autogen/user/buflist_commands.adoc index 202a862d7..70fe22a8f 100644 --- a/doc/ja/autogen/user/buflist_commands.adoc +++ b/doc/ja/autogen/user/buflist_commands.adoc @@ -9,39 +9,41 @@ /buflist bar refresh - bar: "buflist" バーを追加します -refresh: 強制的に "buflist" バー要素の内容を最新の状態に更新します + bar: add the "buflist" bar +refresh: force the refresh of the bar items (buflist, buflist2 and buflist3) -各バッファエントリは文字列評価 (書式は /help eval を参照してください) を使って表示されます、以下のオプションで指定します: - - buflist.look.display_conditions: バッファをリスト内に表示する条件 - - buflist.format.buffer: 現在のバッファ以外のバッファを表示する書式 - - buflist.format.buffer_current: 現在のバッファを表示する書式 +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 -以下は上記オプションで使用可能な変数です: - - バッファデータ (完全なリストは API リファレンスの hdata "buffer" を参照してください)、例: +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} + - 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 サーバデータ、IRC バッファのみで定義 (API リファレンスの hdata "irc_server" を参照してください) - - irc_channel: IRC チャンネルデータ、IRC チャンネルバッファのみで定義 (API リファレンスの hdata "irc_channel" を参照してください) - - buflist プラグインが利便性向上の目的で追加した変数: - - ${format_buffer}: buflist.format.buffer オプションの評価結果; 例えば単に背景色を変えるなどの目的で、この変数を buflist.format.buffer_current オプションの中で使うことも可能です。 - - ${current_buffer}: ブール値 ("0" または "1")、対象のバッファが現在のバッファの場合に "1"; 次のように条件中で使うことができます: ${if:${current_buffer}?...:...} - - ${merged}: ブール値 ("0" または "1")、対象のバッファが他のバッファとマージされていた場合に "1"; 次のように条件中で使うことができます: ${if:${merged}?...:...} - - ${format_number}: 区切り文字を付けたインデント済み番号 (buflist.format.number オプションの評価結果) - - ${number}: インデント済み番号、例えば 10 から 99 番のバッファがある場合に " 1" - - ${number_displayed}: 番号が表示される場合に "1"、それ以外の場合に "0" - - ${indent}: 名前用のインデント (チャンネルとプライベートバッファがインデントされます) - - ${format_nick_prefix}: チャンネルにおける色付きニックネームプレフィックス (buflist.format.nick_prefix オプションの評価結果) - - ${color_nick_prefix}: チャンネルにおけるニックネームプレフィックスの色 (buflist.look.nick_prefix オプションが有効化された場合のみ設定されます) - - ${nick_prefix}: チャンネルにおけるニックネームプレフィックス (buflist.look.nick_prefix オプションが有効化された場合のみ設定されます) - - ${format_name}: 書式化済みのニックネーム (buflist.format.name オプションを評価した後の値) - - ${name}: 短縮名 (設定済みの場合)、未設定の場合には名前 - - ${color_hotlist}: 対象バッファのホットリストレベルの最大値に対応する色 (buflist.format.hotlist_xxx オプションの評価結果、xxx がレベル) - - ${format_hotlist}: 評価後のホットリスト (buflist.format.hotlist オプションの評価結果) - - ${hotlist}: 評価前のホットリスト - - ${hotlist_priority}: "none"、"low"、"message"、"private"、"highlight" - - ${format_lag}: IRC サーババッファの遅延時間、遅延がない場合は空 (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 + - ${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/pl/autogen/user/buflist_commands.adoc b/doc/pl/autogen/user/buflist_commands.adoc index de3ccffaa..4f67757d7 100644 --- a/doc/pl/autogen/user/buflist_commands.adoc +++ b/doc/pl/autogen/user/buflist_commands.adoc @@ -9,39 +9,41 @@ /buflist bar refresh - bar: dodaje pasek "buflist" -refresh: wymusza odświeżenie elementu paska "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świetlnia 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 buforu (zobacz hdata "buffer" w dokumentacji API dla pełnej listy zmiennych), 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} + - 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 watość 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 - - ${number_displayed}: "1" jeśłi 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}: zformatowana 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 hotlity dla bufora (przetworzona opcja buflist.format.hotlist_xxx, gdziexxx to poziom) - - ${format_hotlist}: zformatowana 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 + - ${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) ---- @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:12+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4942,7 +4942,8 @@ msgstr "seznam bufferů" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -4952,6 +4953,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 22:01+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -5844,9 +5844,11 @@ msgstr "" msgid "bar item with list of buffers" msgstr "Bar-Item mit der Liste von Buffern" +#, fuzzy msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5856,6 +5858,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:12+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5156,7 +5156,8 @@ msgstr "lista de buffers" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5166,6 +5167,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" -"PO-Revision-Date: 2017-10-17 20:12+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" +"PO-Revision-Date: 2017-10-18 20:29+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -1620,9 +1620,13 @@ msgid "" " /eval -n -c abcd =* a*d ==> 1" msgstr "" " -n : afficher le résultat sans envoyer au tampon (mode debug)\n" -" -s : découper l'expression avant de l'évaluer (plusieurs commandes peuvent être séparées par des points-virgules)\n" -" -c : évaluer comme une condition : utiliser les opérateurs et les parenthèses, retourner une valeur booléenne (\"0\" ou \"1\")\n" -"expression : expression à évaluer, les variables avec le format ${variable} sont remplacées (voir ci-dessous) ; plusieurs commandes peuvent être séparées par des points-virgules\n" +" -s : découper l'expression avant de l'évaluer (plusieurs commandes " +"peuvent être séparées par des points-virgules)\n" +" -c : évaluer comme une condition : utiliser les opérateurs et les " +"parenthèses, retourner une valeur booléenne (\"0\" ou \"1\")\n" +"expression : expression à évaluer, les variables avec le format ${variable} " +"sont remplacées (voir ci-dessous) ; plusieurs commandes peuvent être " +"séparées par des points-virgules\n" " opérateur : un opérateur logique ou de comparaison :\n" " - opérateurs logiques :\n" " && \"et\" booléen\n" @@ -1635,41 +1639,65 @@ msgstr "" " >= supérieur ou égal\n" " > supérieur\n" " =~ correspond à l'expression régulière POSIX étendue\n" -" !~ ne correspond PAS à l'expression régulière POSIX étendue\n" -" =* correspond au masque (le caractère joker \"*\" est autorisé)\n" -" != ne correspond PAS au masque (le caractère joker \"*\" est autorisé)\n" +" !~ ne correspond PAS à l'expression régulière POSIX " +"étendue\n" +" =* correspond au masque (le caractère joker \"*\" est " +"autorisé)\n" +" != ne correspond PAS au masque (le caractère joker \"*\" " +"est autorisé)\n" "\n" -"Une expression est considérée comme \"vraie\" si elle est non NULL, non vide, et différente de \"0\".\n" -"La comparaison est faite en utilisant des nombres à virgule si les deux expressions sont des nombres valides, avec l'un de ces formats :\n" +"Une expression est considérée comme \"vraie\" si elle est non NULL, non " +"vide, et différente de \"0\".\n" +"La comparaison est faite en utilisant des nombres à virgule si les deux " +"expressions sont des nombres valides, avec l'un de ces formats :\n" " - entier (exemples : 5, -7)\n" " - nombre à virgule (exemples : 5.2, -7.5, 2.83e-2)\n" " - nombre hexadécimal (exemples : 0xA3, -0xA3)\n" -"Pour forcer une comparaison de chaînes, vous pouvez ajouter des guillemets autour de chaque expression, par exemple :\n" +"Pour forcer une comparaison de chaînes, vous pouvez ajouter des guillemets " +"autour de chaque expression, par exemple :\n" " 50 > 100 ==> 0\n" " \"50\" > \"100\" ==> 1\n" "\n" -"Des variables sont remplacées dans l'expression, en utilisant le format ${variable}, la variable pouvant être, par ordre de priorité :\n" +"Des variables sont remplacées dans l'expression, en utilisant le format " +"${variable}, la variable pouvant être, par ordre de priorité :\n" " 1. une sous-chaîne évaluée (format : \"eval:xxx\")\n" -" 2. une chaîne avec les caractères échappés (format : \"esc:xxx\" ou \"\\xxx\")\n" -" 3. une chaîne avec des caractères à cacher (format : \"hide:caractère,chaîne\")\n" -" 4. une chaîne avec un maximum de caractères (format : \"cut:max,suffixe,chaîne\" ou \"cut:+max,suffixe,chaîne\")\n" -" ou un maximum de caractères affichés à l'écran (format : \"cutscr:max,suffixe,chaîne\" ou \"cutscr:+max,suffixe,chaîne\")\n" -" 5. une couleur (format : \"color:xxx\", voir la \"Référence API extension\", fonction \"color\")\n" -" 6. une info (format : \"info:nom,paramètres\", les paramètres sont optionnels)\n" +" 2. une chaîne avec les caractères échappés (format : \"esc:xxx\" ou \"\\xxx" +"\")\n" +" 3. une chaîne avec des caractères à cacher (format : \"hide:caractère," +"chaîne\")\n" +" 4. une chaîne avec un maximum de caractères (format : \"cut:max,suffixe," +"chaîne\" ou \"cut:+max,suffixe,chaîne\")\n" +" ou un maximum de caractères affichés à l'écran (format : \"cutscr:max," +"suffixe,chaîne\" ou \"cutscr:+max,suffixe,chaîne\")\n" +" 5. une couleur (format : \"color:xxx\", voir la \"Référence API extension" +"\", fonction \"color\")\n" +" 6. une info (format : \"info:nom,paramètres\", les paramètres sont " +"optionnels)\n" " 7. la date/heure courante (format : \"date\" ou \"date:format\")\n" " 8. une variable d'environnement (format : \"env:XXX\")\n" -" 9. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:valeur_si_faux\")\n" +" 9. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:" +"valeur_si_faux\")\n" " 10. une option (format : \"fichier.section.option\")\n" " 11. une variable locale du tampon\n" -" 12. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut \"window\" et \"buffer\" pointent vers la fenêtre et le tampon courants.\n" +" 12. un hdata/variable (la valeur est automatiquement convertie en chaîne), " +"par défaut \"window\" et \"buffer\" pointent vers la fenêtre et le tampon " +"courants.\n" "Le format du hdata peut être le suivant :\n" -" hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)\n" -" hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste, par exemple :\n" -" ${buffer[gui_buffers].full_name} : nom complet du premier tampon dans la liste chaînée des tampons\n" -" ${plugin[weechat_plugins].name} : nom de la première extension dans la liste chaînée des extensions\n" -" hdata[pointeur].var1.var2... : démarrer avec un hdata en utilisant un pointeur, par exemple :\n" -" ${buffer[0x1234abcd].full_name} : nom complet du tampon avec ce pointeur (peut être utilisé dans les triggers)\n" -"Pour le nom du hdata et des variables, voir la \"Référence API extension\", fonction \"weechat_hdata_get\".\n" +" hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), " +"et demander les variables l'une après l'autre (d'autres hdata peuvent être " +"suivis)\n" +" hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste, " +"par exemple :\n" +" ${buffer[gui_buffers].full_name} : nom complet du premier tampon dans la " +"liste chaînée des tampons\n" +" ${plugin[weechat_plugins].name} : nom de la première extension dans la " +"liste chaînée des extensions\n" +" hdata[pointeur].var1.var2... : démarrer avec un hdata en utilisant un " +"pointeur, par exemple :\n" +" ${buffer[0x1234abcd].full_name} : nom complet du tampon avec ce pointeur " +"(peut être utilisé dans les triggers)\n" +"Pour le nom du hdata et des variables, voir la \"Référence API extension\", " +"fonction \"weechat_hdata_get\".\n" "\n" "Exemples (chaînes simples) :\n" " /eval -n ${info:version} ==> 0.4.3\n" @@ -5688,7 +5716,8 @@ msgstr "objet de barre avec la liste des tampons" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5698,6 +5727,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -5748,7 +5780,8 @@ msgid "" "lag (evaluation of option buflist.format.lag)" msgstr "" " bar : ajouter la barre \"buflist\"\n" -"refresh : forcer le rafraichissement de l'objet de barre \"buflist\"\n" +"refresh : forcer le rafraichissement des objets de barre (buflist, buflist2 " +"et buflist3)\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" @@ -5759,6 +5792,9 @@ msgstr "" " - buflist.format.buffer_current: format pour le tampon courant\n" "\n" "Les variables suivantes peuvent être utilisées dans ces options :\n" +" - données de l'objet de barre (voir le hdata \"bar_item\" dans la doc API " +"pour une liste complète), par exemple :\n" +" - ${bar_item.name}\n" " - données du tampon (voir le hdata \"buffer\" dans la doc API pour une " "liste complète), par exemple :\n" " - ${buffer.number}\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4479,7 +4479,8 @@ msgstr "Aliaszok listája:\n" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -4489,6 +4490,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5294,7 +5294,8 @@ msgstr "elenco dei buffer" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5304,6 +5305,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -5448,9 +5448,11 @@ msgstr "" msgid "bar item with list of buffers" msgstr "バッファのリストを表示するバー要素" +#, fuzzy msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5460,6 +5462,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5579,9 +5579,11 @@ msgstr "" msgid "bar item with list of buffers" msgstr "element paska z listą buforów" +#, fuzzy msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5591,6 +5593,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -5552,7 +5552,8 @@ msgstr "lista de buffers" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5562,6 +5563,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index b8c2fc18a..61dff2859 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: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5096,7 +5096,8 @@ msgstr "lista de buffers" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -5106,6 +5107,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-10-17 20:14+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4517,7 +4517,8 @@ msgstr "Список сокращений:\n" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -4527,6 +4528,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+0200\n" "PO-Revision-Date: 2017-06-26 23:33+0200\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4084,7 +4084,8 @@ msgstr "" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -4094,6 +4095,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" diff --git a/po/weechat.pot b/po/weechat.pot index a9d4114e7..e6e389cc7 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: 2017-10-17 16:39+0200\n" +"POT-Creation-Date: 2017-10-18 20:22+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" @@ -4067,7 +4067,8 @@ msgstr "" msgid "" " bar: add the \"buflist\" bar\n" -"refresh: force the refresh of the \"buflist\" bar item\n" +"refresh: force the refresh of the bar items (buflist, buflist2 and " +"buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation (see /help eval " "for the format), with these options:\n" @@ -4077,6 +4078,9 @@ msgid "" " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete list), for " "example:\n" " - ${buffer.number}\n" diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 6d73779a3..f4ccccb5b 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -29,31 +29,81 @@ #include "buflist-config.h" -struct t_gui_bar_item *buflist_bar_item_buflist = NULL; +struct t_gui_bar_item *buflist_bar_item_buflist[BUFLIST_BAR_NUM_ITEMS]; struct t_hashtable *buflist_hashtable_pointers = NULL; struct t_hashtable *buflist_hashtable_extra_vars = NULL; struct t_hashtable *buflist_hashtable_options_conditions = NULL; -struct t_arraylist *buflist_list_buffers = NULL; +struct t_arraylist *buflist_list_buffers[BUFLIST_BAR_NUM_ITEMS]; -int old_line_number_current_buffer = -1; +int old_line_number_current_buffer[BUFLIST_BAR_NUM_ITEMS]; /* - * Updates buflist bar item if buflist is enabled. + * Returns the bar item name with an index. + */ + +const char * +buflist_bar_item_get_name (int index) +{ + static char item_name[16]; + + if (index == 0) + { + snprintf (item_name, sizeof (item_name), "%s", BUFLIST_BAR_ITEM_NAME); + } + else + { + snprintf (item_name, sizeof (item_name), + "%s%d", + BUFLIST_BAR_ITEM_NAME, + index + 1); + } + return item_name; +} + +/* + * Returns the bar item index with an item name, -1 if not found. + */ + +int +buflist_bar_item_get_index (const char *item_name) +{ + int i; + const char *ptr_item_name; + + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + ptr_item_name = buflist_bar_item_get_name (i); + if (strcmp (ptr_item_name, item_name) == 0) + return i; + } + + return -1; +} + +/* + * Updates buflist bar item if buflist is enabled (or if force argument is 1). */ void -buflist_bar_item_update () +buflist_bar_item_update (int force) { - if (weechat_config_boolean (buflist_config_look_enabled)) - weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); + int i; + + if (force || weechat_config_boolean (buflist_config_look_enabled)) + { + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + weechat_bar_item_update (buflist_bar_item_get_name (i)); + } + } } /* * Checks if the bar can be scrolled, the bar must have: * - a position "left" or "right" * - a filling "vertical" - * - "buflist" as first item. + * - the item_name as first item. * * Returns: * 1: bar can be scrolled @@ -61,7 +111,7 @@ buflist_bar_item_update () */ int -buflist_bar_item_bar_can_scroll (struct t_gui_bar *bar) +buflist_bar_item_bar_can_scroll (struct t_gui_bar *bar, const char *item_name) { const char *ptr_bar_name, *ptr_bar_position, *ptr_bar_filling; int items_count, *items_subcount; @@ -104,7 +154,7 @@ buflist_bar_item_bar_can_scroll (struct t_gui_bar *bar) return 0; items_name = weechat_hdata_pointer (buflist_hdata_bar, bar, "items_name"); if (!items_name || !items_name[0] || !items_name[0][0] - || (strcmp (items_name[0][0], BUFLIST_BAR_ITEM_NAME) != 0)) + || (strcmp (items_name[0][0], item_name) != 0)) { return 0; } @@ -156,11 +206,11 @@ buflist_bar_item_auto_scroll_bar_window (struct t_gui_bar_window *bar_window, } /* - * Auto-scrolls all bars with buflist item as first item. + * Auto-scrolls all bars with a given buflist item as first item. */ void -buflist_bar_item_auto_scroll (int line_number) +buflist_bar_item_auto_scroll (const char *item_name, int line_number) { struct t_gui_bar *ptr_bar; struct t_gui_bar_window *ptr_bar_window; @@ -175,7 +225,8 @@ buflist_bar_item_auto_scroll (int line_number) { ptr_bar_window = weechat_hdata_pointer (buflist_hdata_bar, ptr_bar, "bar_window"); - if (ptr_bar_window && buflist_bar_item_bar_can_scroll (ptr_bar)) + if (ptr_bar_window && buflist_bar_item_bar_can_scroll (ptr_bar, + item_name)) { buflist_bar_item_auto_scroll_bar_window (ptr_bar_window, line_number); @@ -193,7 +244,7 @@ buflist_bar_item_auto_scroll (int line_number) { ptr_bar = weechat_hdata_pointer (buflist_hdata_bar_window, ptr_bar_window, "bar"); - if (buflist_bar_item_bar_can_scroll (ptr_bar)) + if (buflist_bar_item_bar_can_scroll (ptr_bar, item_name)) { buflist_bar_item_auto_scroll_bar_window (ptr_bar_window, line_number); @@ -234,15 +285,13 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, const char *hotlist_priority[4] = { "low", "message", "private", "highlight" }; const char indent_empty[1] = { '\0' }; - const char *ptr_lag; - int num_buffers, is_channel, is_private; + const char *ptr_lag, *ptr_item_name; + int item_index, num_buffers, is_channel, is_private; int i, j, length_max_number, current_buffer, number, prev_number, priority; int rc, count, line_number, line_number_current_buffer; /* make C compiler happy */ - (void) pointer; (void) data; - (void) item; (void) window; (void) buffer; (void) extra_info; @@ -256,6 +305,10 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, buflist = weechat_string_dyn_alloc (256); + item_index = (int)((unsigned long)pointer); + + weechat_hashtable_set (buflist_hashtable_pointers, "bar_item", item); + ptr_format = buflist_config_format_buffer_eval; ptr_format_current = buflist_config_format_buffer_current_eval; @@ -273,10 +326,11 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, snprintf (str_format_number_empty, sizeof (str_format_number_empty), "%%-%ds", length_max_number); - if (buflist_list_buffers) - weechat_arraylist_free (buflist_list_buffers); - buflist_list_buffers = weechat_arraylist_new (16, 0, 1, - NULL, NULL, NULL, NULL); + if (buflist_list_buffers[item_index]) + weechat_arraylist_free (buflist_list_buffers[item_index]); + buflist_list_buffers[item_index] = weechat_arraylist_new ( + 16, 0, 1, + NULL, NULL, NULL, NULL); buffers = buflist_sort_buffers (); @@ -308,7 +362,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, if (!rc) continue; - weechat_arraylist_add (buflist_list_buffers, ptr_buffer); + weechat_arraylist_add (buflist_list_buffers[item_index], ptr_buffer); current_buffer = (ptr_buffer == ptr_current_buffer); @@ -555,12 +609,15 @@ end: weechat_string_dyn_free (buflist, 0); weechat_arraylist_free (buffers); - if ((line_number_current_buffer != old_line_number_current_buffer) + if ((line_number_current_buffer != old_line_number_current_buffer[item_index]) && (weechat_config_integer (buflist_config_look_auto_scroll) >= 0)) { - buflist_bar_item_auto_scroll (line_number_current_buffer); + ptr_item_name = weechat_hdata_string (buflist_hdata_bar_item, + item, "name"); + buflist_bar_item_auto_scroll (ptr_item_name, + line_number_current_buffer); } - old_line_number_current_buffer = line_number_current_buffer; + old_line_number_current_buffer[item_index] = line_number_current_buffer; return str_buflist; } @@ -576,6 +633,8 @@ end: int buflist_bar_item_init () { + int i; + /* create hashtables used by the bar item callback */ buflist_hashtable_pointers = weechat_hashtable_new ( 32, @@ -613,9 +672,15 @@ buflist_bar_item_init () "type", "condition"); /* bar items */ - buflist_bar_item_buflist = weechat_bar_item_new ( - BUFLIST_BAR_ITEM_NAME, - &buflist_bar_item_buflist_cb, NULL, NULL); + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + buflist_list_buffers[i] = NULL; + old_line_number_current_buffer[i] = -1; + buflist_bar_item_buflist[i] = weechat_bar_item_new ( + buflist_bar_item_get_name (i), + &buflist_bar_item_buflist_cb, + (const void *)((long unsigned)i), NULL); + } return 1; } @@ -627,7 +692,12 @@ buflist_bar_item_init () void buflist_bar_item_end () { - weechat_bar_item_remove (buflist_bar_item_buflist); + int i; + + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + weechat_bar_item_remove (buflist_bar_item_buflist[i]); + } weechat_hashtable_free (buflist_hashtable_pointers); buflist_hashtable_pointers = NULL; @@ -638,9 +708,12 @@ buflist_bar_item_end () weechat_hashtable_free (buflist_hashtable_options_conditions); buflist_hashtable_options_conditions = NULL; - if (buflist_list_buffers) + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) { - weechat_arraylist_free (buflist_list_buffers); - buflist_list_buffers = NULL; + if (buflist_list_buffers[i]) + { + weechat_arraylist_free (buflist_list_buffers[i]); + buflist_list_buffers[i] = NULL; + } } } diff --git a/src/plugins/buflist/buflist-bar-item.h b/src/plugins/buflist/buflist-bar-item.h index a3a9df5cc..ddb7af047 100644 --- a/src/plugins/buflist/buflist-bar-item.h +++ b/src/plugins/buflist/buflist-bar-item.h @@ -22,9 +22,13 @@ #define BUFLIST_BAR_ITEM_NAME "buflist" -extern struct t_arraylist *buflist_list_buffers; +#define BUFLIST_BAR_NUM_ITEMS 3 -extern void buflist_bar_item_update (); +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 void buflist_bar_item_update (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 13b779fdf..02b4ec8ac 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -53,7 +53,7 @@ buflist_command_buflist (const void *pointer, void *data, if (weechat_strcasecmp (argv[1], "refresh") == 0) { - buflist_bar_item_update (); + buflist_bar_item_update (0); return WEECHAT_RC_OK; } @@ -72,7 +72,8 @@ buflist_command_init () N_("bar item with list of buffers"), "bar || refresh", N_(" bar: add the \"buflist\" bar\n" - "refresh: force the refresh of the \"buflist\" bar item\n" + "refresh: force the refresh of the bar items (buflist, buflist2 " + "and buflist3)\n" "\n" "The lines with buffers are displayed using string evaluation " "(see /help eval for the format), with these options:\n" @@ -83,6 +84,9 @@ buflist_command_init () " - 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" " - buffer data (see hdata \"buffer\" in API doc for a complete " "list), for example:\n" " - ${buffer.number}\n" diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c index 5f03c1713..3ee039be3 100644 --- a/src/plugins/buflist/buflist-config.c +++ b/src/plugins/buflist/buflist-config.c @@ -127,7 +127,7 @@ buflist_config_signal_buffer_cb (const void *pointer, void *data, (void) type_data; (void) signal_data; - buflist_bar_item_update (); + buflist_bar_item_update (0); return WEECHAT_RC_OK; } @@ -228,13 +228,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 (); + buflist_bar_item_update (0); } else { /* buflist disabled */ weechat_command (NULL, "/mute /bar hide buflist"); - weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); + buflist_bar_item_update (1); } } @@ -258,7 +258,7 @@ buflist_config_change_sort (const void *pointer, void *data, weechat_config_string (buflist_config_look_sort), ",", 0, 0, &buflist_config_sort_fields_count); - buflist_bar_item_update (); + buflist_bar_item_update (0); } /* @@ -292,7 +292,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 (); + buflist_bar_item_update (0); } /* @@ -308,7 +308,7 @@ buflist_config_change_buflist (const void *pointer, void *data, (void) data; (void) option; - buflist_bar_item_update (); + buflist_bar_item_update (0); } /* @@ -369,7 +369,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 (); + buflist_bar_item_update (0); } /* diff --git a/src/plugins/buflist/buflist-mouse.c b/src/plugins/buflist/buflist-mouse.c index 546db17ec..2aa41d021 100644 --- a/src/plugins/buflist/buflist-mouse.c +++ b/src/plugins/buflist/buflist-mouse.c @@ -40,7 +40,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info) const char *ptr_bar_item_name, *ptr_bar_item_line, *keys, *ptr_value; long item_line; char *error, str_value[128], **list_keys; - int i, num_keys, type; + int i, item_index, num_keys, type; struct t_gui_buffer *ptr_buffer; /* make C compiler happy */ @@ -49,12 +49,13 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info) ptr_buffer = NULL; - if (!buflist_list_buffers) - goto end; - /* check bar item name */ ptr_bar_item_name = weechat_hashtable_get (info, "_bar_item_name"); - if (strcmp (ptr_bar_item_name, BUFLIST_BAR_ITEM_NAME) != 0) + item_index = buflist_bar_item_get_index (ptr_bar_item_name); + if (item_index < 0) + goto end; + + if (!buflist_list_buffers[item_index]) goto end; /* check bar item line */ @@ -65,13 +66,14 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info) if (!error || error[0]) goto end; if ((item_line < 0) - || (item_line >= weechat_arraylist_size (buflist_list_buffers))) + || (item_line >= weechat_arraylist_size (buflist_list_buffers[item_index]))) { goto end; } /* check if buffer pointer is still valid */ - ptr_buffer = weechat_arraylist_get (buflist_list_buffers, item_line); + ptr_buffer = weechat_arraylist_get (buflist_list_buffers[item_index], + item_line); if (!ptr_buffer) goto end; if (!weechat_hdata_check_pointer ( @@ -321,7 +323,13 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal, int buflist_mouse_init () { - weechat_hook_focus (BUFLIST_BAR_ITEM_NAME, &buflist_focus_cb, NULL, NULL); + int i; + + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + weechat_hook_focus (buflist_bar_item_get_name (i), + &buflist_focus_cb, NULL, NULL); + } weechat_hook_hsignal(BUFLIST_MOUSE_HSIGNAL, &buflist_hsignal_cb, NULL, NULL); diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c index eaaec6d9a..839513b58 100644 --- a/src/plugins/buflist/buflist.c +++ b/src/plugins/buflist/buflist.c @@ -44,6 +44,7 @@ struct t_hdata *buflist_hdata_window = NULL; struct t_hdata *buflist_hdata_buffer = NULL; struct t_hdata *buflist_hdata_hotlist = NULL; struct t_hdata *buflist_hdata_bar = NULL; +struct t_hdata *buflist_hdata_bar_item = NULL; struct t_hdata *buflist_hdata_bar_window = NULL; @@ -403,6 +404,8 @@ int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { struct t_hashtable *keys; + char str_key[256]; + int i; /* make C compiler happy */ (void) argc; @@ -414,6 +417,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) buflist_hdata_buffer = weechat_hdata_get ("buffer"); buflist_hdata_hotlist = weechat_hdata_get ("hotlist"); buflist_hdata_bar = weechat_hdata_get ("bar"); + buflist_hdata_bar_item = weechat_hdata_get ("bar_item"); buflist_hdata_bar_window = weechat_hdata_get ("bar_window"); if (!buflist_config_init ()) @@ -429,7 +433,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) if (weechat_config_boolean (buflist_config_look_enabled)) buflist_add_bar (); - buflist_bar_item_update (); + buflist_bar_item_update (0); buflist_mouse_init (); @@ -453,12 +457,19 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) /* default mouse actions */ weechat_hashtable_remove_all (keys); - weechat_hashtable_set (keys, - "@item(" BUFLIST_BAR_ITEM_NAME "):button1*", - "hsignal:" BUFLIST_MOUSE_HSIGNAL); - weechat_hashtable_set (keys, - "@item(" BUFLIST_BAR_ITEM_NAME "):button2*", - "hsignal:" BUFLIST_MOUSE_HSIGNAL); + for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++) + { + snprintf (str_key, sizeof (str_key), + "@item(%s):button1*", + buflist_bar_item_get_name (i)); + weechat_hashtable_set (keys, + str_key, "hsignal:" BUFLIST_MOUSE_HSIGNAL); + snprintf (str_key, sizeof (str_key), + "@item(%s):button2*", + buflist_bar_item_get_name (i)); + weechat_hashtable_set (keys, + str_key, "hsignal:" BUFLIST_MOUSE_HSIGNAL); + } weechat_hashtable_set (keys, "@bar(" BUFLIST_BAR_NAME "):ctrl-wheelup", "hsignal:" BUFLIST_MOUSE_HSIGNAL); diff --git a/src/plugins/buflist/buflist.h b/src/plugins/buflist/buflist.h index eb700954a..d04c47193 100644 --- a/src/plugins/buflist/buflist.h +++ b/src/plugins/buflist/buflist.h @@ -31,6 +31,7 @@ extern struct t_hdata *buflist_hdata_window; extern struct t_hdata *buflist_hdata_buffer; extern struct t_hdata *buflist_hdata_hotlist; extern struct t_hdata *buflist_hdata_bar; +extern struct t_hdata *buflist_hdata_bar_item; extern struct t_hdata *buflist_hdata_bar_window; extern void buflist_add_bar (); |