+ SetDlgItemText (hwnd, IDC_HOST, cfg.host);
+ SetDlgItemText (hwnd, IDC_SESSEDIT, savedsession);
+ SetDlgItemInt (hwnd, IDC_PORT, cfg.port, FALSE);
+ CheckRadioButton (hwnd, IDC_PROTRAW, IDC_PROTSSH,
+ cfg.protocol==PROT_SSH ? IDC_PROTSSH :
+ cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW );
+ SetDlgItemInt (hwnd, IDC_PINGEDIT, cfg.ping_interval, FALSE);
+
+ CheckRadioButton (hwnd, IDC_DEL008, IDC_DEL127,
+ cfg.bksp_is_delete ? IDC_DEL127 : IDC_DEL008);
+ CheckRadioButton (hwnd, IDC_HOMETILDE, IDC_HOMERXVT,
+ cfg.rxvt_homeend ? IDC_HOMERXVT : IDC_HOMETILDE);
+ CheckRadioButton (hwnd, IDC_FUNCTILDE, IDC_FUNCVT400,
+ cfg.funky_type == 0 ? IDC_FUNCTILDE :
+ cfg.funky_type == 1 ? IDC_FUNCLINUX :
+ cfg.funky_type == 2 ? IDC_FUNCXTERM :
+ cfg.funky_type == 3 ? IDC_FUNCVT400 :
+ IDC_FUNCTILDE );
+ CheckDlgButton (hwnd, IDC_NOAPPLICC, cfg.no_applic_c);
+ CheckDlgButton (hwnd, IDC_NOAPPLICK, cfg.no_applic_k);
+ CheckRadioButton (hwnd, IDC_CURNORMAL, IDC_CURAPPLIC,
+ cfg.app_cursor ? IDC_CURAPPLIC : IDC_CURNORMAL);
+ CheckRadioButton (hwnd, IDC_KPNORMAL, IDC_KPNH,
+ cfg.nethack_keypad ? IDC_KPNH :
+ cfg.app_keypad ? IDC_KPAPPLIC : IDC_KPNORMAL);
+ CheckDlgButton (hwnd, IDC_ALTF4, cfg.alt_f4);
+ CheckDlgButton (hwnd, IDC_ALTSPACE, cfg.alt_space);
+ CheckDlgButton (hwnd, IDC_ALTONLY, cfg.alt_only);
+ CheckDlgButton (hwnd, IDC_COMPOSEKEY, cfg.compose_key);
+ CheckDlgButton (hwnd, IDC_LDISCTERM, cfg.ldisc_term);
+ CheckDlgButton (hwnd, IDC_ALWAYSONTOP, cfg.alwaysontop);
+ CheckDlgButton (hwnd, IDC_SCROLLKEY, cfg.scroll_on_key);
+ CheckDlgButton (hwnd, IDC_SCROLLDISP, cfg.scroll_on_disp);
+
+ CheckDlgButton (hwnd, IDC_WRAPMODE, cfg.wrap_mode);
+ CheckDlgButton (hwnd, IDC_DECOM, cfg.dec_om);
+ CheckDlgButton (hwnd, IDC_LFHASCR, cfg.lfhascr);
+ SetDlgItemInt (hwnd, IDC_ROWSEDIT, cfg.height, FALSE);
+ SetDlgItemInt (hwnd, IDC_COLSEDIT, cfg.width, FALSE);
+ SetDlgItemInt (hwnd, IDC_SAVEEDIT, cfg.savelines, FALSE);
+ fmtfont (fontstatic);
+ SetDlgItemText (hwnd, IDC_FONTSTATIC, fontstatic);
+ CheckDlgButton (hwnd, IDC_BEEP, cfg.beep);
+ CheckDlgButton (hwnd, IDC_BCE, cfg.bce);
+ CheckDlgButton (hwnd, IDC_BLINKTEXT, cfg.blinktext);
+
+ SetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle);
+ CheckDlgButton (hwnd, IDC_WINNAME, cfg.win_name_always);
+ CheckDlgButton (hwnd, IDC_BLINKCUR, cfg.blink_cur);
+ CheckDlgButton (hwnd, IDC_SCROLLBAR, cfg.scrollbar);
+ CheckDlgButton (hwnd, IDC_LOCKSIZE, cfg.locksize);
+ CheckDlgButton (hwnd, IDC_CLOSEEXIT, cfg.close_on_exit);
+ CheckDlgButton (hwnd, IDC_CLOSEWARN, cfg.warn_on_close);
+
+ SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype);
+ SetDlgItemText (hwnd, IDC_TSEDIT, cfg.termspeed);
+ SetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username);
+ SetDlgItemText (hwnd, IDC_LGFEDIT, cfg.logfilename);
+ CheckRadioButton(hwnd, IDC_LSTATOFF, IDC_LSTATRAW,
+ cfg.logtype == 0 ? IDC_LSTATOFF :
+ cfg.logtype == 1 ? IDC_LSTATASCII :
+ IDC_LSTATRAW);
+ {
+ char *p = cfg.environmt;
+ while (*p) {
+ SendDlgItemMessage (hwnd, IDC_ENVLIST, LB_ADDSTRING, 0,
+ (LPARAM) p);
+ p += strlen(p)+1;
+ }
+ }
+ CheckRadioButton (hwnd, IDC_EMBSD, IDC_EMRFC,
+ cfg.rfc_environ ? IDC_EMRFC : IDC_EMBSD);
+
+ SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype);
+ SetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username);
+ CheckDlgButton (hwnd, IDC_NOPTY, cfg.nopty);
+ CheckDlgButton (hwnd, IDC_COMPRESS, cfg.compression);
+ CheckDlgButton (hwnd, IDC_BUGGYMAC, cfg.buggymac);
+ CheckDlgButton (hwnd, IDC_AGENTFWD, cfg.agentfwd);
+ CheckRadioButton (hwnd, IDC_CIPHER3DES, IDC_CIPHERDES,
+ cfg.cipher == CIPHER_BLOWFISH ? IDC_CIPHERBLOWF :
+ cfg.cipher == CIPHER_DES ? IDC_CIPHERDES :
+ IDC_CIPHER3DES);
+ CheckRadioButton (hwnd, IDC_SSHPROT1, IDC_SSHPROT2,
+ cfg.sshprot == 1 ? IDC_SSHPROT1 : IDC_SSHPROT2);
+ CheckDlgButton (hwnd, IDC_AUTHTIS, cfg.try_tis_auth);
+ SetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile);
+ SetDlgItemText (hwnd, IDC_CMDEDIT, cfg.remote_cmd);
+
+ CheckRadioButton (hwnd, IDC_MBWINDOWS, IDC_MBXTERM,
+ cfg.mouse_is_xterm ? IDC_MBXTERM : IDC_MBWINDOWS);
+ {
+ static int tabs[4] = {25, 61, 96, 128};
+ SendDlgItemMessage (hwnd, IDC_CCLIST, LB_SETTABSTOPS, 4,
+ (LPARAM) tabs);
+ }
+ for (i=0; i<256; i++) {
+ char str[100];
+ sprintf(str, "%d\t(0x%02X)\t%c\t%d", i, i,
+ (i>=0x21 && i != 0x7F) ? i : ' ',
+ cfg.wordness[i]);
+ SendDlgItemMessage (hwnd, IDC_CCLIST, LB_ADDSTRING, 0,
+ (LPARAM) str);
+ }