From e21b7c0709d3e8285bb6e94dc400684ef8a8bf36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Feb 2023 18:49:12 +0300 Subject: =?UTF-8?q?fixes=20#3334=20(NewStory:=20=D0=BA=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D0=B1=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D1=82=D1=80=D0=B0=D0=BD=D1=81=D1=84=D0=B5=D1=80?= =?UTF-8?q?=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_array.cpp | 12 ++++++++++++ plugins/NewStory/src/stdafx.h | 1 + plugins/NewStory/src/templates.cpp | 6 +----- plugins/NewStory/src/version.h | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'plugins/NewStory') 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 -- cgit v1.2.3