diff options
| author | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-01-25 18:07:53 +0000 | 
|---|---|---|
| committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-01-25 18:07:53 +0000 | 
| commit | eb4bef1f28e6b255c39b4e79763d3048c256313e (patch) | |
| tree | 53c8de905f20c4f4febbf8cb7c0ab05c26131ffa | |
| parent | f377ed598f7c107890c699ec784e1206742e45bb (diff) | |
- SecureIM: options fix (patch from person)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
| -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;
  | 
