mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Turn the proxy type radio buttons into a dropdown list.
This makes room to add more entries without the Proxy panel overflowing. It also means we can put in a bit more explanation in some of the more cryptic one-word names!
This commit is contained in:
@ -32,8 +32,7 @@ void unix_setup_config_box(struct controlbox *b, bool midsession, int protocol)
|
||||
s->ctrls[0]->editbox.has_list = false;
|
||||
|
||||
/*
|
||||
* Unix supports a local-command proxy. This also means we must
|
||||
* adjust the text on the `Telnet command' control.
|
||||
* Unix supports a local-command proxy.
|
||||
*/
|
||||
if (!midsession) {
|
||||
int i;
|
||||
@ -41,30 +40,8 @@ void unix_setup_config_box(struct controlbox *b, bool midsession, int protocol)
|
||||
for (i = 0; i < s->ncontrols; i++) {
|
||||
c = s->ctrls[i];
|
||||
if (c->generic.type == CTRL_RADIO &&
|
||||
c->generic.context.i == CONF_proxy_type) {
|
||||
assert(c->generic.handler == conf_radiobutton_handler);
|
||||
c->radio.nbuttons++;
|
||||
c->radio.buttons =
|
||||
sresize(c->radio.buttons, c->radio.nbuttons, char *);
|
||||
c->radio.buttons[c->radio.nbuttons-1] =
|
||||
dupstr("Local");
|
||||
c->radio.buttondata =
|
||||
sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
|
||||
c->radio.buttondata[c->radio.nbuttons-1] = I(PROXY_CMD);
|
||||
if (c->radio.ncolumns < 4)
|
||||
c->radio.ncolumns = 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < s->ncontrols; i++) {
|
||||
c = s->ctrls[i];
|
||||
if (c->generic.type == CTRL_EDITBOX &&
|
||||
c->generic.context.i == CONF_proxy_telnet_command) {
|
||||
assert(c->generic.handler == conf_editbox_handler);
|
||||
sfree(c->generic.label);
|
||||
c->generic.label = dupstr("Telnet command, or local"
|
||||
" proxy command");
|
||||
c->generic.handler == proxy_type_handler) {
|
||||
c->generic.context.i |= PROXY_UI_FLAG_LOCAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user