WListbox: add Edit, View and Enter keynindings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-07-14 11:16:41 +03:00
parent b81e4aac55
commit a4e36d079d
4 changed files with 15 additions and 1 deletions

View File

@ -325,6 +325,11 @@ listbox_execute_cmd (WListbox * l, long command)
D_ERROR, 2, _("&Yes"), _("&No")) == 0))
listbox_remove_list (l);
break;
case CK_View:
case CK_Edit:
case CK_Enter:
ret = send_message (WIDGET (l)->owner, l, MSG_NOTIFY, command, NULL);
break;
default:
ret = MSG_NOT_HANDLED;
}
@ -398,7 +403,7 @@ static void
listbox_on_change (WListbox * l)
{
listbox_draw (l, TRUE);
send_message (WIDGET (l)->owner, l, MSG_NOTIFY, l->pos, NULL);
send_message (WIDGET (l)->owner, l, MSG_NOTIFY, 0, NULL);
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -194,6 +194,9 @@ PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Delete = delete; d
Clear = shift-delete; shift-d
View = f3
Edit = f4
Enter = enter
[tree]
Help = f1

View File

@ -194,6 +194,9 @@ PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Delete = delete; d
Clear = shift-delete; shift-d
View = f3
Edit = f4
Enter = enter
[tree]
Help = f1

View File

@ -287,6 +287,9 @@ static const global_keymap_ini_t default_listbox_keymap[] = {
{"PageDown", "pgdn; ctrl-v"},
{"Delete", "delete; d"},
{"Clear", "shift-delete; shift-d"},
{"View", "f3"},
{"Edit", "f4"},
{"Enter", "enter"},
{NULL, NULL}
};