summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-04-15 17:43:08 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-04-15 17:43:08 +0300
commitf15a6313c570fc6eedb8f955ce94510438f6be52 (patch)
treea8c50eeabf79b8ea50796f5fd1dd004c5a2230ee
parenta14259eae6700db380f7eab42ba89c76ac2c1541 (diff)
preview folder extracted to the separate directory in profile
-rw-r--r--include/m_protoint.h1
-rw-r--r--libs/win32/mir_app.libbin292744 -> 293250 bytes
-rw-r--r--libs/win64/mir_app.libbin292518 -> 293028 bytes
-rw-r--r--protocols/Telegram/src/utils.cpp4
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/proto_interface.cpp5
7 files changed, 10 insertions, 2 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 3b1b7fb4c3..08a124c2aa 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -208,6 +208,7 @@ public:
HGENMENU GetMenuItem(ProtoMenuItemType);
CMStringW GetAvatarPath() const;
+ CMStringW GetPreviewPath() const;
//////////////////////////////////////////////////////////////////////////////////////
// Virtual functions
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 2a4b13eb39..c3c18637e0 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 5b60f97793..1a84c76d29 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp
index 98890cc791..faf52c94d0 100644
--- a/protocols/Telegram/src/utils.cpp
+++ b/protocols/Telegram/src/utils.cpp
@@ -449,8 +449,8 @@ CMStringA CTelegramProto::GetMessagePreview(const TD::file *pFile)
auto *pFileId = pFile->remote_->unique_id_.c_str();
auto *pRequest = new TG_FILE_REQUEST(TG_FILE_REQUEST::AVATAR, pFile->id_, pFileId);
- pRequest->m_destPath = GetAvatarPath() + L"\\Preview";
- CreateDirectoryW(pRequest->m_destPath, 0);
+ pRequest->m_destPath = GetPreviewPath();
+ CreateDirectoryTreeW(pRequest->m_destPath);
pRequest->m_fileName.Format(L"{%S}.jpg", pFileId);
{
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 55df94ce86..f2511af7d7 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -968,3 +968,4 @@ _Netlib_DownloadFile@20 @1099 NONAME
??4EventInfo@DB@@QAEAAV01@I@Z @1104 NONAME
?MarkEventRead@CSrmmBaseDialog@@QAEXABVEventInfo@DB@@@Z @1105 NONAME
?getEvent@EventInfo@DB@@QBEIXZ @1106 NONAME
+?GetPreviewPath@PROTO_INTERFACE@@QBE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@XZ @1107 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index bf3e4e9d50..9fbb61bf87 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -968,3 +968,4 @@ Netlib_DownloadFile @1093 NONAME
??4EventInfo@DB@@QEAAAEAV01@I@Z @1098 NONAME
?MarkEventRead@CSrmmBaseDialog@@QEAAXAEBVEventInfo@DB@@@Z @1099 NONAME
?getEvent@EventInfo@DB@@QEBAIXZ @1100 NONAME
+?GetPreviewPath@PROTO_INTERFACE@@QEBA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@XZ @1101 NONAME
diff --git a/src/mir_app/src/proto_interface.cpp b/src/mir_app/src/proto_interface.cpp
index a6fa43f410..573a4177d8 100644
--- a/src/mir_app/src/proto_interface.cpp
+++ b/src/mir_app/src/proto_interface.cpp
@@ -66,6 +66,11 @@ CMStringW PROTO_INTERFACE::GetAvatarPath() const
return CMStringW(FORMAT, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
}
+CMStringW PROTO_INTERFACE::GetPreviewPath() const
+{
+ return CMStringW(FORMAT, L"%s\\Preview\\%S", VARSW(L"%miranda_userdata%").get(), m_szModuleName);
+}
+
void PROTO_INTERFACE::OnBuildProtoMenu()
{}