diff options
-rw-r--r-- | Plugins/emoticons/Docs/emoticons_changelog.txt | 4 | ||||
-rw-r--r-- | Plugins/emoticons/Docs/emoticons_version.txt | 2 | ||||
-rw-r--r-- | Plugins/emoticons/emoticons.cpp | 24 | ||||
-rw-r--r-- | Plugins/emoticons/options.cpp | 3 | ||||
-rw-r--r-- | Plugins/emoticons/options.h | 1 | ||||
-rw-r--r-- | Plugins/emoticons/resource.h | 3 | ||||
-rw-r--r-- | Plugins/emoticons/resource.rc | 58 |
7 files changed, 37 insertions, 58 deletions
diff --git a/Plugins/emoticons/Docs/emoticons_changelog.txt b/Plugins/emoticons/Docs/emoticons_changelog.txt index 20a260a..cec2652 100644 --- a/Plugins/emoticons/Docs/emoticons_changelog.txt +++ b/Plugins/emoticons/Docs/emoticons_changelog.txt @@ -2,6 +2,10 @@ Emoticons Changelog:
+. 0.3.0.0
+ + Allows to embed videos in history
+ * Some fixes for emoticons texts
+
. 0.0.2.11
* Fix for custom smileys
+ Don't show custom smileys on outgoing messages
diff --git a/Plugins/emoticons/Docs/emoticons_version.txt b/Plugins/emoticons/Docs/emoticons_version.txt index c27b761..276c9a7 100644 --- a/Plugins/emoticons/Docs/emoticons_version.txt +++ b/Plugins/emoticons/Docs/emoticons_version.txt @@ -1 +1 @@ -Emoticons 0.0.2.11
\ No newline at end of file +Emoticons 0.3.0.0
\ No newline at end of file diff --git a/Plugins/emoticons/emoticons.cpp b/Plugins/emoticons/emoticons.cpp index 202f5ea..faec624 100644 --- a/Plugins/emoticons/emoticons.cpp +++ b/Plugins/emoticons/emoticons.cpp @@ -30,7 +30,7 @@ PLUGININFOEX pluginInfo={ #else
"Emoticons",
#endif
- PLUGIN_MAKE_VERSION(0,0,3,0),
+ PLUGIN_MAKE_VERSION(0,3,0,0),
"Emoticons",
"Ricardo Pescuma Domenecci",
"",
@@ -1179,7 +1179,7 @@ BOOL IsHidden(RichEditCtrl &rec, int start, int end) }
-void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, TCHAR *text, int len, int start, CHARRANGE &__old_sel, BOOL inInputArea)
+void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, TCHAR *text, int len, int start, CHARRANGE &__old_sel, BOOL inInputArea, BOOL allowVideo)
{
int diff = 0;
for(int i = 0; i < len; i++)
@@ -1241,14 +1241,14 @@ void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, TC }
-void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, int start, int end, BOOL inInputArea)
+void ReplaceAllEmoticons(RichEditCtrl &rec, Contact *contact, Module *module, int start, int end, BOOL inInputArea, BOOL allowVideo)
{
STOP_RICHEDIT(rec);
TCHAR *text = GetText(rec, start, end);
int len = lstrlen(text);
- ReplaceAllEmoticons(rec, contact, module, text, len, start, __old_sel, inInputArea);
+ ReplaceAllEmoticons(rec, contact, module, text, len, start, __old_sel, inInputArea, allowVideo);
MIR_FREE(text);
@@ -1434,7 +1434,7 @@ LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) TCHAR *text = GetText(dlg->input, start, end);
int len = lstrlen(text);
- ReplaceAllEmoticons(dlg->input, NULL, dlg->module, text, len, start, __old_sel, TRUE);
+ ReplaceAllEmoticons(dlg->input, NULL, dlg->module, text, len, start, __old_sel, TRUE, FALSE);
MIR_FREE(text);
@@ -1454,7 +1454,7 @@ LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) }
if (rebuild)
- ReplaceAllEmoticons(dlg->input, NULL, dlg->module, 0, -1, TRUE);
+ ReplaceAllEmoticons(dlg->input, NULL, dlg->module, 0, -1, TRUE, FALSE);
return ret;
}
@@ -1511,7 +1511,7 @@ LRESULT CALLBACK LogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT ret = CallWindowProc(dlg->log.old_edit_proc, hwnd, msg, wParam, lParam);
if (rebuild)
- ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, sel.cpMin, sel.cpMax, FALSE);
+ ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, sel.cpMin, sel.cpMax, FALSE, FALSE);
return ret;
}
@@ -1532,7 +1532,7 @@ LRESULT CALLBACK SRMMLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT ret = LogProc(hwnd, msg, wParam, lParam);
if (msg == EM_STREAMIN)
- ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, stream_in_pos, -1, FALSE);
+ ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, stream_in_pos, -1, FALSE, opts.embed_videos);
return ret;
}
@@ -1567,7 +1567,7 @@ LRESULT CALLBACK OwnerProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
if (!ret)
// Add emoticons again
- ReplaceAllEmoticons(dlg->input, NULL, dlg->module, 0, -1, TRUE);
+ ReplaceAllEmoticons(dlg->input, NULL, dlg->module, 0, -1, TRUE, FALSE);
dlg->log.sending = FALSE;
}
@@ -1686,7 +1686,7 @@ int MsgWindowEvent(WPARAM wParam, LPARAM lParam) if (isSRMM())
{
- ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, 0, -1, FALSE);
+ ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, 0, -1, FALSE, opts.embed_videos);
dlg->log.old_edit_proc = (WNDPROC) SetWindowLong(dlg->log.hwnd, GWL_WNDPROC, (LONG) SRMMLogProc);
}
@@ -2717,7 +2717,7 @@ int ReplaceEmoticonsService(WPARAM wParam, LPARAM lParam) {
Dialog *dlg = dlgit->second;
ReplaceAllEmoticons(dlg->log, dlg->contact, dlg->module, sre->rangeToReplace == NULL ? 0 : sre->rangeToReplace->cpMin,
- sre->rangeToReplace == NULL ? -1 : sre->rangeToReplace->cpMax, FALSE);
+ sre->rangeToReplace == NULL ? -1 : sre->rangeToReplace->cpMax, FALSE, opts.embed_videos);
}
else
{
@@ -2728,7 +2728,7 @@ int ReplaceEmoticonsService(WPARAM wParam, LPARAM lParam) RichEditCtrl rec = {0};
LoadRichEdit(&rec, sre->hwndRichEditControl);
ReplaceAllEmoticons(rec, GetContact(sre->hContact), m, sre->rangeToReplace == NULL ? 0 : sre->rangeToReplace->cpMin,
- sre->rangeToReplace == NULL ? -1 : sre->rangeToReplace->cpMax, FALSE);
+ sre->rangeToReplace == NULL ? -1 : sre->rangeToReplace->cpMax, FALSE, opts.embed_videos);
}
return TRUE;
diff --git a/Plugins/emoticons/options.cpp b/Plugins/emoticons/options.cpp index 49bf7d3..a31460a 100644 --- a/Plugins/emoticons/options.cpp +++ b/Plugins/emoticons/options.cpp @@ -39,10 +39,11 @@ static OptPageControl optionsControls[] = { { &opts.use_default_pack, CONTROL_CHECKBOX, IDC_USE_DEFAULT_PACK, "UseDefaultPack", TRUE },
{ &opts.only_replace_isolated, CONTROL_CHECKBOX, IDC_ONLY_ISOLATED, "OnlyReplaceIsolatedEmoticons", FALSE },
{ &opts.enable_custom_smileys, CONTROL_CHECKBOX, IDC_CUSTOM_SMILEYS, "EnableCustomSmileys", TRUE },
+ { &opts.embed_videos, CONTROL_CHECKBOX, IDC_VIDEO, "EmbedVideos", TRUE },
};
static UINT optionsExpertControls[] = {
- IDC_INPUT_TOO, IDC_USE_DEFAULT_PACK, IDC_ONLY_ISOLATED, IDC_CUSTOM_SMILEYS
+ IDC_INPUT_TOO, IDC_USE_DEFAULT_PACK, IDC_ONLY_ISOLATED
};
diff --git a/Plugins/emoticons/options.h b/Plugins/emoticons/options.h index 826e0f9..1e6eae5 100644 --- a/Plugins/emoticons/options.h +++ b/Plugins/emoticons/options.h @@ -31,6 +31,7 @@ struct Options { BOOL use_default_pack;
BOOL only_replace_isolated;
BOOL enable_custom_smileys;
+ BOOL embed_videos;
};
extern Options opts;
diff --git a/Plugins/emoticons/resource.h b/Plugins/emoticons/resource.h index 8aea224..5e72d46 100644 --- a/Plugins/emoticons/resource.h +++ b/Plugins/emoticons/resource.h @@ -1,5 +1,5 @@ //{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
+// Microsoft Developer Studio generated include file.
// Used by resource.rc
//
#define IDD_OPTIONS 119
@@ -15,6 +15,7 @@ #define IDC_ONLY_ISOLATED 1086
#define IDC_ONLY_ISOLATED2 1087
#define IDC_CUSTOM_SMILEYS 1087
+#define IDC_VIDEO 1088
#define IDC_STATIC -1
// Next default values for new objects
diff --git a/Plugins/emoticons/resource.rc b/Plugins/emoticons/resource.rc index 4b35e34..1ec4ab6 100644 --- a/Plugins/emoticons/resource.rc +++ b/Plugins/emoticons/resource.rc @@ -1,4 +1,4 @@ -// Microsoft Visual C++ generated resource script.
+//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
@@ -27,27 +27,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Dialog
//
-IDD_OPTIONS_OLD DIALOGEX 0, 0, 252, 105
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- GROUPBOX " Emoticons ",IDC_EMOTICONS,1,5,250,99
- LTEXT "Pack:",IDC_STATIC,11,20,48,8
- COMBOBOX IDC_PACK,63,18,177,60,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- CONTROL "Replace emoticons in text input area too",IDC_INPUT_TOO,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,40,230,10
- CONTROL "Use default emoticon pack for unknown protocols",
- IDC_USE_DEFAULT_PACK,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,10,52,230,10
- CONTROL "Ignore words in UPPER CASE",IDC_IGNORE_UPPERCASE,"Button",
- BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,10,64,230,
- 10
- CONTROL "Download more emoticon packs",IDC_GETMORE,"Hyperlink",
- WS_TABSTOP | 0x1,10,85,230,12
-END
-
IDD_EMOTICON_SELECTION DIALOGEX 0, 0, 188, 90
STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_BORDER
EXSTYLE WS_EX_NOPARENTNOTIFY
@@ -55,25 +34,27 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN
END
-IDD_OPTIONS DIALOGEX 0, 0, 293, 234
+IDD_OPTIONS DIALOGEX 0, 0, 293, 247
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
+FONT 8, "MS Shell Dlg"
BEGIN
LISTBOX IDC_PACK,7,2,277,148,LBS_OWNERDRAWVARIABLE |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Embed videos",IDC_VIDEO,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,7,159,277,10
+ CONTROL "Enable custom smileys",IDC_CUSTOM_SMILEYS,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,7,171,277,10
CONTROL "Replace emoticons in text input area too",IDC_INPUT_TOO,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,277,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,183,277,10
CONTROL "Use default emoticon pack for unknown protocols",
IDC_USE_DEFAULT_PACK,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,7,172,277,10
+ WS_TABSTOP,7,195,277,10
CONTROL "Only replace emoticons surrounded by spaces",
IDC_ONLY_ISOLATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 7,184,277,10
+ 7,207,277,10
CONTROL "Download more emoticon packs",IDC_GETMORE,"Hyperlink",
- WS_TABSTOP | 0x1,7,218,277,12
- CONTROL "Enable custom smileys",IDC_CUSTOM_SMILEYS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,7,196,277,10
+ WS_TABSTOP | 0x1,7,231,277,12
END
@@ -83,21 +64,12 @@ END //
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO MOVEABLE PURE
BEGIN
- IDD_OPTIONS_OLD, DIALOG
- BEGIN
- LEFTMARGIN, 1
- RIGHTMARGIN, 251
- TOPMARGIN, 1
- BOTTOMMARGIN, 104
- END
-
IDD_OPTIONS, DIALOG
BEGIN
LEFTMARGIN, 1
TOPMARGIN, 1
- BOTTOMMARGIN, 228
END
END
#endif // APSTUDIO_INVOKED
@@ -121,19 +93,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN // TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE MOVEABLE PURE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE MOVEABLE PURE
BEGIN
"#include ""resource.h""\r\n"
"#include ""winresrc.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE MOVEABLE PURE
BEGIN
"\r\n"
"\0"
|