X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/5ecd7ad009cc5148c67b9d665f79a64083fae254..341eb9782019fd4fd77ff56894b489a23f229131:/windlg.c diff --git a/windlg.c b/windlg.c index 4a771719..fd722886 100644 --- a/windlg.c +++ b/windlg.c @@ -657,11 +657,6 @@ static const char *const colours[] = { "ANSI Cyan", "ANSI Cyan Bold", "ANSI White", "ANSI White Bold" }; -static const int permcolour[] = { - TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, - TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, - TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE -}; static void fmtfont(char *buf) { @@ -1308,9 +1303,8 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) SendDlgItemMessage(hwnd, IDC_COLOURLIST, LB_DELETESTRING, i, 0); for (i = 0; i < 22; i++) - if (cfg.bold_colour || permcolour[i]) - SendDlgItemMessage(hwnd, IDC_COLOURLIST, LB_ADDSTRING, 0, - (LPARAM) colours[i]); + SendDlgItemMessage(hwnd, IDC_COLOURLIST, LB_ADDSTRING, 0, + (LPARAM) colours[i]); } SendDlgItemMessage(hwnd, IDC_COLOURLIST, LB_SETCURSEL, 0, 0); SetDlgItemInt(hwnd, IDC_RVALUE, cfg.colours[0][0], FALSE); @@ -2853,7 +2847,8 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, of.lStructSize = sizeof(of); #endif of.hwndOwner = hwnd; - of.lpstrFilter = "Wave Files\0*.WAV\0AllFiles\0*\0\0\0"; + of.lpstrFilter = "Wave Files (*.wav)\0*.WAV\0" + "All Files (*.*)\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; @@ -3106,7 +3101,7 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, of.lStructSize = sizeof(of); #endif of.hwndOwner = hwnd; - of.lpstrFilter = "All Files\0*\0\0\0"; + of.lpstrFilter = "All Files (*.*)\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; @@ -3334,8 +3329,8 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, of.lStructSize = sizeof(of); #endif of.hwndOwner = hwnd; - of.lpstrFilter = "PuTTY Private Key Files (*.ppk)\0*.PPK\0" - "AllFiles\0*\0\0\0"; + of.lpstrFilter = "PuTTY Private Key Files (*.ppk)\0*.ppk\0" + "All Files (*.*)\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; @@ -3399,25 +3394,6 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, int n, i; cfg.bold_colour = IsDlgButtonChecked(hwnd, IDC_BOLDCOLOUR); - SendDlgItemMessage(hwnd, IDC_COLOURLIST, WM_SETREDRAW, - FALSE, 0); - n = - SendDlgItemMessage(hwnd, IDC_COLOURLIST, - LB_GETCOUNT, 0, 0); - if (n != 12 + 10 * cfg.bold_colour) { - for (i = n; i-- > 0;) - SendDlgItemMessage(hwnd, IDC_COLOURLIST, - LB_DELETESTRING, i, 0); - for (i = 0; i < 22; i++) - if (cfg.bold_colour || permcolour[i]) - SendDlgItemMessage(hwnd, IDC_COLOURLIST, - LB_ADDSTRING, 0, - (LPARAM) colours[i]); - } - SendDlgItemMessage(hwnd, IDC_COLOURLIST, WM_SETREDRAW, - TRUE, 0); - InvalidateRect(GetDlgItem(hwnd, IDC_COLOURLIST), NULL, - TRUE); } break; case IDC_PALETTE: