diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-02 13:24:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-02 13:24:08 +0300 |
commit | 2fccd1a7a6f642c30fc4cbd2281c6feba5f8d82d (patch) | |
tree | 4ed7ab693d63e7823d112fa5842801bb21b28149 /plugins/TabSRMM/src/utils.cpp | |
parent | d4531ad72545eeaedd28ffd331c9f8d8a9e23928 (diff) |
code cleanup in tabSRMM
- unused cursor removed (IDC_HYPERLINKHAND);
- unused header file removed (all functions from generic_msghandlers.h are now declared inside a class)
- code reorder;
Diffstat (limited to 'plugins/TabSRMM/src/utils.cpp')
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 6d6d2d2dc5..05ce83105c 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -923,6 +923,27 @@ size_t Utils::CopyToClipBoard(const wchar_t *str, const HWND hwndOwner) }
/////////////////////////////////////////////////////////////////////////////////////////
+// generic handler for the WM_COPY message in message log/chat history richedit control(s).
+// it filters out the invisible event boundary markers from the text copied to the clipboard.
+// WINE Fix: overwrite clippboad data from original control data
+
+LRESULT Utils::WMCopyHandler(HWND hwnd, WNDPROC oldWndProc, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ LRESULT result = mir_callNextSubclass(hwnd, oldWndProc, msg, wParam, lParam);
+
+ ptrA szFromStream(Message_GetFromStream(hwnd, SF_TEXT | SFF_SELECTION));
+ if (szFromStream != NULL) {
+ ptrW converted(mir_utf8decodeW(szFromStream));
+ if (converted != NULL) {
+ Utils::FilterEventMarkers(converted);
+ Utils::CopyToClipBoard(converted, hwnd);
+ }
+ }
+
+ return result;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// file list handler
void Utils::AddToFileList(wchar_t ***pppFiles, int *totalCount, LPCTSTR szFilename)
|