1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Make beep optional - thanks to Antal Novak

[originally from svn r507]
[this commit reordered to come after creation of 0.49 tag]
This commit is contained in:
Simon Tatham 2000-06-24 17:00:49 +00:00
parent 2832ef1e75
commit 7a01fd48b6
5 changed files with 12 additions and 1 deletions

View File

@ -151,6 +151,7 @@ typedef struct {
int alt_space; /* is it special? */
int ldisc_term;
int blink_cur;
int beep;
/* Terminal options */
int savelines;
int dec_om;

View File

@ -676,7 +676,7 @@ void term_out(void) {
ldisc->send ("PuTTY", 5);
break;
case '\007':
beep();
if(cfg.beep) beep();
disptop = scrtop;
break;
case '\b':

View File

@ -65,6 +65,7 @@
#define IDC1_ALTSPACE 1018
#define IDC1_LDISCTERM 1019
#define IDC1_BLINKCUR 1020
#define IDC1_BEEP 1021
#define IDC2_WRAPMODE 1001
#define IDC2_DECOM 1002

View File

@ -127,6 +127,8 @@ BEGIN
IDC1_LDISCTERM, 3, 133, 162, 10
AUTOCHECKBOX "&Blinking cursor",
IDC1_BLINKCUR, 3, 143, 162, 10
AUTOCHECKBOX "Bee&p enabled",
IDC1_BEEP, 3, 153, 162, 10
END
IDD_PANEL2 DIALOG DISCARDABLE 6, 30, 168, 163

View File

@ -163,6 +163,7 @@ static void save_settings (char *section, int do_host) {
wppi (sesskey, "AltSpace", cfg.alt_space);
wppi (sesskey, "LdiscTerm", cfg.ldisc_term);
wppi (sesskey, "BlinkCur", cfg.blink_cur);
wppi (sesskey, "Beep", cfg.beep);
wppi (sesskey, "ScrollbackLines", cfg.savelines);
wppi (sesskey, "DECOriginMode", cfg.dec_om);
wppi (sesskey, "AutoWrapMode", cfg.wrap_mode);
@ -298,6 +299,7 @@ static void load_settings (char *section, int do_host) {
gppi (sesskey, "AltSpace", 0, &cfg.alt_space);
gppi (sesskey, "LdiscTerm", 0, &cfg.ldisc_term);
gppi (sesskey, "BlinkCur", 0, &cfg.blink_cur);
gppi (sesskey, "Beep", 1, &cfg.beep);
gppi (sesskey, "ScrollbackLines", 200, &cfg.savelines);
gppi (sesskey, "DECOriginMode", 0, &cfg.dec_om);
gppi (sesskey, "AutoWrapMode", 1, &cfg.wrap_mode);
@ -651,6 +653,7 @@ static int CALLBACK KeyboardProc (HWND hwnd, UINT msg,
CheckDlgButton (hwnd, IDC1_ALTSPACE, cfg.alt_space);
CheckDlgButton (hwnd, IDC1_LDISCTERM, cfg.ldisc_term);
CheckDlgButton (hwnd, IDC1_BLINKCUR, cfg.blink_cur);
CheckDlgButton (hwnd, IDC1_BEEP, cfg.beep);
break;
case WM_COMMAND:
if (HIWORD(wParam) == BN_CLICKED ||
@ -700,6 +703,10 @@ static int CALLBACK KeyboardProc (HWND hwnd, UINT msg,
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.blink_cur = IsDlgButtonChecked (hwnd, IDC1_BLINKCUR);
case IDC1_BEEP:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.beep = IsDlgButtonChecked (hwnd, IDC1_BEEP);
break;
}
}