From 21e7268a503be780b35e367564d711e79a61dffc Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 28 Feb 2015 06:48:33 +0000 Subject: Tox: - added support of tox1 dns resolving - added request/grant items in contact menu - added copy id item in statum menu - code reordering - fixed minor bugs git-svn-id: http://svn.miranda-ng.org/main/trunk@12281 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_profile.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'protocols/Tox/src/tox_profile.cpp') diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index a404d080ca..35014a4500 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -137,6 +137,22 @@ void CToxProto::SaveToxProfile() mir_free(data); } +int CToxProto::OnCopyToxID(WPARAM, LPARAM) +{ + ptrA address(getStringA(TOX_SETTINGS_ID)); + size_t length = mir_strlen(address) + 1; + if (OpenClipboard(NULL)) + { + EmptyClipboard(); + HGLOBAL hMem = GlobalAlloc(GMEM_FIXED, length); + memcpy(GlobalLock(hMem), address, length); + GlobalUnlock(hMem); + SetClipboardData(CF_TEXT, hMem); + CloseClipboard(); + } + return 0; +} + INT_PTR CToxProto::ToxProfilePasswordProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { CToxProto *proto = (CToxProto*)GetWindowLongPtr(hwnd, GWLP_USERDATA); -- cgit v1.2.3