diff options
author | George Hazan <ghazan@miranda.im> | 2019-05-12 13:18:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-05-12 13:18:56 +0300 |
commit | 702e42dea8866b0c0c305fa5b3e53f7003d952b4 (patch) | |
tree | a07568a237de2fb5ec1789eb160f4e4fcbd0f909 /plugins/Import/src | |
parent | 93627793d19a22de8deb43a584897e78f6514a3f (diff) |
Import: also file description should be customized
Diffstat (limited to 'plugins/Import/src')
-rw-r--r-- | plugins/Import/src/miranda.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index d99d1328d3..9ab373832e 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -113,13 +113,18 @@ void CMirandaPageDlg::onClick_Other(CCtrlButton*) wchar_t str[MAX_PATH], ext[100], text[256];
GetDlgItemText(m_hwnd, IDC_FILENAME, str, _countof(str));
+ const wchar_t *pwszName;
if (m_iFileType == -1) {
wcsncpy_s(ext, L"*.dat;*.bak", _TRUNCATE);
pfd = Utils_ReplaceVarsW(L"%miranda_profilesdir%");
+ pwszName = TranslateT("Miranda NG database");
+ }
+ else {
+ mir_snwprintf(ext, L"*.%s", g_plugin.m_patterns[m_iFileType - 1].wszExt.c_str());
+ pwszName = g_pActivePattern->wszName;
}
- else mir_snwprintf(ext, L"*.%s", g_plugin.m_patterns[m_iFileType - 1].wszExt.c_str());
- mir_snwprintf(text, L"%s (%s)%c%s%c%s (*.*)%c*.*%c%c", TranslateT("Miranda NG database"), ext, 0, ext, 0, TranslateT("All Files"), 0, 0, 0);
+ mir_snwprintf(text, L"%s (%s)%c%s%c%s (*.*)%c*.*%c%c", pwszName, ext, 0, ext, 0, TranslateT("All Files"), 0, 0, 0);
OPENFILENAME ofn = {};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
|