summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/smileyroutines.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-03-02 11:06:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-03-02 11:06:38 +0000
commit14bdc60ec9715ed7a0e74ade4072cf86f3fefb4a (patch)
tree7c8c30ba5af1343682c972527caf6d0c22f3c75c /plugins/SmileyAdd/src/smileyroutines.cpp
parentcbb56a2046b7894f4bb09e98dfb8b56febf1cb0f (diff)
- crash fix on smiley pack change;
- massive code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src/smileyroutines.cpp')
-rw-r--r--plugins/SmileyAdd/src/smileyroutines.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp
index e5154dc051..4e5534bbbc 100644
--- a/plugins/SmileyAdd/src/smileyroutines.cpp
+++ b/plugins/SmileyAdd/src/smileyroutines.cpp
@@ -226,7 +226,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const
TextRange->Release();
SmileysQueueType smllist;
- LookupAllSmileys(smp, smcp, W2T_SM(btxt), smllist, false);
+ LookupAllSmileys(smp, smcp, btxt, smllist, false);
SysFreeString(btxt);
@@ -315,7 +315,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const
BSTR bstrText = NULL;
if (smlc == NULL && sml->IsText()) {
- bstrText = SysAllocString(T2W_SM(sml->GetToolText().c_str()));
+ bstrText = SysAllocString(sml->GetToolText().c_str());
TextSelection->SetText(bstrText);
}
else {
@@ -400,11 +400,12 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const
}
else UpdateSelection(oldSel, smlpos.cpMin, -(int)SysStringLen(bstrText)+1);
- ISmileyBase* smileyBase = CreateAniSmileyObject(smlc ? smlc : sml, chf.crBackColor, ishpp);
- if (smileyBase == NULL) continue;
+ ISmileyBase *smileyBase = CreateAniSmileyObject(smlc ? smlc : sml, chf.crBackColor, ishpp);
+ if (smileyBase == NULL)
+ continue;
smileyBase->SetExtent(DVASPECT_CONTENT, &sizehm);
- smileyBase->SetHint(W2T_SM(bstrText));
+ smileyBase->SetHint(bstrText);
smileyBase->SetPosition(hwnd, NULL);