From 702e42dea8866b0c0c305fa5b3e53f7003d952b4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 12 May 2019 13:18:56 +0300 Subject: Import: also file description should be customized --- plugins/Import/src/miranda.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins/Import/src') 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; -- cgit v1.2.3