mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Telnet specials menu was not being reinstated after a session was restarted in
the same window (Windows version only). Policy change: it's now the backend's responsibility to call update_specials_menu() at the start of a session (or whenever it feels ready), if it has any special commands. Otherwise the menu won't be displayed. [originally from svn r4649]
This commit is contained in:
parent
1b3eb3e20d
commit
4482a79162
4
putty.h
4
putty.h
@ -561,6 +561,10 @@ void sys_cursor(void *frontend, int x, int y);
|
|||||||
void request_paste(void *frontend);
|
void request_paste(void *frontend);
|
||||||
void frontend_keypress(void *frontend);
|
void frontend_keypress(void *frontend);
|
||||||
void ldisc_update(void *frontend, int echo, int edit);
|
void ldisc_update(void *frontend, int echo, int edit);
|
||||||
|
/* It's the backend's responsibility to invoke this at the start of a
|
||||||
|
* connection, if necessary; it can also invoke it later if the set of
|
||||||
|
* special commands changes. It does not need to invoke it at session
|
||||||
|
* shutdown. */
|
||||||
void update_specials_menu(void *frontend);
|
void update_specials_menu(void *frontend);
|
||||||
int from_backend(void *frontend, int is_stderr, const char *data, int len);
|
int from_backend(void *frontend, int is_stderr, const char *data, int len);
|
||||||
#define OPTIMISE_IS_SCROLL 1
|
#define OPTIMISE_IS_SCROLL 1
|
||||||
|
5
telnet.c
5
telnet.c
@ -762,6 +762,11 @@ static const char *telnet_init(void *frontend_handle, void **backend_handle,
|
|||||||
*/
|
*/
|
||||||
telnet->in_synch = FALSE;
|
telnet->in_synch = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can send special commands from the start.
|
||||||
|
*/
|
||||||
|
update_specials_menu(telnet->frontend);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3217,7 +3217,6 @@ static void start_backend(struct gui_data *inst)
|
|||||||
sfree(title);
|
sfree(title);
|
||||||
}
|
}
|
||||||
inst->back->provide_logctx(inst->backhandle, inst->logctx);
|
inst->back->provide_logctx(inst->backhandle, inst->logctx);
|
||||||
update_specials_menu(inst);
|
|
||||||
|
|
||||||
term_provide_resize_fn(inst->term, inst->back->size, inst->backhandle);
|
term_provide_resize_fn(inst->term, inst->back->size, inst->backhandle);
|
||||||
|
|
||||||
@ -3436,6 +3435,8 @@ int pt_main(int argc, char **argv)
|
|||||||
inst->specialsitem1 = menuitem;
|
inst->specialsitem1 = menuitem;
|
||||||
MKMENUITEM(NULL, NULL);
|
MKMENUITEM(NULL, NULL);
|
||||||
inst->specialsitem2 = menuitem;
|
inst->specialsitem2 = menuitem;
|
||||||
|
gtk_widget_hide(inst->specialsitem1);
|
||||||
|
gtk_widget_hide(inst->specialsitem2);
|
||||||
MKMENUITEM("Clear Scrollback", clear_scrollback_menuitem);
|
MKMENUITEM("Clear Scrollback", clear_scrollback_menuitem);
|
||||||
MKMENUITEM("Reset Terminal", reset_terminal_menuitem);
|
MKMENUITEM("Reset Terminal", reset_terminal_menuitem);
|
||||||
MKMENUITEM("Copy All", copy_all_menuitem);
|
MKMENUITEM("Copy All", copy_all_menuitem);
|
||||||
|
4
window.c
4
window.c
@ -686,8 +686,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
SetScrollInfo(hwnd, SB_VERT, &si, FALSE);
|
SetScrollInfo(hwnd, SB_VERT, &si, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
start_backend();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prepare the mouse handler.
|
* Prepare the mouse handler.
|
||||||
*/
|
*/
|
||||||
@ -742,7 +740,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update_specials_menu(NULL);
|
start_backend();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the initial input locale.
|
* Set up the initial input locale.
|
||||||
|
Loading…
Reference in New Issue
Block a user