From c5dc28ec2272a865ef2f28fd7ab151b55517fedf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Sep 2022 19:16:12 +0300 Subject: more clipboard shit removed --- plugins/HTTPServer/src/GuiElements.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'plugins/HTTPServer/src') diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 5a409ad9e3..b0a8805461 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -897,24 +897,10 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara if (sLink.size() <= 0) return TRUE; - if (LOWORD(wParam) == ID_SHARELIST_COPYLINK) { - if (!OpenClipboard(hwndDlg)) - return TRUE; - - if (!EmptyClipboard()) - return TRUE; - - HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, sLink.size() + 1); - // Lock the handle and copy the text to the buffer. - char * lptstrCopy = (char *)GlobalLock(hglbCopy); - mir_strcpy(lptstrCopy, sLink.c_str()); - GlobalUnlock(hglbCopy); - - // Place the handle on the clipboard. - SetClipboardData(CF_TEXT, hglbCopy); - CloseClipboard(); - } - else Utils_OpenUrl(sLink.c_str()); + if (LOWORD(wParam) == ID_SHARELIST_COPYLINK) + Utils_ClipboardCopy(_A2T(sLink.c_str())); + else + Utils_OpenUrl(sLink.c_str()); } } -- cgit v1.2.3