+#ifndef NO_IPV6
+ s = ctrl_getset(b, "Connection", "ipversion",
+ "Internet protocol version");
+ ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3,
+ HELPCTX(connection_ipversion),
+ dlg_stdradiobutton_handler,
+ I(offsetof(Config, addressfamily)),
+ "Auto", NO_SHORTCUT, I(ADDRTYPE_UNSPEC),
+ "IPv4", NO_SHORTCUT, I(ADDRTYPE_IPV4),
+ "IPv6", NO_SHORTCUT, I(ADDRTYPE_IPV6),
+ NULL);
+#endif
+ }
+
+ /*
+ * A sub-panel Connection/Data, containing options that
+ * decide on data to send to the server.
+ */
+ if (!midsession) {
+ ctrl_settitle(b, "Connection/Data", "Data to send to the server");
+
+ s = ctrl_getset(b, "Connection/Data", "login",
+ "Login details");
+ 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/Data", "term",
+ "Terminal details");
+ 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, "Terminal speeds", 's', 50,
+ HELPCTX(connection_termspeed),
+ dlg_stdeditbox_handler, I(offsetof(Config,termspeed)),
+ I(sizeof(((Config *)0)->termspeed)));
+
+ s = ctrl_getset(b, "Connection/Data", "env",
+ "Environment variables");
+ 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;