X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c8d7378d72c7bd92feb7912684b8d3a2d441630f..421e689af0c5510bdc8d37cef225359294cdabe4:/windlg.c diff --git a/windlg.c b/windlg.c index 62423869..1e5a6322 100644 --- a/windlg.c +++ b/windlg.c @@ -328,6 +328,10 @@ enum { IDCX_ABOUT = IDC_BELL_WAVESTATIC, IDC_BELL_WAVEEDIT, IDC_BELL_WAVEBROWSE, + IDC_B_IND_STATIC, + IDC_B_IND_DISABLED, + IDC_B_IND_FLASH, + IDC_B_IND_STEADY, IDC_BELLOVL, IDC_BELLOVLNSTATIC, IDC_BELLOVLN, @@ -614,6 +618,11 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) cfg.beep == BELL_WAVEFILE ? IDC_BELL_WAVEFILE : cfg.beep == BELL_VISUAL ? IDC_BELL_VISUAL : IDC_BELL_DEFAULT); + CheckRadioButton(hwnd, IDC_B_IND_DISABLED, IDC_B_IND_STEADY, + cfg.beep_ind == + B_IND_DISABLED ? IDC_B_IND_DISABLED : cfg.beep_ind == + B_IND_FLASH ? IDC_B_IND_FLASH : cfg.beep_ind == + B_IND_STEADY ? IDC_B_IND_STEADY : IDC_B_IND_DISABLED); SetDlgItemText(hwnd, IDC_BELL_WAVEEDIT, cfg.bell_wavefile); CheckDlgButton(hwnd, IDC_BELLOVL, cfg.bellovl); SetDlgItemInt(hwnd, IDC_BELLOVLN, cfg.bellovl_n, FALSE); @@ -861,7 +870,7 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) } if (panel == bellpanelstart) { - /* The Bell panel. Accelerators used: [acgo] bdsm wt */ + /* The Bell panel. Accelerators used: [acgo] bdsm wit */ struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling the terminal bell", @@ -876,6 +885,10 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) editbutton(&cp, "Custom sound file to play as a bell:", IDC_BELL_WAVESTATIC, IDC_BELL_WAVEEDIT, "Bro&wse...", IDC_BELL_WAVEBROWSE); + radioline(&cp, "Taskbar/caption &indication on bell:", + IDC_B_IND_STATIC, 3, "Disabled", IDC_B_IND_DISABLED, + "Flashing", IDC_B_IND_FLASH, "Steady", IDC_B_IND_STEADY, + NULL); endbox(&cp); beginbox(&cp, "Control the bell overload behaviour", IDC_BOX_BELL2); @@ -1344,6 +1357,7 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, } SetWindowLong(hwnd, GWL_USERDATA, 1); + sesslist_has_focus = 0; return 0; case WM_LBUTTONUP: /* @@ -1824,6 +1838,19 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, cfg.beep = BELL_VISUAL; } break; + case IDC_B_IND_DISABLED: + case IDC_B_IND_FLASH: + case IDC_B_IND_STEADY: + if (HIWORD(wParam) == BN_CLICKED || + HIWORD(wParam) == BN_DOUBLECLICKED) { + if (LOWORD(wParam) == IDC_B_IND_DISABLED) + cfg.beep_ind = B_IND_DISABLED; + if (LOWORD(wParam) == IDC_B_IND_FLASH) + cfg.beep_ind = B_IND_FLASH; + if (LOWORD(wParam) == IDC_B_IND_STEADY) + cfg.beep_ind = B_IND_STEADY; + } + break; case IDC_BELL_WAVEBROWSE: memset(&of, 0, sizeof(of)); #ifdef OPENFILENAME_SIZE_VERSION_400 @@ -2511,7 +2538,9 @@ void verify_ssh_host_key(char *host, int port, char *keytype, "%s\n" "If you trust this host, hit Yes to add the key to\n" "PuTTY's cache and carry on connecting.\n" - "If you do not trust this host, hit No to abandon the\n" + "If you want to carry on connecting just once, without\n" + "adding the key to the cache, hit No.\n" + "If you do not trust this host, hit Cancel to abandon the\n" "connection.\n"; static const char wrongmsg[] = @@ -2533,7 +2562,6 @@ void verify_ssh_host_key(char *host, int port, char *keytype, static const char mbtitle[] = "PuTTY Security Alert"; - char message[160 + /* sensible fingerprint max size */ (sizeof(absentmsg) > sizeof(wrongmsg) ? @@ -2560,10 +2588,11 @@ void verify_ssh_host_key(char *host, int port, char *keytype, int mbret; sprintf(message, absentmsg, fingerprint); mbret = MessageBox(NULL, message, mbtitle, - MB_ICONWARNING | MB_YESNO); - if (mbret == IDNO) + MB_ICONWARNING | MB_YESNOCANCEL); + if (mbret == IDYES) + store_host_key(host, port, keytype, keystr); + if (mbret == IDCANCEL) exit(0); - store_host_key(host, port, keytype, keystr); } }