diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-27 18:49:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-27 18:49:21 +0300 |
commit | e21b7c0709d3e8285bb6e94dc400684ef8a8bf36 (patch) | |
tree | 2b6072092a2edf4d34bef0494fc2983b00c4a8bc /plugins | |
parent | 5f5dd2b5b07a24312495efb461bba5e23de0ffe5 (diff) |
fixes #3334 (NewStory: кликабельные файлтрансферы)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 12 | ||||
-rw-r--r-- | plugins/NewStory/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 6 | ||||
-rw-r--r-- | plugins/NewStory/src/version.h | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index f622814d83..a47a54f5ba 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -94,6 +94,18 @@ void ItemData::load(bool bFullLoad) wtext = mir_utf8decodeW((char *)dbe.pBlob); break; + case EVENTTYPE_FILE: + wchar_t buf[MAX_PATH]; + CallService(MS_FILE_GETRECEIVEDFILESFOLDERW, hContact, (LPARAM)buf); + { + CMStringW wszFileName(buf); + wszFileName.Append(ptrW(DbEvent_GetTextW(&dbe, CP_ACP))); + wszFileName.Replace('\\', '/'); + wszFileName.Insert(0, L"file://"); + wtext = wszFileName.Detach(); + } + break; + default: wtext = DbEvent_GetTextW(&dbe, CP_ACP); break; diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h index cf4437e53a..265607be0b 100644 --- a/plugins/NewStory/src/stdafx.h +++ b/plugins/NewStory/src/stdafx.h @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. #include "m_chat_int.h" #include "m_clc.h" #include "m_clistint.h" +#include "m_file.h" #include "m_options.h" #include "m_skin.h" #include "m_langpack.h" diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 727adc24c5..039d5306cd 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -249,11 +249,7 @@ void vfMessage(int, TemplateVars *vars, MCONTACT, ItemData *item) void vfFile(int, TemplateVars *vars, MCONTACT, ItemData *item) { - CMStringW wszFileName(item->getWBuf()); - wszFileName.Replace('\\', '/'); - wszFileName = L"[url]file://" + wszFileName + L"[/url]"; - - vars->SetVar('M', wszFileName, false); + vars->SetVar('M', item->getWBuf(), false); } void vfUrl(int, TemplateVars *vars, MCONTACT, ItemData *item) diff --git a/plugins/NewStory/src/version.h b/plugins/NewStory/src/version.h index 9be84bdbe7..9c11127072 100644 --- a/plugins/NewStory/src/version.h +++ b/plugins/NewStory/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>
|