X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/acb796a268236409eaf814ac22e329a008632c3a..6908fed739ac49c43d4400ef572e0811a0ac676e:/windlg.c diff --git a/windlg.c b/windlg.c index c7530f25..52e092da 100644 --- a/windlg.c +++ b/windlg.c @@ -354,9 +354,12 @@ enum { IDCX_ABOUT = IDC_ROWSEDIT, IDC_COLSSTATIC, IDC_COLSEDIT, - IDC_LOCKSIZE, - IDC_LOCKFONT, + IDC_RESIZESTATIC, + IDC_RESIZETERM, + IDC_RESIZEFONT, + IDC_RESIZENONE, IDC_SCROLLBAR, + IDC_SCROLLBARFULLSCREEN, IDC_CLOSEWARN, IDC_SAVESTATIC, IDC_SAVEEDIT, @@ -476,6 +479,9 @@ enum { IDCX_ABOUT = IDC_MBWINDOWS, IDC_MBXTERM, IDC_MOUSEOVERRIDE, + IDC_SELTYPESTATIC, + IDC_SELTYPELEX, + IDC_SELTYPERECT, IDC_CCSTATIC, IDC_CCLIST, IDC_CCSET, @@ -673,8 +679,11 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) cfg.cursor_type == 1 ? IDC_CURUNDER : IDC_CURVERT); CheckDlgButton(hwnd, IDC_BLINKCUR, cfg.blink_cur); CheckDlgButton(hwnd, IDC_SCROLLBAR, cfg.scrollbar); - CheckDlgButton(hwnd, IDC_LOCKSIZE, cfg.locksize); - CheckDlgButton(hwnd, IDC_LOCKFONT, cfg.lockfont); + CheckDlgButton(hwnd, IDC_SCROLLBARFULLSCREEN, cfg.scrollbar_in_fullscreen); + CheckRadioButton(hwnd, IDC_RESIZETERM, IDC_RESIZENONE, + cfg.resize_action == RESIZE_TERM ? IDC_RESIZETERM : + cfg.resize_action == RESIZE_FONT ? IDC_RESIZEFONT : + IDC_RESIZENONE); CheckRadioButton(hwnd, IDC_COEALWAYS, IDC_COENORMAL, cfg.close_on_exit == COE_NORMAL ? IDC_COENORMAL : cfg.close_on_exit == @@ -757,9 +766,10 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) } - CheckRadioButton(hwnd, IDC_MBWINDOWS, IDC_MBXTERM, cfg.mouse_is_xterm ? IDC_MBXTERM : IDC_MBWINDOWS); + CheckRadioButton(hwnd, IDC_SELTYPELEX, IDC_SELTYPERECT, + cfg.rect_select == 0 ? IDC_SELTYPELEX : IDC_SELTYPERECT); CheckDlgButton(hwnd, IDC_MOUSEOVERRIDE, cfg.mouse_override); CheckDlgButton(hwnd, IDC_RAWCNP, cfg.rawcnp); { @@ -1036,7 +1046,7 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) } if (panel == windowpanelstart) { - /* The Window panel. Accelerators used: [acgo] rmz sdkp w4ylt f */ + /* The Window panel. Accelerators used: [acgo] rmz sdikp w4ylt f */ struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling PuTTY's window", @@ -1045,14 +1055,17 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) multiedit(&cp, "&Rows", IDC_ROWSSTATIC, IDC_ROWSEDIT, 50, "Colu&mns", IDC_COLSSTATIC, IDC_COLSEDIT, 50, NULL); - checkbox(&cp, "Lock terminal size against resi&zing", IDC_LOCKSIZE); - checkbox(&cp, "Lock font size against resi&zing", IDC_LOCKFONT); + radioline(&cp, "Action when the window is resized:", IDC_RESIZESTATIC, + 3, "Resi&ze terminal", IDC_RESIZETERM, + "Change fo&nt", IDC_RESIZEFONT, + "Forb&id resizing", IDC_RESIZENONE, NULL); endbox(&cp); beginbox(&cp, "Control the scrollback in the window", IDC_BOX_WINDOW2); staticedit(&cp, "Lines of &scrollback", IDC_SAVESTATIC, IDC_SAVEEDIT, 50); checkbox(&cp, "&Display scrollbar", IDC_SCROLLBAR); + checkbox(&cp, "D&isplay scrollbar in full screen mode", IDC_SCROLLBARFULLSCREEN); checkbox(&cp, "Reset scrollback on &keypress", IDC_SCROLLKEY); checkbox(&cp, "Reset scrollback on dis&play activity", IDC_SCROLLDISP); @@ -1132,7 +1145,7 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) } if (panel == selectionpanelstart) { - /* The Selection panel. Accelerators used: [acgo] d wxp hst */ + /* The Selection panel. Accelerators used: [acgo] d wxp hst nr */ struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling copy and paste", @@ -1152,6 +1165,11 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) checkbox(&cp, "Shift overrides a&pplication's use of mouse", IDC_MOUSEOVERRIDE); + radioline(&cp, + "Default selection mode (Alt+drag does the other one):", + IDC_SELTYPESTATIC, 2, + "&Normal", IDC_SELTYPELEX, + "&Rectangular block", IDC_SELTYPERECT, NULL); endbox(&cp); beginbox(&cp, "Control the select-one-word-at-a-time mode", IDC_BOX_SELECTION3); @@ -1426,7 +1444,7 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, r.left = 3; r.right = r.left + 75; r.top = 13; - r.bottom = r.top + 206; + r.bottom = r.top + 219; MapDialogRect(hwnd, &r); treeview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "", WS_CHILD | WS_VISIBLE | @@ -2108,17 +2126,24 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, cfg.scrollbar = IsDlgButtonChecked(hwnd, IDC_SCROLLBAR); break; - case IDC_LOCKSIZE: + case IDC_SCROLLBARFULLSCREEN: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) - cfg.locksize = - IsDlgButtonChecked(hwnd, IDC_LOCKSIZE); + cfg.scrollbar_in_fullscreen = + IsDlgButtonChecked(hwnd, IDC_SCROLLBARFULLSCREEN); break; - case IDC_LOCKFONT: + case IDC_RESIZETERM: + case IDC_RESIZEFONT: + case IDC_RESIZENONE: if (HIWORD(wParam) == BN_CLICKED || - HIWORD(wParam) == BN_DOUBLECLICKED) - cfg.lockfont = - IsDlgButtonChecked(hwnd, IDC_LOCKFONT); + HIWORD(wParam) == BN_DOUBLECLICKED) { + cfg.resize_action = + IsDlgButtonChecked(hwnd, + IDC_RESIZETERM) ? RESIZE_TERM : + IsDlgButtonChecked(hwnd, + IDC_RESIZEFONT) ? RESIZE_FONT : + RESIZE_DISABLED; + } break; case IDC_WINEDIT: if (HIWORD(wParam) == EN_CHANGE) @@ -2377,7 +2402,7 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, of.nMaxFile = sizeof(filename); of.lpstrFileTitle = NULL; of.lpstrInitialDir = NULL; - of.lpstrTitle = "Select Public Key File"; + of.lpstrTitle = "Select Private Key File"; of.Flags = 0; if (GetOpenFileName(&of)) { strcpy(cfg.keyfile, filename); @@ -2391,6 +2416,10 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, case IDC_MBXTERM: cfg.mouse_is_xterm = IsDlgButtonChecked(hwnd, IDC_MBXTERM); break; + case IDC_SELTYPELEX: + case IDC_SELTYPERECT: + cfg.rect_select = IsDlgButtonChecked(hwnd, IDC_SELTYPERECT); + break; case IDC_MOUSEOVERRIDE: cfg.mouse_override = IsDlgButtonChecked(hwnd, IDC_MOUSEOVERRIDE); break;