summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-08-02 19:37:11 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-08-02 19:37:11 +0000
commit4e932f1678b7e926d436e1fcd6a7b5c2c3f9b1a0 (patch)
tree0598d460b1e583d414ccdff11d7210c6508cb847
parent3af838e995ecc0d61f45ea18e3c385e363bbe3ca (diff)
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
-rw-r--r--plugins/ExternalAPI/m_smileyadd.h5
-rw-r--r--plugins/SmileyAdd/src/services.cpp2
-rw-r--r--plugins/SmileyAdd/src/smileyroutines.cpp4
-rw-r--r--plugins/SmileyAdd/src/smileyroutines.h2
4 files changed, 7 insertions, 6 deletions
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 <http://www.gnu.org/licenses/>.
#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<ReplaceSmileyType> 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);