buflist: display a warning when the script "buffers.pl" is loaded

v2.8-utf8proc
Sébastien Helleu 2017-06-05 14:56:14 +02:00
parent 4947ed6d31
commit fa3a4355ce
15 changed files with 165 additions and 15 deletions

View File

@ -26,6 +26,7 @@ New features::
Improvements::
* core: allow index for hdata arrays in evaluation of expressions
* buflist: display a warning when the script "buffers.pl" is loaded
* buflist: add support of char "~" in option buflist.look.sort for case insensitive comparison
* buflist: add variable `${current_buffer}` (boolean "0" / "1") in bar item evaluation
* trigger: add "irc_server" and "irc_channel" pointers in data for IRC signal/modifier hooks

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-05-13 22:06+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4904,6 +4904,14 @@ msgstr "%s%s: nemohu vytvořit server \"%s\""
msgid "Buffers list"
msgstr "Seznam bufferů"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "seznam bufferů"

View File

@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-06-02 20:00+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -5795,6 +5795,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Liste von Buffern"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
msgid "bar item with list of buffers"
msgstr "Bar-Item mit der Liste von Buffern"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -5118,6 +5118,14 @@ msgstr "%s%s: no es posible crear el servidor \"%s\""
msgid "Buffers list"
msgstr "Lista de buffers:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"PO-Revision-Date: 2017-06-02 19:59+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-06-05 14:55+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -5666,6 +5666,19 @@ msgstr ""
msgid "Buffers list"
msgstr "Liste des tampons"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
"%sbuflist : attention : le script buffers.pl est chargé et fournit une barre "
"avec la liste des tampons similaire à celle de l'extension buflist ; vous "
"voudrez peut-être désinstaller le script buffers.pl (/script remove buffers."
"pl) ou désactiver/décharger l'extension buflist ; voir les notes de version "
"de WeeChat pour plus d'information"
msgid "bar item with list of buffers"
msgstr "objet de barre avec la liste des tampons"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -4442,6 +4442,14 @@ msgstr "%s nem sikerült a szervert létrehozni\n"
msgid "Buffers list"
msgstr "hotlist törlése"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "Aliaszok listája:\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -5256,6 +5256,14 @@ msgstr "%s%s: impossibile creare il server \"%s\""
msgid "Buffers list"
msgstr "Elenco buffer:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "elenco dei buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-06-03 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -5401,6 +5401,14 @@ msgstr "%s%s: エラー: 言語 \"%s\" のスペラーを作成できません"
msgid "Buffers list"
msgstr "バッファリスト"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
msgid "bar item with list of buffers"
msgstr "バッファのリストを表示するバー要素"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -5536,6 +5536,14 @@ msgstr "%s%s: błąd: nie można utworzyć słownika dla języka \"%s\""
msgid "Buffers list"
msgstr "Lista buforów"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
msgid "bar item with list of buffers"
msgstr "element paska z listą buforów"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+0200\n"
"PO-Revision-Date: 2017-04-08 14:50+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -5512,6 +5512,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Lista de buffers:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -5058,6 +5058,14 @@ msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
msgid "Buffers list"
msgstr "Lista de buffers:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "lista de buffers"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -4480,6 +4480,14 @@ msgstr "%s не могу создать сервер \"%s\"\n"
msgid "Buffers list"
msgstr "Список буферов:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
#, fuzzy
msgid "bar item with list of buffers"
msgstr "Список сокращений:\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -4046,6 +4046,14 @@ msgstr ""
msgid "Buffers list"
msgstr "Xfer listesi:"
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
msgid "bar item with list of buffers"
msgstr ""

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-02 19:56+0200\n"
"POT-Creation-Date: 2017-06-05 14:55+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"
@ -4031,6 +4031,14 @@ msgstr ""
msgid "Buffers list"
msgstr ""
#, c-format
msgid ""
"%sbuflist: warning: the script buffers.pl is loaded and provides a bar with "
"list of buffers similar to the buflist plugin; you may want to uninstall the "
"script buffers.pl (/script remove buffers.pl) or disable/unload the buflist "
"plugin; see WeeChat release notes for more information"
msgstr ""
msgid "bar item with list of buffers"
msgstr ""

View File

@ -350,6 +350,44 @@ buflist_sort_buffers ()
return buffers;
}
/*
* Callback called when a Perl script is loaded: if the script is buffers.pl,
* then we display a warning.
*/
int
buflist_script_loaded_cb (const void *pointer, void *data, const char *signal,
const char *type_data, void *signal_data)
{
int length;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) signal;
(void) type_data;
if (!signal_data)
return WEECHAT_RC_OK;
length = strlen (signal_data);
if ((length >= 10)
&& (strncmp (signal_data + length - 10, "buffers.pl", 10) == 0))
{
weechat_printf (NULL,
_("%sbuflist: warning: the script buffers.pl is "
"loaded and provides a bar with list of buffers "
"similar to the buflist plugin; you may want to "
"uninstall the script buffers.pl "
"(/script remove buffers.pl) or disable/unload the "
"buflist plugin; see WeeChat release notes for more "
"information"),
weechat_prefix ("error"));
}
return WEECHAT_RC_OK;
}
/*
* Initializes buflist plugin.
*/
@ -420,9 +458,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hashtable_set (keys, "__quiet", "1");
weechat_key_bind ("mouse", keys);
}
weechat_hashtable_free (keys);
weechat_hook_signal ("perl_script_loaded",
&buflist_script_loaded_cb, NULL, NULL);
return WEECHAT_RC_OK;
}