mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Menu bar moved at the end of windows queue. bfu_technology activated at the
right place.
This commit is contained in:
parent
3f01c3d2fe
commit
e50581faf3
@ -870,6 +870,7 @@ do_mainmenu(struct terminal *term, struct menu_item *items,
|
||||
{
|
||||
int init = 0;
|
||||
struct menu *menu;
|
||||
struct window *win;
|
||||
|
||||
if (!term->main_menu) {
|
||||
term->main_menu = mem_calloc(1, sizeof(*menu));
|
||||
@ -891,9 +892,14 @@ do_mainmenu(struct terminal *term, struct menu_item *items,
|
||||
if (init) {
|
||||
menu->selected = -1;
|
||||
add_window(term, mainmenu_handler, menu);
|
||||
foreach (win, term->windows) {
|
||||
if (win->data == menu) {
|
||||
del_from_list(win);
|
||||
add_to_list_end(term->windows, win);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
struct window *win;
|
||||
|
||||
foreach (win, term->windows) {
|
||||
if (win->data == menu) {
|
||||
del_from_list(win);
|
||||
|
@ -903,6 +903,7 @@ init_session(struct session *base_session, struct terminal *term,
|
||||
if (!in_background)
|
||||
switch_to_tab(term, get_tab_number(ses->tab), -1);
|
||||
|
||||
if (!term->main_menu) activate_bfu_technology(ses, -1);
|
||||
return ses;
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,6 @@ do_action(struct session *ses, enum main_action action_id, int verbose)
|
||||
struct document_view *doc_view = current_frame(ses);
|
||||
struct link *link = NULL;
|
||||
|
||||
/* FIXME: Move it to appropriate place */
|
||||
if (!term->main_menu) activate_bfu_technology(ses, -1);
|
||||
|
||||
if (action_id == -1) goto unknown_action;
|
||||
|
||||
if (doc_view && doc_view->vs) {
|
||||
|
Loading…
Reference in New Issue
Block a user