*result = n;
}
+static void MyGetDlgItemFlt (HWND hwnd, int id, int *result, int scale) {
+ char text[80];
+ BOOL ok;
+ ok = GetDlgItemText (hwnd, id, text, sizeof(text)-1);
+ if (ok && text[0])
+ *result = (int) (scale * atof(text));
+}
+
+static void MySetDlgItemFlt (HWND hwnd, int id, double value) {
+ char text[80];
+ sprintf(text, "%g", value);
+ SetDlgItemText (hwnd, id, text);
+}
+
static int CALLBACK LogProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
int i;
IDC_BOX_APPEARANCE2,
IDC_BOX_APPEARANCE3,
IDC_BOX_APPEARANCE4,
+ IDC_BOX_APPEARANCE5,
IDC_CURSORSTATIC,
IDC_CURBLOCK,
IDC_CURUNDER,
IDC_WINEDIT,
IDC_WINNAME,
IDC_HIDEMOUSE,
+ IDC_SUNKENEDGE,
appearancepanelend,
connectionpanelstart,
SetDlgItemText (hwnd, IDC_BELL_WAVEEDIT, cfg.bell_wavefile);
CheckDlgButton (hwnd, IDC_BELLOVL, cfg.bellovl);
SetDlgItemInt (hwnd, IDC_BELLOVLN, cfg.bellovl_n, FALSE);
- SetDlgItemInt (hwnd, IDC_BELLOVLT, cfg.bellovl_t, FALSE);
- SetDlgItemInt (hwnd, IDC_BELLOVLS, cfg.bellovl_s, FALSE);
+ MySetDlgItemFlt (hwnd, IDC_BELLOVLT, cfg.bellovl_t / 1000.0);
+ MySetDlgItemFlt (hwnd, IDC_BELLOVLS, cfg.bellovl_s / 1000.0);
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_HIDEMOUSE, cfg.hide_mouseptr);
+ CheckDlgButton (hwnd, IDC_SUNKENEDGE, cfg.sunken_edge);
CheckRadioButton (hwnd, IDC_CURBLOCK, IDC_CURVERT,
cfg.cursor_type==0 ? IDC_CURBLOCK :
cfg.cursor_type==1 ? IDC_CURUNDER : IDC_CURVERT);
}
if (panel == loggingpanelstart) {
- /* The Logging panel. Accelerators used: [acgo] tplfwes */
+ /* The Logging panel. Accelerators used: [acgo] tplfwe */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling session logging",
}
if (panel == appearancepanelstart) {
- /* The Appearance panel. Accelerators used: [acgo] luvb h ti p */
+ /* The Appearance panel. Accelerators used: [acgo] luvb h ti p s */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling PuTTY's appearance",
checkbox(&cp, "Hide mouse &pointer when typing in window",
IDC_HIDEMOUSE);
endbox(&cp);
+ beginbox(&cp, "Adjust the window border",
+ IDC_BOX_APPEARANCE5);
+ checkbox(&cp, "&Sunken-edge border (slightly thicker)",
+ IDC_SUNKENEDGE);
+ endbox(&cp);
}
if (panel == translationpanelstart) {
break;
case IDC_BELLOVLT:
if (HIWORD(wParam) == EN_CHANGE)
- MyGetDlgItemInt (hwnd, IDC_BELLOVLT, &cfg.bellovl_t);
+ MyGetDlgItemFlt (hwnd, IDC_BELLOVLT, &cfg.bellovl_t, 1000);
break;
case IDC_BELLOVLS:
if (HIWORD(wParam) == EN_CHANGE)
- MyGetDlgItemInt (hwnd, IDC_BELLOVLS, &cfg.bellovl_s);
+ MyGetDlgItemFlt (hwnd, IDC_BELLOVLS, &cfg.bellovl_s, 1000);
break;
case IDC_BLINKTEXT:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.hide_mouseptr = IsDlgButtonChecked (hwnd, IDC_HIDEMOUSE);
break;
+ case IDC_SUNKENEDGE:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.sunken_edge = IsDlgButtonChecked (hwnd, IDC_SUNKENEDGE);
+ break;
case IDC_CURBLOCK:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)