diff --git a/config.c b/config.c index e7597831..8114a586 100644 --- a/config.c +++ b/config.c @@ -312,7 +312,7 @@ static void config_protocols_handler(union control *ctrl, dlgparam *dlg, for (size_t i = n_ui_backends; i < PROTOCOL_LIMIT && backends[i]; i++) { dlg_listbox_addwithid(ctrl, dlg, - backends[i]->displayname, + backends[i]->displayname_tc, backends[i]->protocol); if (backends[i]->protocol == curproto) curentry = i - n_ui_backends; @@ -1793,7 +1793,7 @@ void setup_config_box(struct controlbox *b, bool midsession, for (size_t i = 0; i < n_ui_backends; i++) { assert(backends[i]); c->radio.buttons[c->radio.nbuttons] = - dupstr(backends[i]->displayname); + dupstr(backends[i]->displayname_tc); c->radio.shortcuts[c->radio.nbuttons] = (backends[i]->protocol == PROT_SSH ? 's' : backends[i]->protocol == PROT_SERIAL ? 'r' : diff --git a/otherbackends/raw.c b/otherbackends/raw.c index 491a3df9..d6693244 100644 --- a/otherbackends/raw.c +++ b/otherbackends/raw.c @@ -338,7 +338,8 @@ const BackendVtable raw_backend = { .unthrottle = raw_unthrottle, .cfg_info = raw_cfg_info, .id = "raw", - .displayname = "Raw", + .displayname_tc = "Raw", + .displayname_lc = "raw", .protocol = PROT_RAW, .default_port = 0, }; diff --git a/otherbackends/rlogin.c b/otherbackends/rlogin.c index 9951ce18..44a3f625 100644 --- a/otherbackends/rlogin.c +++ b/otherbackends/rlogin.c @@ -445,7 +445,8 @@ const BackendVtable rlogin_backend = { .unthrottle = rlogin_unthrottle, .cfg_info = rlogin_cfg_info, .id = "rlogin", - .displayname = "Rlogin", + .displayname_tc = "Rlogin", + .displayname_lc = "Rlogin", /* proper name, so capitalise it anyway */ .protocol = PROT_RLOGIN, .default_port = 513, }; diff --git a/otherbackends/supdup.c b/otherbackends/supdup.c index f015e054..2ec8e0f9 100644 --- a/otherbackends/supdup.c +++ b/otherbackends/supdup.c @@ -936,7 +936,8 @@ const BackendVtable supdup_backend = { .unthrottle = supdup_unthrottle, .cfg_info = supdup_cfg_info, .id = "supdup", - .displayname = "SUPDUP", + .displayname_tc = "SUPDUP", + .displayname_lc = "SUPDUP", /* proper name, so capitalise it anyway */ .protocol = PROT_SUPDUP, .default_port = 0137, .flags = BACKEND_RESIZE_FORBIDDEN | BACKEND_NEEDS_TERMINAL, diff --git a/otherbackends/telnet.c b/otherbackends/telnet.c index 281c39ac..048bb2d6 100644 --- a/otherbackends/telnet.c +++ b/otherbackends/telnet.c @@ -1082,7 +1082,8 @@ const BackendVtable telnet_backend = { .unthrottle = telnet_unthrottle, .cfg_info = telnet_cfg_info, .id = "telnet", - .displayname = "Telnet", + .displayname_tc = "Telnet", + .displayname_lc = "Telnet", /* proper name, so capitalise it anyway */ .protocol = PROT_TELNET, .default_port = 23, }; diff --git a/otherbackends/testback.c b/otherbackends/testback.c index 5f319722..dbe282ec 100644 --- a/otherbackends/testback.c +++ b/otherbackends/testback.c @@ -71,7 +71,8 @@ const BackendVtable null_backend = { .unthrottle = null_unthrottle, .cfg_info = null_cfg_info, .id = "null", - .displayname = "null", + .displayname_tc = "Null", + .displayname_lc = "null", .protocol = -1, .default_port = 0, }; @@ -93,7 +94,8 @@ const BackendVtable loop_backend = { .unthrottle = null_unthrottle, .cfg_info = null_cfg_info, .id = "loop", - .displayname = "loop", + .displayname_tc = "Loop", + .displayname_lc = "loop", .protocol = -1, .default_port = 0, }; diff --git a/putty.h b/putty.h index ff679752..a2136a05 100644 --- a/putty.h +++ b/putty.h @@ -681,9 +681,10 @@ struct BackendVtable { char *(*close_warn_text)(Backend *be); /* 'id' is a machine-readable name for the backend, used in - * saved-session storage. 'displayname' is a human-readable name - * for error messages. */ - const char *id, *displayname; + * saved-session storage. 'displayname_tc' and 'displayname_lc' + * are human-readable names, one in title-case for config boxes, + * and one in lower-case for use in mid-sentence. */ + const char *id, *displayname_tc, *displayname_lc; int protocol; int default_port; diff --git a/ssh/ssh.c b/ssh/ssh.c index b2d75b09..103f5795 100644 --- a/ssh/ssh.c +++ b/ssh/ssh.c @@ -1248,7 +1248,8 @@ const BackendVtable ssh_backend = { .test_for_upstream = ssh_test_for_upstream, .close_warn_text = ssh_close_warn_text, .id = "ssh", - .displayname = "SSH", + .displayname_tc = "SSH", + .displayname_lc = "SSH", /* proper name, so capitalise it anyway */ .protocol = PROT_SSH, .flags = BACKEND_SUPPORTS_NC_HOST | BACKEND_NOTIFIES_SESSION_START, .default_port = 22, @@ -1273,7 +1274,8 @@ const BackendVtable sshconn_backend = { .test_for_upstream = ssh_test_for_upstream, .close_warn_text = ssh_close_warn_text, .id = "ssh-connection", - .displayname = "Bare ssh-connection", + .displayname_tc = "Bare ssh-connection", + .displayname_lc = "bare ssh-connection", .protocol = PROT_SSHCONN, .flags = BACKEND_SUPPORTS_NC_HOST | BACKEND_NOTIFIES_SESSION_START, }; diff --git a/unix/plink.c b/unix/plink.c index 69667a3d..643fc563 100644 --- a/unix/plink.c +++ b/unix/plink.c @@ -835,7 +835,7 @@ int main(int argc, char **argv) if (backvt->flags & BACKEND_NEEDS_TERMINAL) { fprintf(stderr, "Plink doesn't support %s, which needs terminal emulation\n", - backvt->displayname); + backvt->displayname_lc); return 1; } @@ -912,7 +912,7 @@ int main(int argc, char **argv) if (just_test_share_exists) { if (!backvt->test_for_upstream) { fprintf(stderr, "Connection sharing not supported for this " - "connection type (%s)'\n", backvt->displayname); + "connection type (%s)'\n", backvt->displayname_lc); return 1; } if (backvt->test_for_upstream(conf_get_str(conf, CONF_host), diff --git a/unix/pty.c b/unix/pty.c index e74ebd4b..46382c06 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -1597,6 +1597,7 @@ const BackendVtable pty_backend = { .unthrottle = pty_unthrottle, .cfg_info = pty_cfg_info, .id = "pty", - .displayname = "pty", + .displayname_tc = "pty", + .displayname_lc = "pty", .protocol = -1, }; diff --git a/unix/serial.c b/unix/serial.c index 905c1b2d..6c8f9b9e 100644 --- a/unix/serial.c +++ b/unix/serial.c @@ -583,7 +583,8 @@ const BackendVtable serial_backend = { .unthrottle = serial_unthrottle, .cfg_info = serial_cfg_info, .id = "serial", - .displayname = "Serial", + .displayname_tc = "Serial", + .displayname_lc = "serial", .protocol = PROT_SERIAL, .serial_parity_mask = ((1 << SER_PAR_NONE) | (1 << SER_PAR_ODD) | diff --git a/windows/conpty.c b/windows/conpty.c index 322af7bf..83cb9635 100644 --- a/windows/conpty.c +++ b/windows/conpty.c @@ -385,6 +385,7 @@ const BackendVtable conpty_backend = { .unthrottle = conpty_unthrottle, .cfg_info = conpty_cfg_info, .id = "conpty", - .displayname = "ConPTY", + .displayname_tc = "ConPTY", + .displayname_lc = "ConPTY", /* proper name, so capitalise it anyway */ .protocol = -1, }; diff --git a/windows/plink.c b/windows/plink.c index 503ae30b..b49266d3 100644 --- a/windows/plink.c +++ b/windows/plink.c @@ -415,7 +415,7 @@ int main(int argc, char **argv) if (vt->flags & BACKEND_NEEDS_TERMINAL) { fprintf(stderr, "Plink doesn't support %s, which needs terminal emulation\n", - vt->displayname); + vt->displayname_lc); return 1; } @@ -441,7 +441,7 @@ int main(int argc, char **argv) if (just_test_share_exists) { if (!vt->test_for_upstream) { fprintf(stderr, "Connection sharing not supported for this " - "connection type (%s)'\n", vt->displayname); + "connection type (%s)'\n", vt->displayname_lc); return 1; } if (vt->test_for_upstream(conf_get_str(conf, CONF_host), diff --git a/windows/serial.c b/windows/serial.c index d966145c..82146a40 100644 --- a/windows/serial.c +++ b/windows/serial.c @@ -452,7 +452,8 @@ const BackendVtable serial_backend = { .unthrottle = serial_unthrottle, .cfg_info = serial_cfg_info, .id = "serial", - .displayname = "Serial", + .displayname_tc = "Serial", + .displayname_lc = "serial", .protocol = PROT_SERIAL, .serial_parity_mask = ((1 << SER_PAR_NONE) | (1 << SER_PAR_ODD) |