From 3b7bd017161fe91a77d1c8ad455ad22d4d9fe659 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 19 Apr 2011 20:13:46 +0200 Subject: core: allow command mask for infolist_get on command hooks --- doc/de/autogen/plugin_api/infolists.txt | 2 +- doc/en/autogen/plugin_api/infolists.txt | 2 +- doc/fr/autogen/plugin_api/infolists.txt | 2 +- doc/it/autogen/plugin_api/infolists.txt | 2 +- po/cs.po | 9 ++++++--- po/de.po | 7 ++++--- po/es.po | 9 ++++++--- po/fr.po | 11 ++++++----- po/hu.po | 6 +++--- po/it.po | 7 ++++--- po/pl.po | 8 +++++--- po/pt_BR.po | 6 +++--- po/ru.po | 6 +++--- po/weechat.pot | 6 +++--- src/core/wee-hook.c | 2 +- src/plugins/plugin-api.c | 3 ++- 16 files changed, 50 insertions(+), 38 deletions(-) diff --git a/doc/de/autogen/plugin_api/infolists.txt b/doc/de/autogen/plugin_api/infolists.txt index f9ed0551b..b66df4b9d 100644 --- a/doc/de/autogen/plugin_api/infolists.txt +++ b/doc/de/autogen/plugin_api/infolists.txt @@ -44,7 +44,7 @@ | weechat | history | Verlaufspeicher der Befehle | Buffer Pointer (falls nicht gesetzt, wird der globale Verlauf zurückgegeben) (optional) | - -| weechat | hook | Auflistung der Hooks | - | type,arguments (type ist command/timer/.., arguments dient dazu nur einige hooks abzufragen, beide Optionen sind optional) +| weechat | hook | Auflistung der Hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional) | weechat | hotlist | Liste der Buffer in Hotlist | - | - diff --git a/doc/en/autogen/plugin_api/infolists.txt b/doc/en/autogen/plugin_api/infolists.txt index be5f18ce3..bd1d9d422 100644 --- a/doc/en/autogen/plugin_api/infolists.txt +++ b/doc/en/autogen/plugin_api/infolists.txt @@ -44,7 +44,7 @@ | weechat | history | history of commands | buffer pointer (if not set, return global history) (optional) | - -| weechat | hook | list of hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks, both are optional) +| weechat | hook | list of hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional) | weechat | hotlist | list of buffers in hotlist | - | - diff --git a/doc/fr/autogen/plugin_api/infolists.txt b/doc/fr/autogen/plugin_api/infolists.txt index 40094cf98..363dcb4cf 100644 --- a/doc/fr/autogen/plugin_api/infolists.txt +++ b/doc/fr/autogen/plugin_api/infolists.txt @@ -44,7 +44,7 @@ | weechat | history | historique des commandes | pointeur vers le tampon (si non défini, retourne l'historique global) (optionnel) | - -| weechat | hook | liste des hooks | - | type,paramètres (le type est command/timer/.., paramètres pour avoir seulement quelques hooks, les deux sont optionnels) +| weechat | hook | liste des hooks | - | type,paramètres (le type est command/timer/.., paramètres pour avoir seulement quelques hooks (peut démarrer ou se terminer par "*" comme joker), les deux sont optionnels) | weechat | hotlist | liste des tampons dans la hotlist | - | - diff --git a/doc/it/autogen/plugin_api/infolists.txt b/doc/it/autogen/plugin_api/infolists.txt index a06ffd02c..66e061390 100644 --- a/doc/it/autogen/plugin_api/infolists.txt +++ b/doc/it/autogen/plugin_api/infolists.txt @@ -44,7 +44,7 @@ | weechat | history | cronologia dei comandi | puntatore al buffer (se non impostato, restituisce la cronologia globale) (opzionale) | - -| weechat | hook | elenco di hook | - | tipo,argomenti (il tipo è comando/timer/.., l'argomento solo per ottenere alcuni hook, entrambi sono opzionali) +| weechat | hook | elenco di hook | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional) | weechat | hotlist | elenco dei buffer nella hotlist | - | - diff --git a/po/cs.po b/po/cs.po index f66feaaf4..54388d984 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -6427,10 +6427,13 @@ msgstr "" msgid "list of hooks" msgstr "seznam napojení" +#, fuzzy msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" +"jméno položky pole (může začínat nebo končit \"*\" jako zástupným znakem) " +"(volitelné)" msgid "list of buffers in hotlist" msgstr "seznam bufferů v hotlistu" diff --git a/po/de.po b/po/de.po index 207101f90..6c68b6137 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-15 21:04+0100\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev \n" @@ -6722,9 +6722,10 @@ msgstr "" msgid "list of hooks" msgstr "Auflistung der Hooks" +#, fuzzy msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" "type,arguments (type ist command/timer/.., arguments dient dazu nur einige " "hooks abzufragen, beide Optionen sind optional)" diff --git a/po/es.po b/po/es.po index ba372a59e..aaa43c686 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 17:31+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6568,10 +6568,13 @@ msgstr "" msgid "list of hooks" msgstr "lista de enganches" +#, fuzzy msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" +"nombre del elemento de barra (puede empezar o terminar con \"*\" como " +"comodín) (opcional)" msgid "list of buffers in hotlist" msgstr "lista de buffers en la lista de actividad" diff --git a/po/fr.po b/po/fr.po index a4593c1dc..c807b7f56 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" -"PO-Revision-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" +"PO-Revision-Date: 2011-04-19 20:10+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -6592,11 +6592,12 @@ msgid "list of hooks" msgstr "liste des hooks" msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" "type,paramètres (le type est command/timer/.., paramètres pour avoir " -"seulement quelques hooks, les deux sont optionnels)" +"seulement quelques hooks (peut démarrer ou se terminer par \"*\" comme " +"joker), les deux sont optionnels)" msgid "list of buffers in hotlist" msgstr "liste des tampons dans la hotlist" diff --git a/po/hu.po b/po/hu.po index 4133f1d7a..85e39460a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 11:21+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -6057,8 +6057,8 @@ msgid "list of hooks" msgstr "Aliaszok listája:\n" msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" #, fuzzy diff --git a/po/it.po b/po/it.po index 2845dc100..4b5d874a7 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -6537,9 +6537,10 @@ msgstr "" msgid "list of hooks" msgstr "elenco di hook" +#, fuzzy msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" "tipo,argomenti (il tipo è comando/timer/.., l'argomento solo per ottenere " "alcuni hook, entrambi sono opzionali)" diff --git a/po/pl.po b/po/pl.po index fae74d06b..8efaa9894 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: weechat-dev \n" @@ -6518,10 +6518,12 @@ msgstr "" msgid "list of hooks" msgstr "lista powiązań" +#, fuzzy msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" +"nazwa elementu paska (może się zaczynać lub kończyć \"*\") (opcjonalne)" msgid "list of buffers in hotlist" msgstr "lista buforów w hotliście" diff --git a/po/pt_BR.po b/po/pt_BR.po index ddf372e5f..ba88ca9bf 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 11:22+0200\n" "Last-Translator: Ivan Sichmann Freitas \n" "Language-Team: weechat-dev \n" @@ -5796,8 +5796,8 @@ msgid "list of hooks" msgstr "" msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" msgid "list of buffers in hotlist" diff --git a/po/ru.po b/po/ru.po index 911fa23de..0dafe9a41 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -6072,8 +6072,8 @@ msgid "list of hooks" msgstr "Список сокращений:\n" msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" #, fuzzy diff --git a/po/weechat.pot b/po/weechat.pot index 98f08f55d..77e952ee2 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-04-17 11:00+0200\n" +"POT-Creation-Date: 2011-04-19 20:09+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -5257,8 +5257,8 @@ msgid "list of hooks" msgstr "" msgid "" -"type,arguments (type is command/timer/.., arguments to get only some hooks, " -"both are optional)" +"type,arguments (type is command/timer/.., arguments to get only some hooks " +"(can start or end with \"*\" as wildcard), both are optional)" msgstr "" msgid "list of buffers in hotlist" diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 606c878c9..822359877 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -2898,7 +2898,7 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type, switch (ptr_hook->type) { case HOOK_TYPE_COMMAND: - match = (strcmp (HOOK_COMMAND(ptr_hook, command), arguments) == 0); + match = string_match (HOOK_COMMAND(ptr_hook, command), arguments, 0); break; default: break; diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 853dafa2a..f67aca4ff 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -1005,7 +1005,8 @@ plugin_api_init () hook_infolist (NULL, "hook", N_("list of hooks"), NULL, N_("type,arguments (type is command/timer/.., arguments to " - "get only some hooks, both are optional)"), + "get only some hooks (can start or end with \"*\" as " + "wildcard), both are optional)"), &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "hotlist", N_("list of buffers in hotlist"), NULL, -- cgit v1.2.3