From 4e932f1678b7e926d436e1fcd6a7b5c2c3f9b1a0 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Thu, 2 Aug 2012 19:37:11 +0000 Subject: not HPP-only messages animation smileys interface (through flag) (sorry, i needed it) git-svn-id: http://svn.miranda-ng.org/main/trunk@1328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ExternalAPI/m_smileyadd.h | 5 +++-- plugins/SmileyAdd/src/services.cpp | 2 +- plugins/SmileyAdd/src/smileyroutines.cpp | 4 ++-- plugins/SmileyAdd/src/smileyroutines.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/ExternalAPI/m_smileyadd.h b/plugins/ExternalAPI/m_smileyadd.h index 6b367509f8..a4821aba31 100644 --- a/plugins/ExternalAPI/m_smileyadd.h +++ b/plugins/ExternalAPI/m_smileyadd.h @@ -20,8 +20,9 @@ along with this program. If not, see . #define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted // this flag allows "true" transparency -#define SAFLRE_OUTGOING 4 // Parsing outgoing message -#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys +#define SAFLRE_OUTGOING 4 // Parsing outgoing message +#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys +#define SAFLRE_FIREVIEW 16 // use NM_FIREVIEWCHANGE messages typedef struct { diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index fed1b4c7ad..3dae4a086d 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -106,7 +106,7 @@ INT_PTR ReplaceSmileysCommand(WPARAM, LPARAM lParam) (smrec.flags & (SAFLRE_OUTGOING | SAFLRE_NOCUSTOM)) ? NULL : &smcp); ReplaceSmileys(smre->hwndRichEditControl, SmileyPack, smcp, *smrec.rangeToReplace, - smrec.hContact == NULL, false, false); + smrec.hContact == NULL, false, false, (smre->flags & SAFLRE_FIREVIEW)?true:false); return TRUE; } diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp index ba136d7ed5..130d60123b 100644 --- a/plugins/SmileyAdd/src/smileyroutines.cpp +++ b/plugins/SmileyAdd/src/smileyroutines.cpp @@ -219,7 +219,7 @@ void UpdateSelection(CHARRANGE& sel, int pos, int dif) } void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, - bool useHidden, bool ignoreLast, bool unFreeze) + bool useHidden, bool ignoreLast, bool unFreeze, bool fireView) { /* LARGE_INTEGER freq, strt, end; @@ -281,7 +281,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const TCHAR classname[20]; GetClassName(hwnd, classname, SIZEOF(classname)); - bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0); + bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0) | fireView; SetRichCallback(hwnd, NULL, false, true); diff --git a/plugins/SmileyAdd/src/smileyroutines.h b/plugins/SmileyAdd/src/smileyroutines.h index 6b12ee6ead..7d290bf23d 100644 --- a/plugins/SmileyAdd/src/smileyroutines.h +++ b/plugins/SmileyAdd/src/smileyroutines.h @@ -40,7 +40,7 @@ typedef SMOBJLIST SmileysQueueType; void LookupAllSmileys(SmileyPackType* smileyPack, SmileyPackCType* smileyCPack, const TCHAR* lpstrText, SmileysQueueType& smllist, const bool firstOnly); void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, - bool useHidden, bool ignoreLast, bool unFreeze); + bool useHidden, bool ignoreLast, bool unFreeze, bool fireView = 0); void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen); void FindSmileyInText(SmileyPackType* smp, const TCHAR* str, unsigned& first, unsigned& size, SmileyType** index); -- cgit v1.2.3