summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_profile.cpp')
-rw-r--r--protocols/Tox/src/tox_profile.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index d414f75a8d..d6b53fb0e9 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -186,16 +186,7 @@ void CToxProto::OnErase()
INT_PTR CToxProto::OnCopyToxID(WPARAM, LPARAM)
{
- ptrA address(getStringA(TOX_SETTINGS_ID));
- size_t length = mir_strlen(address) + 1;
- if (OpenClipboard(nullptr)) {
- EmptyClipboard();
- HGLOBAL hMemory = GlobalAlloc(GMEM_FIXED, length);
- memcpy(GlobalLock(hMemory), address, length);
- GlobalUnlock(hMemory);
- SetClipboardData(CF_TEXT, hMemory);
- CloseClipboard();
- }
+ Utils_ClipboardCopy(ptrW(getWStringA(TOX_SETTINGS_ID)));
return 0;
}