X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windlg.c;h=202e6cf7410eb0f37e06c17360202556ee335cc4;hb=46803abdbe7a1dc1e4de5084c334ce4d7e05a790;hp=78e237cd5ab912e8c3b205cf79a412f4c2239180;hpb=88a3baa06541fc6563f5f94bac4758141eada690;p=PuTTY.git diff --git a/windlg.c b/windlg.c index 78e237cd..202e6cf7 100644 --- a/windlg.c +++ b/windlg.c @@ -12,6 +12,12 @@ #include "win_res.h" #include "storage.h" +#ifdef MSVC4 +#define TVINSERTSTRUCT TV_INSERTSTRUCT +#define TVITEM TV_ITEM +#define ICON_BIG 1 +#endif + static char **events = NULL; static int nevents = 0, negsize = 0; @@ -437,6 +443,7 @@ enum { IDCX_ABOUT = IDC_TPASSIVE, IDC_TACTIVE, IDC_TELNETKEY, + IDC_TELNETRET, telnetpanelend, rloginpanelstart, @@ -803,6 +810,8 @@ char *help_context_cmd(int id) return "JI(`',`telnet.passive')"; case IDC_TELNETKEY: return "JI(`',`telnet.specialkeys')"; + case IDC_TELNETRET: + return "JI(`',`telnet.newline')"; case IDC_R_TSSTATIC: case IDC_R_TSEDIT: @@ -969,6 +978,7 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) CheckDlgButton(hwnd, IDC_COMPOSEKEY, cfg.compose_key); CheckDlgButton(hwnd, IDC_CTRLALTKEYS, cfg.ctrlaltkeys); CheckDlgButton(hwnd, IDC_TELNETKEY, cfg.telnet_keyboard); + CheckDlgButton(hwnd, IDC_TELNETRET, cfg.telnet_newline); CheckRadioButton(hwnd, IDC_ECHOBACKEND, IDC_ECHONO, cfg.localecho == LD_BACKEND ? IDC_ECHOBACKEND : cfg.localecho == LD_YES ? IDC_ECHOYES : IDC_ECHONO); @@ -1580,6 +1590,8 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) beginbox(&cp, "Adjust telnet session.", IDC_BOX_CONNECTION1); checkbox(&cp, "Keyboard sends telnet Backspace and Interrupt", IDC_TELNETKEY); + checkbox(&cp, "Return key sends telnet New Line instead of ^M", + IDC_TELNETRET); endbox(&cp); } beginbox(&cp, "Sending of null packets to keep session active", @@ -1620,6 +1632,8 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) IDC_TACTIVE, NULL); checkbox(&cp, "&Keyboard sends telnet Backspace and Interrupt", IDC_TELNETKEY); + checkbox(&cp, "Return key sends telnet New Line instead of ^M", + IDC_TELNETRET); endbox(&cp); } } @@ -2333,6 +2347,12 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, cfg.telnet_keyboard = IsDlgButtonChecked(hwnd, IDC_TELNETKEY); break; + case IDC_TELNETRET: + if (HIWORD(wParam) == BN_CLICKED || + HIWORD(wParam) == BN_DOUBLECLICKED) + cfg.telnet_newline = + IsDlgButtonChecked(hwnd, IDC_TELNETRET); + break; case IDC_WRAPMODE: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED)