diff options
-rw-r--r-- | doc/de/autogen/user/buflist_commands.adoc | 40 | ||||
-rw-r--r-- | doc/en/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/fr/autogen/user/buflist_commands.adoc | 6 | ||||
-rw-r--r-- | doc/it/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/ja/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | doc/pl/autogen/user/buflist_commands.adoc | 4 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/ja.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/pt.po | 6 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/tr.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.c | 62 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-command.c | 4 |
21 files changed, 178 insertions, 34 deletions
diff --git a/doc/de/autogen/user/buflist_commands.adoc b/doc/de/autogen/user/buflist_commands.adoc index 02173f848..47622b722 100644 --- a/doc/de/autogen/user/buflist_commands.adoc +++ b/doc/de/autogen/user/buflist_commands.adoc @@ -8,29 +8,33 @@ ---- /buflist refresh -refresh: erzwingt eine Aktualisierung des "buflist" Bar-Item +refresh: force the refresh of the "buflist" bar item -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 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: + - 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} - - 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 - - ${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 - - ${indent}: Einrückung für Name (Channel und private Buffer werden eingerückt) (evaluiert aus Option buflist.format.indent) - - ${nick_prefix}: Nick-Präfix für einen Channel (wird nur genutzt falls die Option buflist.look.nick_prefix aktiviert ist) - - ${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 - - ${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 + - ${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 + - ${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) + - ${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 + - ${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 45989b6d8..abe134263 100644 --- a/doc/en/autogen/user/buflist_commands.adoc +++ b/doc/en/autogen/user/buflist_commands.adoc @@ -22,11 +22,15 @@ The following variables can be used in these options: - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} + - 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 - ${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 - ${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) - ${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) diff --git a/doc/fr/autogen/user/buflist_commands.adoc b/doc/fr/autogen/user/buflist_commands.adoc index bf7aa7d4f..9efd8f98e 100644 --- a/doc/fr/autogen/user/buflist_commands.adoc +++ b/doc/fr/autogen/user/buflist_commands.adoc @@ -22,12 +22,16 @@ Les variables suivantes peuvent être utilisées dans ces options : - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} + - irc_server: données du serveur IRC, défini seulement sur un tampon IRC (voir le hdata "irc_server" dans la doc API) + - irc_channel: données du canal IRC, défini seulement sur un tampon de canal IRC (voir le hdata "irc_channel" dans la doc API) - variables additionnelles ajoutées par buflist pour des raisons pratiques : - ${format_buffer} : la valeur évaluée de l'option buflist.format.buffer ; peut être utilisée dans l'option buflist.format.buffer_current pour juste changer la couleur de fond par exemple - ${format_number} : numéro indenté avec un séparateur (évaluation de l'option buflist.format.number) - ${number} : numéro indenté, par exemple " 1" s'il y a entre 10 et 99 tampons - ${indent} : indentation pour le nom (les tampons de canaux ou privés sont indentés) (évaluation de l'option buflist.format.indent) - - ${nick_prefix} : le préfixe du pseudo pour un cancl (défini seulement si l'option buflist.look.nick_prefix est activée) + - ${format_nick_prefix} : le préfixe du pseudo en couleur pour un canal (évaluation de l'option buflist.format.nick_prefix) + - ${color_nick_prefix} : la couleur du préfixe du pseudo pour un canal (défini seulement si l'option buflist.look.nick_prefix est activée) + - ${nick_prefix} : le préfixe du pseudo pour un canal (défini seulement si l'option buflist.look.nick_prefix est activée) - ${name} : le nom court (si défini), sinon le nom - ${color_hotlist} : la couleur qui dépend du niveau de hotlist le plus élevé pour le tampon (évaluation de l'option buflist.format.hotlist_xxx où xxx est le niveau) - ${format_hotlist} : la hotlist formatée (évaluation de l'option buflist.format.hotlist) diff --git a/doc/it/autogen/user/buflist_commands.adoc b/doc/it/autogen/user/buflist_commands.adoc index 45989b6d8..abe134263 100644 --- a/doc/it/autogen/user/buflist_commands.adoc +++ b/doc/it/autogen/user/buflist_commands.adoc @@ -22,11 +22,15 @@ The following variables can be used in these options: - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} + - 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 - ${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 - ${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) - ${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) diff --git a/doc/ja/autogen/user/buflist_commands.adoc b/doc/ja/autogen/user/buflist_commands.adoc index de8a1484b..02887ccd5 100644 --- a/doc/ja/autogen/user/buflist_commands.adoc +++ b/doc/ja/autogen/user/buflist_commands.adoc @@ -22,11 +22,15 @@ The following variables can be used in these options: - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} + - 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 - ${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 - ${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) - ${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) diff --git a/doc/pl/autogen/user/buflist_commands.adoc b/doc/pl/autogen/user/buflist_commands.adoc index 45989b6d8..abe134263 100644 --- a/doc/pl/autogen/user/buflist_commands.adoc +++ b/doc/pl/autogen/user/buflist_commands.adoc @@ -22,11 +22,15 @@ The following variables can be used in these options: - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} + - 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 - ${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 - ${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) - ${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) @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 21:59+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4921,6 +4921,10 @@ msgid "" " - ${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 " @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-04-24 22:21+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -5804,6 +5804,10 @@ msgid "" " - ${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 " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 22:01+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5134,6 +5134,10 @@ msgid "" " - ${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 " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" -"PO-Revision-Date: 2017-04-25 20:30+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" +"PO-Revision-Date: 2017-04-25 20:39+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -5676,6 +5676,10 @@ msgid "" " - ${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 " @@ -5720,6 +5724,10 @@ msgstr "" " - ${buffer.full_name}\n" " - ${buffer.short_name}\n" " - ${buffer.nicklist_nicks_count}\n" +" - irc_server: données du serveur IRC, défini seulement sur un tampon IRC " +"(voir le hdata \"irc_server\" dans la doc API)\n" +" - irc_channel: données du canal IRC, défini seulement sur un tampon de " +"canal IRC (voir le hdata \"irc_channel\" dans la doc API)\n" " - variables additionnelles ajoutées par buflist pour des raisons " "pratiques :\n" " - ${format_buffer} : la valeur évaluée de l'option buflist.format." @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 22:03+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4458,6 +4458,10 @@ msgid "" " - ${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 " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 22:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5272,6 +5272,10 @@ msgid "" " - ${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 " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-04-23 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -5413,6 +5413,10 @@ msgid "" " - ${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 " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-04-08 14:49+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5526,6 +5526,10 @@ msgid "" " - ${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 " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-04-08 14:50+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -5528,6 +5528,10 @@ msgid "" " - ${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 " diff --git a/po/pt_BR.po b/po/pt_BR.po index 79be47798..2878cbd50 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-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5074,6 +5074,10 @@ msgid "" " - ${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 " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 22:06+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4496,6 +4496,10 @@ msgid "" " - ${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 " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+0200\n" "PO-Revision-Date: 2017-01-06 22:07+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4061,6 +4061,10 @@ msgid "" " - ${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 " diff --git a/po/weechat.pot b/po/weechat.pot index 0df1574b9..403078b02 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-04-25 19:42+0200\n" +"POT-Creation-Date: 2017-04-25 20:37+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" @@ -4046,6 +4046,10 @@ msgid "" " - ${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 " diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 5220a23d5..036b42f0b 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -52,13 +52,18 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, struct t_gui_buffer *ptr_buffer, *ptr_current_buffer; struct t_gui_nick *ptr_gui_nick; struct t_gui_hotlist *ptr_hotlist; + struct t_hdata *hdata_irc_server, *hdata_irc_channel; + struct t_irc_server *ptr_server; + struct t_irc_channel *ptr_channel; char **buflist, *str_buflist, *condition; + char str_condition[512]; char str_format_number[32], str_format_number_empty[32]; char str_nick_prefix[32], str_color_nick_prefix[32]; char str_number[32], *line, **hotlist, *str_hotlist; char str_hotlist_count[32]; const char *ptr_format, *ptr_format_current, *ptr_format_indent; - const char *ptr_name, *ptr_type, *ptr_nick, *ptr_nick_prefix; + const char *ptr_name, *ptr_type, *ptr_server_name, *ptr_channel_name; + const char *ptr_nick, *ptr_nick_prefix; const char *ptr_hotlist_format, *ptr_hotlist_priority; const char *hotlist_priority_none = "none"; const char *hotlist_priority[4] = { "low", "message", "private", @@ -79,6 +84,9 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, prev_number = -1; + hdata_irc_server = NULL; + hdata_irc_channel = NULL; + buflist = weechat_string_dyn_alloc (256); ptr_format = weechat_config_string (buflist_config_format_buffer); @@ -113,6 +121,58 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, weechat_hashtable_set (buflist_hashtable_pointers, "buffer", ptr_buffer); + /* set IRC server/channel pointers */ + ptr_server = NULL; + ptr_channel = NULL; + if (strcmp (weechat_buffer_get_string (ptr_buffer, "plugin"), "irc") == 0) + { + ptr_server_name = weechat_buffer_get_string (ptr_buffer, "localvar_server"); + if (ptr_server_name && ptr_server_name[0]) + { + if (!hdata_irc_server) + hdata_irc_server = weechat_hdata_get ("irc_server"); + if (hdata_irc_server) + { + snprintf (str_condition, sizeof (str_condition), + "${irc_server.name} == %s", + ptr_server_name); + ptr_server = weechat_hdata_get_list (hdata_irc_server, + "irc_servers"); + ptr_server = weechat_hdata_search (hdata_irc_server, + ptr_server, + str_condition, + 1); + if (ptr_server) + { + ptr_channel_name = weechat_buffer_get_string (ptr_buffer, + "localvar_channel"); + if (ptr_channel_name && ptr_channel_name[0]) + { + if (!hdata_irc_channel) + hdata_irc_channel = weechat_hdata_get ("irc_channel"); + if (hdata_irc_channel) + { + snprintf (str_condition, sizeof (str_condition), + "${irc_channel.name} == %s", + ptr_channel_name); + ptr_channel = weechat_hdata_pointer (hdata_irc_server, + ptr_server, + "channels"); + ptr_channel = weechat_hdata_search (hdata_irc_channel, + ptr_channel, + str_condition, + 1); + } + } + } + } + } + } + weechat_hashtable_set (buflist_hashtable_pointers, + "irc_server", ptr_server); + weechat_hashtable_set (buflist_hashtable_pointers, + "irc_channel", ptr_channel); + /* check condition: if false, the buffer is not displayed */ condition = weechat_string_eval_expression ( weechat_config_string (buflist_config_look_display_conditions), diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 342b84f4c..18bbb101c 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -88,6 +88,10 @@ buflist_command_init () " - ${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 " |