summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-27 18:49:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-27 18:49:21 +0300
commite21b7c0709d3e8285bb6e94dc400684ef8a8bf36 (patch)
tree2b6072092a2edf4d34bef0494fc2983b00c4a8bc /src/core
parent5f5dd2b5b07a24312495efb461bba5e23de0ffe5 (diff)
fixes #3334 (NewStory: кликабельные файлтрансферы)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdfile/src/file.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 4bda297d0c..abe3152cdd 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -73,12 +73,20 @@ static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam)
{
wchar_t buf[MAX_PATH];
GetContactReceivedFilesDir(wParam, buf, MAX_PATH, TRUE);
- char* dir = mir_u2a(buf);
- mir_strncpy((char*)lParam, dir, MAX_PATH);
+ char *dir = mir_u2a(buf);
+ mir_strncpy((char *)lParam, dir, MAX_PATH);
mir_free(dir);
return 0;
}
+static INT_PTR GetReceivedFilesFolderW(WPARAM wParam, LPARAM lParam)
+{
+ wchar_t buf[MAX_PATH];
+ GetContactReceivedFilesDir(wParam, buf, MAX_PATH, TRUE);
+ mir_wstrncpy((wchar_t *)lParam, buf, MAX_PATH);
+ return 0;
+}
+
static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam)
{
LaunchRecvDialog((CLISTEVENT *)lParam);
@@ -427,6 +435,7 @@ int LoadSendRecvFileModule(void)
CreateServiceFunction(MS_FILE_SENDSPECIFICFILES, SendSpecificFiles);
CreateServiceFunction(MS_FILE_SENDSPECIFICFILEST, SendSpecificFilesT);
CreateServiceFunction(MS_FILE_GETRECEIVEDFILESFOLDER, GetReceivedFilesFolder);
+ CreateServiceFunction(MS_FILE_GETRECEIVEDFILESFOLDERW, GetReceivedFilesFolderW);
CreateServiceFunction("SRFile/RecvFile", RecvFileCommand);
CreateServiceFunction("SRFile/OpenContRecDir", openContRecDir);