From e2210ffca4c853204284c05cf70066e734d01885 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 6 Aug 2002 17:27:18 +0000 Subject: [PATCH] Now that we've decided on a file extension for private key files (.PPK), make it the default in all the private-key file dialogs. git-svn-id: svn://svn.tartarus.org/sgt/putty@1808 cda61777-01e9-0310-a592-d414129be87e --- pageant.c | 2 +- puttygen.c | 3 ++- windlg.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pageant.c b/pageant.c index df24a7df..0f423f2d 100644 --- a/pageant.c +++ b/pageant.c @@ -1240,7 +1240,7 @@ static void prompt_add_keyfile(void) of.lStructSize = sizeof(of); #endif of.hwndOwner = main_hwnd; - of.lpstrFilter = "All Files\0*\0\0\0"; + of.lpstrFilter = "PuTTY Private Key Files\0*.PPK\0AllFiles\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filelist; diff --git a/puttygen.c b/puttygen.c index 2d589759..44b5ec9e 100644 --- a/puttygen.c +++ b/puttygen.c @@ -182,7 +182,7 @@ static int prompt_keyfile(HWND hwnd, char *dlgtitle, of.lStructSize = sizeof(of); #endif of.hwndOwner = hwnd; - of.lpstrFilter = "All Files\0*\0\0\0"; + of.lpstrFilter = "PuTTY Private Key Files\0*.PPK\0AllFiles\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; @@ -190,6 +190,7 @@ static int prompt_keyfile(HWND hwnd, char *dlgtitle, of.nMaxFile = FILENAME_MAX; of.lpstrFileTitle = NULL; of.lpstrInitialDir = NULL; + of.lpstrDefExt = ".ppk"; of.lpstrTitle = dlgtitle; of.Flags = 0; if (save) diff --git a/windlg.c b/windlg.c index bdc98521..2876d9db 100644 --- a/windlg.c +++ b/windlg.c @@ -3133,7 +3133,8 @@ 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 = "PuTTY Private Key Files\0*.PPK\0" + "AllFiles\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; -- 2.11.0