mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
No need to have link_form_menu() be a menu function when it has an action
This commit is contained in:
parent
b82a38ab28
commit
cef160d630
@ -289,7 +289,7 @@ do_action(struct session *ses, enum main_action action_id, int verbose)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_MAIN_LINK_FORM_MENU:
|
case ACT_MAIN_LINK_FORM_MENU:
|
||||||
link_form_menu(term, NULL, ses);
|
link_form_menu(ses);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_MAIN_LUA_CONSOLE:
|
case ACT_MAIN_LUA_CONSOLE:
|
||||||
|
@ -1640,16 +1640,15 @@ link_form_menu_func(struct terminal *term, void *link_number_, void *ses_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
link_form_menu(struct terminal *term, void *xxx, void *ses_)
|
link_form_menu(struct session *ses)
|
||||||
{
|
{
|
||||||
struct session *ses = ses_;
|
|
||||||
struct document_view *doc_view;
|
struct document_view *doc_view;
|
||||||
struct link *link;
|
struct link *link;
|
||||||
struct menu_item *mi;
|
struct menu_item *mi;
|
||||||
struct form_control *fc;
|
struct form_control *fc;
|
||||||
struct form *form;
|
struct form *form;
|
||||||
|
|
||||||
assert(term && ses);
|
assert(ses);
|
||||||
if_assert_failed return;
|
if_assert_failed return;
|
||||||
|
|
||||||
doc_view = current_frame(ses);
|
doc_view = current_frame(ses);
|
||||||
@ -1699,7 +1698,7 @@ link_form_menu(struct terminal *term, void *xxx, void *ses_)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
assert(text);
|
assert(text);
|
||||||
add_to_string(&str, _(text, term));
|
add_to_string(&str, _(text, ses->tab->term));
|
||||||
|
|
||||||
rtext = fc->name;
|
rtext = fc->name;
|
||||||
if (!rtext) rtext = fc->alt;
|
if (!rtext) rtext = fc->alt;
|
||||||
@ -1709,5 +1708,5 @@ link_form_menu(struct terminal *term, void *xxx, void *ses_)
|
|||||||
FREE_DATA);
|
FREE_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_menu(term, mi, ses, 1);
|
do_menu(ses->tab->term, mi, ses, 1);
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,6 @@ void submit_given_form(struct session *ses, struct document_view *doc_view, stru
|
|||||||
void auto_submit_form(struct session *ses);
|
void auto_submit_form(struct session *ses);
|
||||||
void do_reset_form(struct document_view *doc_view, struct form *form);
|
void do_reset_form(struct document_view *doc_view, struct form *form);
|
||||||
|
|
||||||
void link_form_menu(struct terminal *term, void *xxx, void *ses_);
|
void link_form_menu(struct session *ses);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user