mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
Move code from kbd_listbox() to new do_kbd_listbox_action().
This commit is contained in:
parent
918fed9966
commit
26c9bdf538
@ -608,19 +608,10 @@ mouse_listbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
}
|
||||
|
||||
static widget_handler_status_T
|
||||
kbd_listbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
do_kbd_listbox_action(enum menu_action action_id, struct dialog_data *dlg_data,
|
||||
struct widget_data *widget_data)
|
||||
{
|
||||
struct widget_data *dlg_item = dlg_data->widgets_data;
|
||||
struct term_event *ev = dlg_data->term_event;
|
||||
|
||||
/* Not a pure listbox, but you're not supposed to use this outside of
|
||||
* the listbox browser anyway, so what.. */
|
||||
|
||||
switch (ev->ev) {
|
||||
enum menu_action action_id;
|
||||
|
||||
case EVENT_KBD:
|
||||
action_id = kbd_action(KEYMAP_MENU, ev, NULL);
|
||||
|
||||
switch (action_id) {
|
||||
case ACT_MENU_DOWN:
|
||||
@ -706,12 +697,28 @@ kbd_listbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return EVENT_NOT_PROCESSED;
|
||||
}
|
||||
|
||||
/* Selecting a button; most probably ;). */
|
||||
break;
|
||||
static widget_handler_status_T
|
||||
kbd_listbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
struct term_event *ev = dlg_data->term_event;
|
||||
|
||||
/* Not a pure listbox, but you're not supposed to use this outside of
|
||||
* the listbox browser anyway, so what.. */
|
||||
|
||||
switch (ev->ev) {
|
||||
case EVENT_KBD:
|
||||
{
|
||||
enum menu_action action_id;
|
||||
|
||||
action_id = kbd_action(KEYMAP_MENU, ev, NULL);
|
||||
return do_kbd_listbox_action(action_id, dlg_data, widget_data);
|
||||
}
|
||||
case EVENT_INIT:
|
||||
case EVENT_RESIZE:
|
||||
case EVENT_REDRAW:
|
||||
|
Loading…
x
Reference in New Issue
Block a user