X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/0edafb21b50772bc9e245b7d140aba43875c443d..806c9d94341c912a45e563d87ad36d63966a4308:/windows/wincfg.c diff --git a/windows/wincfg.c b/windows/wincfg.c index 6a970a75..1cf56c81 100644 --- a/windows/wincfg.c +++ b/windows/wincfg.c @@ -30,8 +30,18 @@ static void help_handler(union control *ctrl, void *dlg, } } +static void variable_pitch_handler(union control *ctrl, void *dlg, + void *data, int event) +{ + if (event == EVENT_REFRESH) { + dlg_checkbox_set(ctrl, dlg, !dlg_get_fixed_pitch_flag(dlg)); + } else if (event == EVENT_VALCHANGE) { + dlg_set_fixed_pitch_flag(dlg, !dlg_checkbox_get(ctrl, 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; @@ -177,6 +187,8 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, */ s = ctrl_getset(b, "Window/Appearance", "font", "Font settings"); + ctrl_checkbox(s, "Allow selection of variable-pitch fonts", NO_SHORTCUT, + HELPCTX(appearance_font), variable_pitch_handler, I(0)); ctrl_radiobuttons(s, "Font quality:", 'q', 2, HELPCTX(appearance_font), dlg_stdradiobutton_handler, @@ -371,4 +383,22 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, } } } + + /* + * Serial back end is available on Windows. + */ + if (!midsession || (protocol == PROT_SERIAL)) + ser_setup_config_box(b, midsession, 0x1F, 0x0F); + + /* + * $XAUTHORITY is not reliable on Windows, so we provide a + * means to override it. + */ + if (!midsession && backend_from_proto(PROT_SSH)) { + s = ctrl_getset(b, "Connection/SSH/X11", "x11", "X11 forwarding"); + ctrl_filesel(s, "X authority file for local display", 't', + NULL, FALSE, "Select X authority file", + HELPCTX(ssh_tunnels_xauthority), + dlg_stdfilesel_handler, I(offsetof(Config, xauthfile))); + } }