From 2875af115c2baa3d5a14422b088fa3df73c177f9 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 25 Nov 2008 18:43:52 +0000 Subject: [PATCH] Fixed a PuTTYtel startup assertion failure introduced in r8305. While I'm here, a cosmetic PuTTYtel change: remove a reference to SSH from the "logical host name" label in PuTTYtel only. git-svn-id: svn://svn.tartarus.org/sgt/putty@8331 cda61777-01e9-0310-a592-d414129be87e --- config.c | 18 +++++++++++------- windows/wincfg.c | 12 +++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/config.c b/config.c index 09c77d57..8d492df1 100644 --- a/config.c +++ b/config.c @@ -1729,13 +1729,17 @@ void setup_config_box(struct controlbox *b, int midsession, NULL); #endif - s = ctrl_getset(b, "Connection", "identity", - "Logical name of remote host"); - ctrl_editbox(s, "Logical name of remote host (e.g. for SSH key lookup):", - 'm', 100, - HELPCTX(connection_loghost), - dlg_stdeditbox_handler, I(offsetof(Config,loghost)), - I(sizeof(((Config *)0)->loghost))); + { + char *label = backend_from_proto(PROT_SSH) ? + "Logical name of remote host (e.g. for SSH key lookup):" : + "Logical name of remote host:"; + s = ctrl_getset(b, "Connection", "identity", + "Logical name of remote host"); + ctrl_editbox(s, label, 'm', 100, + HELPCTX(connection_loghost), + dlg_stdeditbox_handler, I(offsetof(Config,loghost)), + I(sizeof(((Config *)0)->loghost))); + } } /* diff --git a/windows/wincfg.c b/windows/wincfg.c index 516f0a3d..d3201c4e 100644 --- a/windows/wincfg.c +++ b/windows/wincfg.c @@ -382,9 +382,11 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * $XAUTHORITY is not reliable on Windows, so we provide a * means to override it. */ - 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))); + if (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))); + } } -- 2.11.0