diff options
Diffstat (limited to 'protocols/Discord/src/menus.cpp')
-rw-r--r-- | protocols/Discord/src/menus.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp index 5aa2f37926..f51d7c7d5c 100644 --- a/protocols/Discord/src/menus.cpp +++ b/protocols/Discord/src/menus.cpp @@ -19,19 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. INT_PTR CDiscordProto::OnMenuCopyId(WPARAM hContact, LPARAM) { - if (OpenClipboard(nullptr)) { - EmptyClipboard(); - - CMStringW mynick(FORMAT, L"%s#%d", getMStringW(hContact, DB_KEY_NICK).c_str(), getDword(hContact, DB_KEY_DISCR)); - int length = mynick.GetLength() + 1; - if (HGLOBAL hMemory = GlobalAlloc(GMEM_FIXED, length * sizeof(wchar_t))) { - mir_wstrncpy((wchar_t *)GlobalLock(hMemory), mynick, length); - GlobalUnlock(hMemory); - SetClipboardData(CF_UNICODETEXT, hMemory); - } - CloseClipboard(); - } - + CopyId(CMStringW(FORMAT, L"%s#%d", getMStringW(hContact, DB_KEY_NICK).c_str(), getDword(hContact, DB_KEY_DISCR))); return 0; } |