diff options
-rw-r--r-- | doc/de/autogen/infolists.xml | 5 | ||||
-rw-r--r-- | doc/en/autogen/infolists.xml | 5 | ||||
-rw-r--r-- | doc/fr/autogen/infolists.xml | 5 | ||||
-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 | 7 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/gui/gui-keyboard.c | 35 | ||||
-rw-r--r-- | src/gui/gui-keyboard.h | 2 | ||||
-rw-r--r-- | src/plugins/plugin-api.c | 19 |
14 files changed, 110 insertions, 9 deletions
diff --git a/doc/de/autogen/infolists.xml b/doc/de/autogen/infolists.xml index c80b8c298..b57b8cf29 100644 --- a/doc/de/autogen/infolists.xml +++ b/doc/de/autogen/infolists.xml @@ -108,6 +108,11 @@ </row> <row> <entry>weechat</entry> + <entry>key</entry> + <entry>list of key bindings</entry> +</row> +<row> + <entry>weechat</entry> <entry>nicklist</entry> <entry>nicks in nicklist for a buffer</entry> </row> diff --git a/doc/en/autogen/infolists.xml b/doc/en/autogen/infolists.xml index c80b8c298..b57b8cf29 100644 --- a/doc/en/autogen/infolists.xml +++ b/doc/en/autogen/infolists.xml @@ -108,6 +108,11 @@ </row> <row> <entry>weechat</entry> + <entry>key</entry> + <entry>list of key bindings</entry> +</row> +<row> + <entry>weechat</entry> <entry>nicklist</entry> <entry>nicks in nicklist for a buffer</entry> </row> diff --git a/doc/fr/autogen/infolists.xml b/doc/fr/autogen/infolists.xml index 9236919e5..389d25e69 100644 --- a/doc/fr/autogen/infolists.xml +++ b/doc/fr/autogen/infolists.xml @@ -108,6 +108,11 @@ </row> <row> <entry>weechat</entry> + <entry>key</entry> + <entry>liste des associations de touches</entry> +</row> +<row> + <entry>weechat</entry> <entry>nicklist</entry> <entry>pseudos dans la liste des pseudos pour un tampon</entry> </row> @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4875,6 +4875,10 @@ msgid "list of buffers in hotlist" msgstr "zobrazit historii příkazů bufferu" #, fuzzy +msgid "list of key bindings" +msgstr "Seznam pro aliasy:\n" + +#, fuzzy msgid "nicks in nicklist for a buffer" msgstr "nevalidní délka pro buffer" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4825,6 +4825,10 @@ msgid "list of buffers in hotlist" msgstr "Maximale Länge der Namen in der Hotlist" #, fuzzy +msgid "list of key bindings" +msgstr "Liste der /ignore-Regeln:\n" + +#, fuzzy msgid "nicks in nicklist for a buffer" msgstr "Fehlerhafte Pufferlänge" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4813,6 +4813,10 @@ msgid "list of buffers in hotlist" msgstr "longitud máxima de nombres en la hotlist" #, fuzzy +msgid "list of key bindings" +msgstr "Lista de ignores:\n" + +#, fuzzy msgid "nicks in nicklist for a buffer" msgstr "longitud inválida para un búfer" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" -"PO-Revision-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" +"PO-Revision-Date: 2009-05-16 00:36+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -5007,6 +5007,9 @@ msgstr "liste des hooks" msgid "list of buffers in hotlist" msgstr "liste des tampons dans la hotlist" +msgid "list of key bindings" +msgstr "liste des associations de touches" + msgid "nicks in nicklist for a buffer" msgstr "pseudos dans la liste des pseudos pour un tampon" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4883,6 +4883,10 @@ msgid "list of buffers in hotlist" msgstr "kiemelendő szavak listája" #, fuzzy +msgid "list of key bindings" +msgstr "Mellőzések listája:\n" + +#, fuzzy msgid "nicks in nicklist for a buffer" msgstr "érvénytelen pufferhossz" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: <soltys@szluug.org>\n" "Language-Team: Polish\n" @@ -4210,6 +4210,10 @@ msgstr "" msgid "list of buffers in hotlist" msgstr "" +#, fuzzy +msgid "list of key bindings" +msgstr "Nie przypisano klawiszy" + msgid "nicks in nicklist for a buffer" msgstr "" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4859,6 +4859,10 @@ msgid "list of buffers in hotlist" msgstr "максимальная длина имён в хотлисте" #, fuzzy +msgid "list of key bindings" +msgstr "Список игнорирования:\n" + +#, fuzzy msgid "nicks in nicklist for a buffer" msgstr "некорректная длина буфера" diff --git a/po/weechat.pot b/po/weechat.pot index 36ad66441..8638fdeca 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: 2009-05-12 17:51+0200\n" +"POT-Creation-Date: 2009-05-16 00:36+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -4173,6 +4173,9 @@ msgstr "" msgid "list of buffers in hotlist" msgstr "" +msgid "list of key bindings" +msgstr "" + msgid "nicks in nicklist for a buffer" msgstr "" diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c index a8c9bbd29..27d60105c 100644 --- a/src/gui/gui-keyboard.c +++ b/src/gui/gui-keyboard.c @@ -28,6 +28,7 @@ #include <ctype.h> #include "../core/weechat.h" +#include "../core/wee-infolist.h" #include "../core/wee-input.h" #include "../core/wee-log.h" #include "../core/wee-string.h" @@ -702,6 +703,40 @@ gui_keyboard_end () } /* + * gui_keyboard_add_to_infolist: add a key in an infolist + * return 1 if ok, 0 if error + */ + +int +gui_keyboard_add_to_infolist (struct t_infolist *infolist, + struct t_gui_key *key) +{ + struct t_infolist_item *ptr_item; + char *expanded_key; + + if (!infolist || !key) + return 0; + + ptr_item = infolist_new_item (infolist); + if (!ptr_item) + return 0; + + if (!infolist_new_var_string (ptr_item, "key_internal", key->key)) + return 0; + expanded_key = gui_keyboard_get_expanded_name (key->key); + if (expanded_key) + { + if (!infolist_new_var_string (ptr_item, "key", expanded_key)) + return 0; + free (expanded_key); + } + if (!infolist_new_var_string (ptr_item, "command", key->command)) + return 0; + + return 1; +} + +/* * gui_keyboard_print_log: print key infos in log (usually for crash dump) */ diff --git a/src/gui/gui-keyboard.h b/src/gui/gui-keyboard.h index 5aea4b427..73dda8d00 100644 --- a/src/gui/gui-keyboard.h +++ b/src/gui/gui-keyboard.h @@ -74,6 +74,8 @@ extern int gui_keyboard_get_paste_lines (); extern void gui_keyboard_paste_accept (); extern void gui_keyboard_paste_cancel (); extern void gui_keyboard_end (); +extern int gui_keyboard_add_to_infolist (struct t_infolist *infolist, + struct t_gui_key *key); extern void gui_keyboard_print_log (struct t_gui_buffer *buffer); /* keyboard functions (GUI dependent) */ diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index fb4483b26..a9028e356 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -316,6 +316,7 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name, struct t_gui_filter *ptr_filter; struct t_gui_window *ptr_window; struct t_gui_hotlist *ptr_hotlist; + struct t_gui_key *ptr_key; struct t_weechat_plugin *ptr_plugin; char buffer_full_name[1024]; @@ -574,6 +575,22 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name, return ptr_infolist; } } + else if (string_strcasecmp (infolist_name, "key") == 0) + { + ptr_infolist = infolist_new (); + if (ptr_infolist) + { + for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key) + { + if (!gui_keyboard_add_to_infolist (ptr_infolist, ptr_key)) + { + infolist_free (ptr_infolist); + return NULL; + } + } + return ptr_infolist; + } + } else if (string_strcasecmp (infolist_name, "nicklist") == 0) { /* invalid buffer pointer ? */ @@ -883,6 +900,8 @@ plugin_api_init () &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "hotlist", N_("list of buffers in hotlist"), &plugin_api_infolist_get_internal, NULL); + hook_infolist (NULL, "key", N_("list of key bindings"), + &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "nicklist", N_("nicks in nicklist for a buffer"), &plugin_api_infolist_get_internal, NULL); hook_infolist (NULL, "option", N_("list of options"), |