diff options
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 0d0e422c4b..7058c9c90a 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1782,8 +1782,18 @@ BOOL ShowSelectKeyDlg(HWND hParent, LPSTR KeyPath) ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_NONETWORKBUTTON;
ofn.lpstrFile = KeyPath;
- TCHAR temp[MAX_PATH] = _T("");
- mir_sntprintf(temp, sizeof(temp), _T("%s\0*.asc\0%s(*.*)\0*.*\0"), TranslateT("ASC files"), TranslateT("All files "));
+ TCHAR temp[MAX_PATH+1] = _T("");
+ TCHAR *ftemp;
+ _tcscpy(temp, TranslateT("ASC files"));
+ strcat(temp, _T(" (*.asc)"));
+ ftemp = temp + _tcslen(temp) + 1;
+ _tcscpy(ftemp, _T("*.asc"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, TranslateT("All Files "));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, _T("*.*"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ *ftemp = _T('\0');
ofn.lpstrFilter = temp;
ofn.lpstrTitle = TranslateT("Open Key File");
if (!GetOpenFileName(&ofn)) return FALSE;
@@ -1853,8 +1863,19 @@ BOOL SaveExportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_NONETWORKBUTTON;
ofn.lpstrFile = szFile;
- TCHAR temp[MAX_PATH] = _T("");
- mir_sntprintf(temp, sizeof(temp), _T("%s\0*.asc\0%s(*.*)\0*.*\0"), TranslateT("ASC files"), TranslateT("All files "));
+
+ TCHAR temp[MAX_PATH+1] = _T("");
+ TCHAR *ftemp;
+ _tcscpy(temp, TranslateT("ASC files"));
+ strcat(temp, _T(" (*.asc)"));
+ ftemp = temp + _tcslen(temp) + 1;
+ _tcscpy(ftemp, _T("*.asc"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, TranslateT("All Files "));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, _T("*.*"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ *ftemp = _T('\0');
ofn.lpstrFilter = temp;
ofn.lpstrTitle = (priv) ? TranslateT("Save Private Key File") : TranslateT("Save Public Key File");
if (!GetSaveFileName(&ofn)) return FALSE;
@@ -1879,8 +1900,18 @@ BOOL LoadImportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT | OFN_NOREADONLYRETURN;
ofn.lpstrFile = szFile;
- TCHAR temp[MAX_PATH] = _T("");
- mir_sntprintf(temp, sizeof(temp), _T("%s\0*.asc\0%s(*.*)\0*.*\0"), TranslateT("ASC files"), TranslateT("All files "));
+ TCHAR temp[MAX_PATH+1] = _T("");
+ TCHAR *ftemp;
+ _tcscpy(temp, TranslateT("ASC files"));
+ strcat(temp, _T(" (*.asc)"));
+ ftemp = temp + _tcslen(temp) + 1;
+ _tcscpy(ftemp, _T("*.asc"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, TranslateT("All Files "));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ _tcscpy(ftemp, _T("*.*"));
+ ftemp = ftemp + _tcslen(ftemp) + 1;
+ *ftemp = _T('\0');
ofn.lpstrFilter = temp;
ofn.lpstrTitle = (priv) ? TranslateT("Load Private Key File") : TranslateT("Load Public Key File");
if (!GetOpenFileName(&ofn)) return FALSE;
|