+ ctrl_text(s, "Environment variables:", HELPCTX(telnet_environ));
+ ctrl_columns(s, 2, 80, 20);
+ ed = (struct environ_data *)
+ ctrl_alloc(b, sizeof(struct environ_data));
+ ed->varbox = ctrl_editbox(s, "Variable", 'v', 60,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed), P(NULL));
+ ed->varbox->generic.column = 0;
+ ed->valbox = ctrl_editbox(s, "Value", 'l', 60,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed), P(NULL));
+ ed->valbox->generic.column = 0;
+ ed->addbutton = ctrl_pushbutton(s, "Add", 'd',
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->addbutton->generic.column = 1;
+ ed->rembutton = ctrl_pushbutton(s, "Remove", 'r',
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->rembutton->generic.column = 1;
+ ctrl_columns(s, 1, 100);
+ ed->listbox = ctrl_listbox(s, NULL, NO_SHORTCUT,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->listbox->listbox.height = 3;
+ ed->listbox->listbox.ncols = 2;
+ ed->listbox->listbox.percentages = snewn(2, int);
+ ed->listbox->listbox.percentages[0] = 30;
+ ed->listbox->listbox.percentages[1] = 70;
+ }
+
+ 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)));
+ ctrl_checkbox(s, "Enable TCP keepalives (SO_KEEPALIVE option)",
+ 'p', HELPCTX(connection_tcpkeepalive),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,tcp_keepalives)));
+ }