mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 23:06:38 +02:00
Add infolist "key" with key bindings
This commit is contained in:
@@ -106,6 +106,11 @@
|
||||
<entry>hotlist</entry>
|
||||
<entry>list of buffers in hotlist</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>key</entry>
|
||||
<entry>list of key bindings</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>nicklist</entry>
|
||||
|
||||
@@ -106,6 +106,11 @@
|
||||
<entry>hotlist</entry>
|
||||
<entry>list of buffers in hotlist</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>key</entry>
|
||||
<entry>list of key bindings</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>nicklist</entry>
|
||||
|
||||
@@ -106,6 +106,11 @@
|
||||
<entry>hotlist</entry>
|
||||
<entry>liste des tampons dans la hotlist</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>key</entry>
|
||||
<entry>liste des associations de touches</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>weechat</entry>
|
||||
<entry>nicklist</entry>
|
||||
|
||||
@@ -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"
|
||||
@@ -4874,6 +4874,10 @@ msgstr "Seznam pro aliasy:\n"
|
||||
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"
|
||||
@@ -4824,6 +4824,10 @@ msgstr "Liste der Aliases:\n"
|
||||
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"
|
||||
@@ -4812,6 +4812,10 @@ msgstr "Lista de alias:\n"
|
||||
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"
|
||||
@@ -4882,6 +4882,10 @@ msgstr "Aliaszok listája:\n"
|
||||
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"
|
||||
@@ -4858,6 +4858,10 @@ msgstr "Список сокращений:\n"
|
||||
msgid "list of buffers in hotlist"
|
||||
msgstr "максимальная длина имён в хотлисте"
|
||||
|
||||
#, fuzzy
|
||||
msgid "list of key bindings"
|
||||
msgstr "Список игнорирования:\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "nicks in nicklist for a buffer"
|
||||
msgstr "некорректная длина буфера"
|
||||
|
||||
+4
-1
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -701,6 +702,40 @@ gui_keyboard_end ()
|
||||
gui_keyboard_free_all (&gui_keys, &last_gui_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
@@ -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) */
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user