summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-12 16:30:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-12 16:30:59 +0300
commit9fc484fbcb154f376584ad8814b816d4a733eb9e (patch)
treea773918d310e756c4a749ad81e9a7338e1105c17 /src/core
parent514c05fc7c3a177918e91b88c391edf730465438 (diff)
ugly custom construction replaced with the kernel API call
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 911c2deef9..b10330eb3b 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -2320,18 +2320,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case IDC_HISTORY:
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_HISTORY))) {
MODULEINFO *pInfo = pci->MM_FindModule(si->pszModule);
- if (pInfo) {
- wchar_t szFile[MAX_PATH], szName[MAX_PATH], szFolder[MAX_PATH];
- wcsncpy_s(szName, (pInfo->ptszModDispName ? pInfo->ptszModDispName : _A2T(si->pszModule)), _TRUNCATE);
- ValidateFilename(szName);
-
- mir_snwprintf(szFolder, L"%s\\%s", g_Settings.pszLogDir, szName);
- mir_snwprintf(szName, L"%s.log", si->ptszID);
- ValidateFilename(szName);
-
- mir_snwprintf(szFile, L"%s\\%s", szFolder, szName);
- ShellExecute(hwndDlg, L"open", szFile, NULL, NULL, SW_SHOW);
- }
+ if (pInfo)
+ ShellExecute(hwndDlg, NULL, pci->GetChatLogsFilename(si, 0), NULL, NULL, SW_SHOW);
}
break;