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 /plugins/HTTPServer | |
parent | dc2a4dc50d6cc3e7bd513122756dd39141d7887e (diff) |
more clipboard shit removed
Diffstat (limited to 'plugins/HTTPServer')
-rw-r--r-- | plugins/HTTPServer/src/GuiElements.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
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());
}
}
|