summaryrefslogtreecommitdiff
path: root/Plugins/emoticons/emoticons.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2010-10-23 17:57:32 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2010-10-23 17:57:32 +0000
commita90d8801c8cb1943eda3a5134548658174b3be75 (patch)
tree282e52cc9cc565e7b8191b8c3a70799bac47d033 /Plugins/emoticons/emoticons.cpp
parent305bcb9a42ed52e864ae69de3b2e4937047edc92 (diff)
emoticons: files that I forgot to commit
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@226 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/emoticons/emoticons.cpp')
-rw-r--r--Plugins/emoticons/emoticons.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/Plugins/emoticons/emoticons.cpp b/Plugins/emoticons/emoticons.cpp
index faec624..2eb9378 100644
--- a/Plugins/emoticons/emoticons.cpp
+++ b/Plugins/emoticons/emoticons.cpp
@@ -30,7 +30,7 @@ PLUGININFOEX pluginInfo={
#else
"Emoticons",
#endif
- PLUGIN_MAKE_VERSION(0,3,0,0),
+ PLUGIN_MAKE_VERSION(0,3,0,1),
"Emoticons",
"Ricardo Pescuma Domenecci",
"",
@@ -289,7 +289,7 @@ protected:
url = &url[pos];
removeOtherArguments(url, out, outLen);
- return true;
+ return out[0] != _T('\0');
}
void removeOtherArguments(const TCHAR *url, TCHAR *out, size_t outLen)
@@ -562,7 +562,7 @@ BOOL isVideo(const TCHAR *url, size_t urlLen, FlashData *flash)
for (int j = 0; j < MAX_REGS(videos); j++)
{
- if (videos[j]->convertToFlash(tmp, flash))
+ if (videos[j]->convertToFlash(tmp, flash))
return TRUE;
}
@@ -1031,7 +1031,7 @@ int AddVideo(RichEditCtrl &rec, int pos, const FlashData *flash)
cf.dwMask = CFM_ALL2;
SendMessage(rec.hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
- sel.cpMin = sel.cpMax = pos + 1;
+ sel.cpMin = sel.cpMax = pos;
SendMessage(rec.hwnd, EM_EXSETSEL, 0, (LPARAM) &sel);
if (cf.dwEffects & CFE_AUTOBACKCOLOR)
@@ -1054,13 +1054,6 @@ int AddVideo(RichEditCtrl &rec, int pos, const FlashData *flash)
SendMessage(rec.hwnd, EM_REPLACESEL, FALSE, (LPARAM) _T("\n"));
ret++;
- /* StreamData data("aaaa");
- EDITSTREAM stream = {0};
- stream.pfnCallback = StreamInEvents;
- stream.dwCookie = (DWORD_PTR) &data;
- SendMessage(rec.hwnd, EM_STREAMIN, SFF_SELECTION | SF_RTF, (LPARAM) &stream);
- */
-
sel.cpMin = pos;
sel.cpMax = pos + 3;
SendMessage(rec.hwnd, EM_EXSETSEL, 0, (LPARAM) &sel);
@@ -1188,7 +1181,7 @@ void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, TC
{
int urlLen = findURLEnd(&text[i], len - i);
- if (!inInputArea)
+ if (allowVideo)
{
FlashData flash;
if (isVideo(&text[i], urlLen, &flash))
@@ -1209,6 +1202,7 @@ void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, TC
int this_dif = AddVideo(rec, pos, &flash);
+ diff += this_dif;
i += this_dif - 1;
continue;
}