ctrl_settitle(b, "Session/Logging", "Options controlling session logging");
s = ctrl_getset(b, "Session/Logging", "main", NULL);
- ctrl_radiobuttons(s, "Session logging:", NO_SHORTCUT, 1,
- HELPCTX(logging_main),
- dlg_stdradiobutton_handler, I(offsetof(Config, logtype)),
- "Logging turned off completely", 't', I(LGTYP_NONE),
- "Log printable output only", 'p', I(LGTYP_ASCII),
- "Log all session output", 'l', I(LGTYP_DEBUG),
- "Log SSH packet data", 's', I(LGTYP_PACKETS),
- NULL);
+ /*
+ * The logging buttons change depending on whether SSH packet
+ * logging can sensibly be available.
+ */
+ {
+ char *sshlogname;
+ if ((midsession && protocol == PROT_SSH) ||
+ (!midsession && backends[3].name != NULL))
+ sshlogname = "Log SSH packet data";
+ else
+ sshlogname = NULL; /* this will disable the button */
+ ctrl_radiobuttons(s, "Session logging:", NO_SHORTCUT, 1,
+ HELPCTX(logging_main),
+ dlg_stdradiobutton_handler,
+ I(offsetof(Config, logtype)),
+ "Logging turned off completely", 't', I(LGTYP_NONE),
+ "Log printable output only", 'p', I(LGTYP_ASCII),
+ "Log all session output", 'l', I(LGTYP_DEBUG),
+ sshlogname, 's', I(LGTYP_PACKETS),
+ NULL);
+ }
ctrl_filesel(s, "Log file name:", 'f',
NULL, TRUE, "Select session log file name",
HELPCTX(logging_filename),
HELPCTX(translation_linedraw),
dlg_stdradiobutton_handler,
I(offsetof(Config, vtmode)),
- "Font has XWindows encoding", 'x', I(VT_XWINDOWS),
+ "Use Unicode line drawing code points",'u',I(VT_UNICODE),
"Poor man's line drawing (+, - and |)",'p',I(VT_POORMAN),
- "Unicode mode", 'u', I(VT_UNICODE), NULL);
+ NULL);
/*
* The Window/Selection panel.
ctrl_columns(s, 1, 100);
/*
- * The Connection panel.
+ * The Connection panel. This doesn't show up if we're in a
+ * non-network utility such as pterm. We tell this by being
+ * passed a protocol < 0.
*/
- ctrl_settitle(b, "Connection", "Options controlling the connection");
+ if (protocol >= 0) {
+ ctrl_settitle(b, "Connection", "Options controlling the connection");
- if (!midsession) {
- s = ctrl_getset(b, "Connection", "data", "Data to send to the server");
- ctrl_editbox(s, "Terminal-type string", 't', 50,
- HELPCTX(connection_termtype),
- dlg_stdeditbox_handler, I(offsetof(Config,termtype)),
- I(sizeof(((Config *)0)->termtype)));
- ctrl_editbox(s, "Auto-login username", 'u', 50,
- HELPCTX(connection_username),
- dlg_stdeditbox_handler, I(offsetof(Config,username)),
- I(sizeof(((Config *)0)->username)));
- }
+ if (!midsession) {
+ s = ctrl_getset(b, "Connection", "data",
+ "Data to send to the server");
+ ctrl_editbox(s, "Terminal-type string", 't', 50,
+ HELPCTX(connection_termtype),
+ dlg_stdeditbox_handler, I(offsetof(Config,termtype)),
+ I(sizeof(((Config *)0)->termtype)));
+ ctrl_editbox(s, "Auto-login username", 'u', 50,
+ HELPCTX(connection_username),
+ dlg_stdeditbox_handler, I(offsetof(Config,username)),
+ I(sizeof(((Config *)0)->username)));
+ }
- s = ctrl_getset(b, "Connection", "keepalive",
- "Sending of null packets to keep session active");
- ctrl_editbox(s, "Seconds between keepalives (0 to turn off)", 'k', 20,
- HELPCTX(connection_keepalive),
- dlg_stdeditbox_handler, I(offsetof(Config,ping_interval)),
- I(-1));
+ s = ctrl_getset(b, "Connection", "keepalive",
+ "Sending of null packets to keep session active");
+ ctrl_editbox(s, "Seconds between keepalives (0 to turn off)", 'k', 20,
+ HELPCTX(connection_keepalive),
+ dlg_stdeditbox_handler, I(offsetof(Config,ping_interval)),
+ I(-1));
+
+ if (!midsession) {
+ s = ctrl_getset(b, "Connection", "tcp",
+ "Low-level TCP connection options");
+ ctrl_checkbox(s, "Disable Nagle's algorithm (TCP_NODELAY option)",
+ 'n', HELPCTX(connection_nodelay),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,tcp_nodelay)));
+ }
- if (!midsession) {
- s = ctrl_getset(b, "Connection", "tcp",
- "Low-level TCP connection options");
- ctrl_checkbox(s, "Disable Nagle's algorithm (TCP_NODELAY option)", 'n',
- HELPCTX(connection_nodelay),
- dlg_stdcheckbox_handler,
- I(offsetof(Config,tcp_nodelay)));
}
if (!midsession) {
ctrl_settitle(b, "Connection/Proxy",
"Options controlling proxy usage");
- s = ctrl_getset(b, "Connection/Proxy", "basics", "Proxy basics");
- ctrl_radiobuttons(s, "Proxy type:", NO_SHORTCUT, 4,
+ s = ctrl_getset(b, "Connection/Proxy", "basics", NULL);
+ ctrl_radiobuttons(s, "Proxy type:", 't', 3,
HELPCTX(proxy_type),
dlg_stdradiobutton_handler,
I(offsetof(Config, proxy_type)),
- "None", 'n', I(PROXY_NONE),
- "HTTP", 't', I(PROXY_HTTP),
- "SOCKS", 's', I(PROXY_SOCKS),
- "Telnet", 'l', I(PROXY_TELNET),
+ "None", I(PROXY_NONE),
+ "SOCKS 4", I(PROXY_SOCKS4),
+ "SOCKS 5", I(PROXY_SOCKS5),
+ "HTTP", I(PROXY_HTTP),
+ "Telnet", I(PROXY_TELNET),
NULL);
ctrl_columns(s, 2, 80, 20);
c = ctrl_editbox(s, "Proxy hostname", 'y', 100,
I(offsetof(Config,proxy_password)),
I(sizeof(((Config *)0)->proxy_password)));
c->editbox.password = 1;
-
- s = ctrl_getset(b, "Connection/Proxy", "misc",
- "Miscellaneous proxy settings");
ctrl_editbox(s, "Telnet command", 'm', 100,
HELPCTX(proxy_command),
dlg_stdeditbox_handler,
I(offsetof(Config,proxy_telnet_command)),
I(sizeof(((Config *)0)->proxy_telnet_command)));
- ctrl_radiobuttons(s, "SOCKS Version", 'v', 2,
- HELPCTX(proxy_socksver),
- dlg_stdradiobutton_handler,
- I(offsetof(Config, proxy_socks_version)),
- "Version 5", I(5), "Version 4", I(4), NULL);
}
/*