summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/src/history_array.cpp4
-rw-r--r--plugins/NewStory/src/history_array.h2
-rw-r--r--plugins/NewStory/src/history_control.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index 6b64e08c63..08baac7ff7 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -127,8 +127,10 @@ void ItemData::load(bool bFullLoad)
wchar_t buf[MAX_PATH];
CallService(MS_FILE_GETRECEIVEDFILESFOLDERW, hContact, (LPARAM)buf);
{
+ DB::FILE_BLOB blob(dbe);
+
CMStringW wszFileName(buf);
- wszFileName.Append(ptrW(DbEvent_GetTextW(&dbe, CP_ACP)));
+ wszFileName.Append(blob.getName());
// if a filename contains spaces, URL will be broken
if (wszFileName.Find(' ') != -1) {
diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h
index a57b5f42ca..1df5ee2c76 100644
--- a/plugins/NewStory/src/history_array.h
+++ b/plugins/NewStory/src/history_array.h
@@ -10,7 +10,7 @@ struct ItemData
bool bLoaded;
int savedTop;
- DBEVENTINFO dbe;
+ DB::EventInfo dbe;
wchar_t *wtext;
wchar_t *wszNick;
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 398c6b24ab..bcb75402f8 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -179,7 +179,7 @@ struct NewstoryListData : public MZeroedObject
ptrA szUtf(mir_utf8encodeW(pItem->wtext));
pItem->dbe.cbBlob = (int)mir_strlen(szUtf) + 1;
pItem->dbe.pBlob = (uint8_t *)szUtf.get();
- db_event_edit(pItem->hContact, pItem->hEvent, &pItem->dbe);
+ db_event_edit(pItem->hEvent, &pItem->dbe);
if (auto *ppro = Proto_GetInstance(pItem->hContact))
ppro->OnEventEdited(pItem->hContact, pItem->hEvent);