1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Use @current_tab for current tab.

This commit is contained in:
Laurent MONIN 2006-09-28 23:58:26 +02:00 committed by Laurent MONIN
parent 3f94687e28
commit 0b58b99d30
4 changed files with 10 additions and 10 deletions

View File

@ -869,8 +869,8 @@ static void
search_menu(struct menu *menu)
{
struct terminal *term = menu->win->term;
struct window *tab = get_current_tab(term);
struct session *ses = tab ? tab->data : NULL;
struct window *current_tab = get_current_tab(term);
struct session *ses = current_tab ? current_tab->data : NULL;
unsigned char *prompt = _("Search menu/", term);
if (menu->size < 1 || !ses) return;

View File

@ -221,9 +221,9 @@ get_master_session(void)
foreach (ses, sessions)
if (ses->tab->term->master) {
struct window *tab = get_current_tab(ses->tab->term);
struct window *current_tab = get_current_tab(ses->tab->term);
return tab ? tab->data : NULL;
return current_tab ? current_tab->data : NULL;
}
return NULL;

View File

@ -211,11 +211,11 @@ static void
really_close_tabs(struct session *ses)
{
struct terminal *term = ses->tab->term;
struct window *current = get_current_tab(term);
struct window *current_tab = get_current_tab(term);
struct window *tab;
foreach_tab (tab, term->windows) {
if (tab == current) continue;
if (tab == current_tab) continue;
/* Update the current tab counter so assertions in the
* delete_window() call-chain will hold, namely the one in

View File

@ -1055,15 +1055,15 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
/* Handle tabs navigation if tabs bar is displayed. */
if (ses->status.show_tabs_bar && is_mouse_on_tab_bar(ses, mouse)) {
int tab_num = get_tab_number_by_xpos(term, mouse->x);
struct window *tab = get_current_tab(term);
struct window *current_tab = get_current_tab(term);
if (check_mouse_action(ev, B_UP)) {
if (check_mouse_button(ev, B_MIDDLE)
&& term->current_tab == tab_num
&& mouse->y == term->prev_mouse_event.y) {
if (tab->data == ses) ses = NULL;
if (current_tab->data == ses) ses = NULL;
close_tab(term, tab->data);
close_tab(term, current_tab->data);
}
return ses;
@ -1081,7 +1081,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
if (check_mouse_button(ev, B_MIDDLE)) {
do_not_ignore_next_mouse_event(term);
} else if (check_mouse_button(ev, B_RIGHT)) {
tab_menu(tab->data, mouse->x, mouse->y, 1);
tab_menu(current_tab->data, mouse->x, mouse->y, 1);
}
}