diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-25 13:41:55 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-25 13:41:55 +0300 |
commit | c6f59d75142b7568dd89f5cff691b0b58030aafd (patch) | |
tree | 6fd83d9e6a71bbf7a750a1983922121265acadd7 /utils | |
parent | 53669871fc860856c80c2d79cb6b21d52ea25440 (diff) |
SmileyAdd: fix for the obsolete quirks in SmaileyAdd API
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mir_smileys.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/utils/mir_smileys.cpp b/utils/mir_smileys.cpp index a723cdffcf..a27f16cba8 100644 --- a/utils/mir_smileys.cpp +++ b/utils/mir_smileys.cpp @@ -64,17 +64,10 @@ SIZE GetTextSize(HDC hdcMem, const wchar_t *szText, SortedList *plText, UINT uTe int InitContactListSmileys() { // Register smiley category - if (ServiceExists(MS_SMILEYADD_REGISTERCATEGORY)) - { - SMADD_REGCAT rc; - - rc.cbSize = sizeof(rc); - rc.name = "clist"; - rc.dispname = TranslateA_LP("Contact List smileys"); - - CallService(MS_SMILEYADD_REGISTERCATEGORY, 0, (LPARAM)&rc); - } - + SMADD_REGCAT rc; + rc.name = "clist"; + rc.dispname = TranslateA_LP("Contact List smileys"); + CallService(MS_SMILEYADD_REGISTERCATEGORY, 0, (LPARAM)&rc); return 0; } @@ -397,10 +390,10 @@ SortedList * ReplaceSmileys(const wchar_t *text, int text_size, const char *prot return nullptr; // Parse it! - SMADD_BATCHPARSE2 sp = { sizeof(sp) }; + SMADD_BATCHPARSE sp = {}; sp.Protocolname = protocol; - sp.str = (wchar_t*)text; - sp.flag = SAFL_TCHAR; + sp.str.w = text; + sp.flag = SAFL_UNICODE; SMADD_BATCHPARSERES *spres = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp); if (spres == nullptr) // Did not find a simley |