diff options
author | Timo Sirainen <cras@irssi.org> | 2002-04-27 02:07:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-04-27 02:07:18 +0000 |
commit | f1efdc6eaa0d35801f65dd0e3ef04a1e036986f2 (patch) | |
tree | d55707cfa08bf6b3e64dbc3e5ef28890f3c9438e /src | |
parent | dd05ac735104815a22d39097e05b4b6f567e88d3 (diff) | |
download | irssi-f1efdc6eaa0d35801f65dd0e3ef04a1e036986f2.zip |
/BIND list changes: added header/footer, added %#, bind_key -> bind_list
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2722 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/keyboard.c | 6 | ||||
-rw-r--r-- | src/fe-common/core/module-formats.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/module-formats.h | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index 502c4c6e..fb1d89fe 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -651,6 +651,8 @@ static void cmd_show_keys(const char *searchkey, int full) GSList *info, *key; int len; + printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_HEADER); + len = searchkey == NULL ? 0 : strlen(searchkey); for (info = keyinfos; info != NULL; info = info->next) { KEYINFO_REC *rec = info->data; @@ -660,11 +662,13 @@ static void cmd_show_keys(const char *searchkey, int full) if ((len == 0 || g_strncasecmp(rec->key, searchkey, len) == 0) && (!full || rec->key[len] == '\0')) { - printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_KEY, + printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_LIST, rec->key, rec->info->id, rec->data == NULL ? "" : rec->data); } } } + + printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_FOOTER); } /* SYNTAX: BIND [-delete] [<key> [<command> [<data>]]] */ diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index fd1617b3..2806d5aa 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -248,7 +248,9 @@ FORMAT_REC fecommon_core_formats[] = { { "unknown_chatnet", "Unknown chat network: $0 (create it with /IRCNET ADD)", 1, { 0 } }, { "not_toggle", "Value must be either ON, OFF or TOGGLE", 0 }, { "perl_error", "Perl error: $0", 1, { 0 } }, - { "bind_key", "$[!20]0 $1 $2", 3, { 0, 0, 0 } }, + { "bind_header", "%#Key Action", 0 }, + { "bind_list", "%#$[!20]0 $1 $2", 3, { 0, 0, 0 } }, + { "bind_footer", "", 0 }, { "bind_unknown_id", "Unknown bind action: $0", 1, { 0 } }, { "config_saved", "Saved configuration to file $0", 1, { 0 } }, { "config_reloaded", "Reloaded configuration", 1, { 0 } }, diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h index 166c5215..e4d74461 100644 --- a/src/fe-common/core/module-formats.h +++ b/src/fe-common/core/module-formats.h @@ -214,7 +214,9 @@ enum { TXT_UNKNOWN_CHATNET, TXT_NOT_TOGGLE, TXT_PERL_ERROR, - TXT_BIND_KEY, + TXT_BIND_HEADER, + TXT_BIND_LIST, + TXT_BIND_FOOTER, TXT_BIND_UNKNOWN_ID, TXT_CONFIG_SAVED, TXT_CONFIG_RELOADED, |