diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-26 19:16:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-26 19:16:12 +0300 |
commit | c5dc28ec2272a865ef2f28fd7ab151b55517fedf (patch) | |
tree | d751f3e869c66371b8f1d65480b39c2997ba6e62 /protocols/CloudFile | |
parent | dc2a4dc50d6cc3e7bd513122756dd39141d7887e (diff) |
more clipboard shit removed
Diffstat (limited to 'protocols/CloudFile')
-rw-r--r-- | protocols/CloudFile/src/stdafx.h | 1 | ||||
-rw-r--r-- | protocols/CloudFile/src/utils.cpp | 19 |
2 files changed, 1 insertions, 19 deletions
diff --git a/protocols/CloudFile/src/stdafx.h b/protocols/CloudFile/src/stdafx.h index c0bb92b713..4490d2c23d 100644 --- a/protocols/CloudFile/src/stdafx.h +++ b/protocols/CloudFile/src/stdafx.h @@ -108,7 +108,6 @@ void ShowNotification(const wchar_t *message, int flags, MCONTACT hContact = NUL bool CanSendToContact(MCONTACT hContact); void SendToContact(MCONTACT hContact, const wchar_t *data); void PasteToInputArea(MCONTACT hContact, const wchar_t *data); -void PasteToClipboard(const wchar_t *data); void Report(MCONTACT hContact, const wchar_t *data); CCloudService* FindService(const char *szProto); diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp index bbdc7a8a46..5de7ebdee9 100644 --- a/protocols/CloudFile/src/utils.cpp +++ b/protocols/CloudFile/src/utils.cpp @@ -82,23 +82,6 @@ void PasteToInputArea(MCONTACT hContact, const wchar_t *data) CallService(MS_MSG_SENDMESSAGEW, hContact, (LPARAM)data); } -void PasteToClipboard(const wchar_t *data) -{ - if (OpenClipboard(nullptr)) { - EmptyClipboard(); - - size_t size = sizeof(wchar_t) * (mir_wstrlen(data) + 1); - HGLOBAL hClipboardData = GlobalAlloc(NULL, size); - if (hClipboardData) { - wchar_t *pchData = (wchar_t*)GlobalLock(hClipboardData); - mir_wstrcpy(pchData, data); - GlobalUnlock(hClipboardData); - SetClipboardData(CF_UNICODETEXT, hClipboardData); - } - CloseClipboard(); - } -} - void Report(MCONTACT hContact, const wchar_t *data) { if (g_plugin.getByte("UrlAutoSend", 1)) @@ -108,5 +91,5 @@ void Report(MCONTACT hContact, const wchar_t *data) PasteToInputArea(hContact, data); if (g_plugin.getByte("UrlCopyToClipboard", 0)) - PasteToClipboard(data); + Utils_ClipboardCopy(data); } |