+ IDC0_PROTSSH, NULL);
+ }
+ sesssaver(&cp, "Stor&ed Sessions",
+ IDC0_SESSSTATIC, IDC0_SESSEDIT, IDC0_SESSLIST,
+ "&Load", IDC0_SESSLOAD,
+ "&Save", IDC0_SESSSAVE,
+ "&Delete", IDC0_SESSDEL, NULL);
+ }
+ checkbox(&cp, "Close Window on E&xit", IDC0_CLOSEEXIT);
+ checkbox(&cp, "&Warn on Close", IDC0_CLOSEWARN);
+
+ tab.mask = TCIF_TEXT; tab.pszText = "Connection";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Keyboard panel. Accelerators used: [aco] 4?ehiklmnprsuvxy */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ radioline(&cp, "Action of Backspace:", IDC1_DELSTATIC, 2,
+ "Control-&H", IDC1_DEL008,
+ "Control-&? (127)", IDC1_DEL127, NULL);
+ radioline(&cp, "Action of Home and End:", IDC1_HOMESTATIC, 2,
+ "&Standard", IDC1_HOMETILDE,
+ "&rxvt", IDC1_HOMERXVT, NULL);
+ radioline(&cp, "Function key and keypad layout:", IDC1_FUNCSTATIC, 3,
+ "&VT400", IDC1_FUNCTILDE,
+ "&Linux", IDC1_FUNCLINUX,
+ "&Xterm R6", IDC1_FUNCXTERM, NULL);
+ radioline(&cp, "Initial state of cursor keys:", IDC1_CURSTATIC, 2,
+ "&Normal", IDC1_CURNORMAL,
+ "A&pplication", IDC1_CURAPPLIC, NULL);
+ radioline(&cp, "Initial state of numeric keypad:", IDC1_KPSTATIC, 3,
+ "Nor&mal", IDC1_KPNORMAL,
+ "Appl&ication", IDC1_KPAPPLIC,
+ "N&etHack", IDC1_KPNH, NULL);
+ checkbox(&cp, "ALT-F&4 is special (closes window)", IDC1_ALTF4);
+ checkbox(&cp, "ALT-Space is special (S&ystem menu)", IDC1_ALTSPACE);
+ checkbox(&cp, "&Use local terminal line discipline", IDC1_LDISCTERM);
+ checkbox(&cp, "Reset scrollback on &keypress", IDC1_SCROLLKEY);
+
+ tab.mask = TCIF_TEXT; tab.pszText = "Keyboard";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Terminal panel. Accelerators used: [aco] dghlmnprsw */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ multiedit(&cp,
+ "&Rows", IDC2_ROWSSTATIC, IDC2_ROWSEDIT, 33,
+ "Colu&mns", IDC2_COLSSTATIC, IDC2_COLSEDIT, 33,
+ "&Scrollback", IDC2_SAVESTATIC, IDC2_SAVEEDIT, 33,
+ NULL);
+ staticbtn(&cp, "", IDC2_FONTSTATIC, "C&hange...", IDC2_CHOOSEFONT);
+ checkbox(&cp, "Auto &wrap mode initially on", IDC2_WRAPMODE);
+ checkbox(&cp, "&DEC Origin Mode initially on", IDC2_DECOM);
+ checkbox(&cp, "Implicit CR in every &LF", IDC2_LFHASCR);
+ checkbox(&cp, "Bee&p enabled", IDC2_BEEP);
+ checkbox(&cp, "Use Back&ground colour erase", IDC2_BCE);
+ checkbox(&cp, "Enable bli&nking text", IDC2_BLINKTEXT);
+ tab.mask = TCIF_TEXT; tab.pszText = "Terminal";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Window panel. Accelerators used: [aco] bikty */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ if (dlgtype == 0)
+ multiedit(&cp,
+ "Initial window &title:", IDC3_WINTITLE,
+ IDC3_WINEDIT, 100, NULL);
+ checkbox(&cp, "Avoid ever using &icon title", IDC3_WINNAME);
+ checkbox(&cp, "&Blinking cursor", IDC3_BLINKCUR);
+ checkbox(&cp, "Displa&y scrollbar", IDC3_SCROLLBAR);
+ checkbox(&cp, "Loc&k Window size", IDC3_LOCKSIZE);
+ tab.mask = TCIF_TEXT; tab.pszText = "Window";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Telnet panel. Accelerators used: [aco] bdflrstuv */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ if (dlgtype == 0) {
+ staticedit(&cp, "Terminal-&type string", IDC4_TTSTATIC, IDC4_TTEDIT);
+ staticedit(&cp, "Terminal-&speed string", IDC4_TSSTATIC, IDC4_TSEDIT);
+ staticedit(&cp, "Auto-login &username", IDC4_LOGSTATIC, IDC4_LOGEDIT);
+ envsetter(&cp, "Environment variables:", IDC4_ENVSTATIC,
+ "&Variable", IDC4_VARSTATIC, IDC4_VAREDIT,
+ "Va&lue", IDC4_VALSTATIC, IDC4_VALEDIT,
+ IDC4_ENVLIST,
+ "A&dd", IDC4_ENVADD, "&Remove", IDC4_ENVREMOVE);
+ radioline(&cp, "Handling of OLD_ENVIRON ambiguity:", IDC4_EMSTATIC, 2,
+ "&BSD (commonplace)", IDC4_EMBSD,
+ "R&FC 1408 (unusual)", IDC4_EMRFC, NULL);
+ tab.mask = TCIF_TEXT; tab.pszText = "Telnet";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+ }
+
+ /* The SSH panel. Accelerators used: [aco] 123abdkmprtuw */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ if (dlgtype == 0) {
+ staticedit(&cp, "Terminal-&type string", IDC5_TTSTATIC, IDC5_TTEDIT);
+ staticedit(&cp, "Auto-login &username", IDC5_LOGSTATIC, IDC5_LOGEDIT);
+ multiedit(&cp,
+ "&Remote command:", IDC5_CMDSTATIC, IDC5_CMDEDIT, 100,
+ NULL);
+ checkbox(&cp, "Don't allocate a &pseudo-terminal", IDC5_NOPTY);
+ checkbox(&cp, "Atte&mpt TIS or CryptoCard authentication",
+ IDC5_AUTHTIS);
+ checkbox(&cp, "Allow &agent forwarding", IDC5_AGENTFWD);
+ editbutton(&cp, "Private &key file for authentication:",
+ IDC5_PKSTATIC, IDC5_PKEDIT, "Bro&wse...", IDC5_PKBUTTON);
+ radioline(&cp, "Preferred SSH protocol version:",
+ IDC5_SSHPROTSTATIC, 2,
+ "&1", IDC5_SSHPROT1, "&2", IDC5_SSHPROT2, NULL);
+ radioline(&cp, "Preferred encryption algorithm:", IDC5_CIPHERSTATIC, 3,
+ "&3DES", IDC5_CIPHER3DES,
+ "&Blowfish", IDC5_CIPHERBLOWF,
+ "&DES", IDC5_CIPHERDES, NULL);
+ tab.mask = TCIF_TEXT; tab.pszText = "SSH";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+ }
+
+ /* The Selection panel. Accelerators used: [aco] stwx */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ radiobig(&cp, "Action of mouse buttons:", IDC6_MBSTATIC,
+ "&Windows (Right pastes, Middle extends)", IDC6_MBWINDOWS,
+ "&xterm (Right extends, Middle pastes)", IDC6_MBXTERM,
+ NULL);
+ charclass(&cp, "Character classes:", IDC6_CCSTATIC, IDC6_CCLIST,
+ "&Set", IDC6_CCSET, IDC6_CCEDIT,
+ "&to class", IDC6_CCSTATIC2);
+ tab.mask = TCIF_TEXT; tab.pszText = "Selection";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Colours panel. Accelerators used: [aco] bmlu */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ checkbox(&cp, "&Bolded text is a different colour", IDC7_BOLDCOLOUR);
+ checkbox(&cp, "Attempt to use &logical palettes", IDC7_PALETTE);
+ colouredit(&cp, "Select a colo&ur and click to modify it:",
+ IDC7_STATIC, IDC7_LIST,
+ "&Modify...", IDC7_CHANGE,
+ "Red:", IDC7_RSTATIC, IDC7_RVALUE,
+ "Green:", IDC7_GSTATIC, IDC7_GVALUE,
+ "Blue:", IDC7_BSTATIC, IDC7_BVALUE, NULL);
+ tab.mask = TCIF_TEXT; tab.pszText = "Colours";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ /* The Translation panel. Accelerators used: [aco] beiknpsx */
+ {
+ struct ctlpos cp;
+ ctlposinit(&cp, hwnd, 6, 30);
+ radiobig(&cp,
+ "Handling of VT100 line drawing characters:", IDC8_VTSTATIC,
+ "Font has &XWindows encoding", IDC8_VTXWINDOWS,
+ "Use font in &both ANSI and OEM modes", IDC8_VTOEMANSI,
+ "Use font in O&EM mode only", IDC8_VTOEMONLY,
+ "&Poor man's line drawing (""+"", ""-"" and ""|"")",
+ IDC8_VTPOORMAN, NULL);
+ radiobig(&cp,
+ "Character set translation:", IDC8_XLATSTATIC,
+ "&None", IDC8_NOXLAT,
+ "&KOI8 / Win-1251", IDC8_KOI8WIN1251,
+ "&ISO-8859-2 / Win-1250", IDC8_88592WIN1250, NULL);
+ checkbox(&cp, "CAP&S LOCK acts as cyrillic switch", IDC8_CAPSLOCKCYR);
+ tab.mask = TCIF_TEXT; tab.pszText = "Translation";
+ TabCtrl_InsertItem (tabctl, i++, &tab);
+ }
+
+ init_dlg_ctrls(hwnd);
+
+ hide(hwnd, TRUE, controlstartvalue, controlendvalue);
+ hide(hwnd, FALSE, connectionpanelstart, connectionpanelend);
+
+ /*
+ * Set focus into the first available control.
+ */
+ {
+ HWND ctl;
+ ctl = GetDlgItem(hwnd, IDC0_HOST);
+ if (!ctl) ctl = GetDlgItem(hwnd, IDC0_CLOSEEXIT);
+ SetFocus(ctl);