summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-12 16:51:46 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-12 16:51:46 +0300
commit66142639448faf340baed0ac857240eb66f9fae2 (patch)
tree2ccb2c11817632c4bcdb632109cf59d1a24dacec /src/mir_app
parent17d302b3e3317004df70481f1a8a588701388def (diff)
fixes #4651 (NewStory+tabSRMM: Форматирование текста по-разному работает в приватах и чатах)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_tools.cpp17
-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/srmm_base.cpp3
4 files changed, 2 insertions, 20 deletions
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 66e8acbc6b..dd0c7d9895 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -734,8 +734,7 @@ void Chat_EventToGC(SESSION_INFO *si, MEVENT hDbEvent)
if (mir_strcmp(szProto, dbei.szModule) || !g_chatApi.DbEventIsShown(dbei) || !dbei.szUserId)
return;
- CMStringW wszText(ptrW(dbei.getText()));
- wszText.Replace(L"%", L"%%");
+ ptrW wszText(dbei.getText());
GCEVENT gce = { si, GC_EVENT_MESSAGE };
gce.dwFlags = GCEF_ADDTOLOG;
@@ -772,20 +771,6 @@ MIR_APP_DLL(void) Chat_SetGroup(const wchar_t *pwszGroupName)
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(wchar_t*) Chat_UnescapeTags(wchar_t *str_in)
-{
- wchar_t *s = str_in, *d = str_in;
- while (*s) {
- if (*s == '%' && s[1] == '%')
- s++;
- *d++ = *s++;
- }
- *d = 0;
- return str_in;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
MIR_APP_DLL(void) Chat_AddMenuItems(HMENU hMenu, int nItems, const gc_item *Item, HPLUGIN pPlugin)
{
if (nItems > 0)
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index a719418dc2..08e527e0fa 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -291,7 +291,6 @@ Netlib_NtlmCreateResponse @383
?get_uin@AUTH_BLOB@DB@@QBEIXZ @396 NONAME
?makeBlob@AUTH_BLOB@DB@@AAEPADXZ @1046 NONAME
?size@AUTH_BLOB@DB@@QBEIXZ @398 NONAME
-Chat_UnescapeTags @399 NONAME
ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@AUTH_BLOB@DB@@QAEXI@Z @402 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 75f5b0c3b2..c4850e24ff 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -291,7 +291,6 @@ Netlib_NtlmCreateResponse @383
?get_uin@AUTH_BLOB@DB@@QEBAIXZ @396 NONAME
?makeBlob@AUTH_BLOB@DB@@AEAAPEADXZ @397 NONAME
?size@AUTH_BLOB@DB@@QEBAIXZ @398 NONAME
-Chat_UnescapeTags @399 NONAME
ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@AUTH_BLOB@DB@@QEAAXI@Z @402 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 0317da383b..ebac38fdb4 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -743,8 +743,7 @@ void CSrmmBaseDialog::UpdateChatLog()
DB::EventInfo dbei(hDbEvent);
if (dbei && !mir_strcmp(szProto, dbei.szModule) && g_chatApi.DbEventIsShown(dbei) && dbei.szUserId) {
Utf2T wszUserId(dbei.szUserId);
- CMStringW wszText(ptrW(dbei.getText()));
- wszText.Replace(L"%", L"%%");
+ ptrW wszText(dbei.getText());
GCEVENT gce = { m_si, GC_EVENT_MESSAGE };
gce.dwFlags = GCEF_ADDTOLOG;