1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Inhibit the Serial configuration panel in mid-session if the session

isn't a serial one. In particular, this causes pterm not to fail an
assertion if you select `Change Settings'. Ahem.

[originally from svn r6831]
This commit is contained in:
Simon Tatham
2006-08-29 09:18:09 +00:00
parent 4c460326d9
commit d38ea07616
6 changed files with 12 additions and 9 deletions

View File

@ -31,7 +31,7 @@ static void help_handler(union control *ctrl, void *dlg,
}
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
int midsession)
int midsession, int protocol)
{
struct controlset *s;
union control *c;
@ -375,5 +375,6 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
/*
* Serial back end is available on Windows.
*/
ser_setup_config_box(b, midsession, 0x1F, 0x0F);
if (!midsession || (protocol == PROT_SERIAL))
ser_setup_config_box(b, midsession, 0x1F, 0x0F);
}

View File

@ -653,7 +653,7 @@ int do_config(void)
ctrlbox = ctrl_new_box();
setup_config_box(ctrlbox, FALSE, 0, 0);
win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), FALSE);
win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), FALSE, 0);
dp_init(&dp);
winctrl_init(&ctrls_base);
winctrl_init(&ctrls_panel);
@ -685,7 +685,8 @@ int do_reconfig(HWND hwnd, int protcfginfo)
ctrlbox = ctrl_new_box();
setup_config_box(ctrlbox, TRUE, cfg.protocol, protcfginfo);
win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), TRUE);
win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), TRUE,
cfg.protocol);
dp_init(&dp);
winctrl_init(&ctrls_base);
winctrl_init(&ctrls_panel);

View File

@ -373,7 +373,7 @@ void dp_cleanup(struct dlgparam *dp);
* Exports from wincfg.c.
*/
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
int midsession);
int midsession, int protocol);
/*
* Exports from windlg.c.