diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-23 19:57:58 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-23 19:57:58 +0300 |
commit | dc597d70cef7202480eae6708e2142148e09356f (patch) | |
tree | 459e171a2e8a5bb2def7d7aea67fb769aa224bb2 /plugins | |
parent | 349ff91be06644a8b611ecf6a39ce0ac1bcde86a (diff) |
clipboard copy function is able now to copy in multiple formats at a time
Diffstat (limited to 'plugins')
29 files changed, 37 insertions, 37 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 88e9b0c08d..8dfb4f63ed 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -189,7 +189,7 @@ int CALLBACK CKLPopupDlgProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lP case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
if (!IsBadStringPtr(ptszPopupText, MaxTextSize))
- Utils_ClipboardCopy(ptszPopupText);
+ Utils_ClipboardCopy(MClipUnicode(ptszPopupText));
PUDeletePopup(hWnd);
}
break;
@@ -200,7 +200,7 @@ int CALLBACK CKLPopupDlgProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lP case UM_POPUPACTION:
if ((lParam == 0) && (!IsBadStringPtr(ptszPopupText, MaxTextSize)))
- Utils_ClipboardCopy(ptszPopupText);
+ Utils_ClipboardCopy(MClipUnicode(ptszPopupText));
break;
case UM_FREEPLUGINDATA:
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 14d3d56894..4236fc1e67 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -424,7 +424,7 @@ int ChangeLayout(HWND hTextWnd, uint8_t TextOperation, BOOL CurrentWord) Skin_PlaySound(SND_ChangeCase);
if (moOptions.CopyToClipboard)
- Utils_ClipboardCopy(ptszMBox);
+ Utils_ClipboardCopy(MClipUnicode(ptszMBox));
//-------------------------------Покажем попапы------------------------------------------
if (moOptions.ShowPopup) {
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index d5f63645e5..f463739e9f 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -499,7 +499,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP }
if (dst - buf > 0)
- Utils_ClipboardCopy(buf);
+ Utils_ClipboardCopy(MClipUnicode(buf));
free(buf);
break;
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 5f0c12869b..ba611e24d7 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -92,7 +92,7 @@ INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam) PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR | VI_FLAG_FORMAT);
WriteBBFile(buffer, false);
- Utils_ClipboardCopy(buffer);
+ Utils_ClipboardCopy(MClipUnicode(buffer));
return 0;
}
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 86bf2ebf47..afd2fc566c 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -655,5 +655,5 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha free(dst);
if (g_plugin.getByte("ShowCrashMessageBox", 1) && msg && IDYES == MessageBox(nullptr, msg, L"Miranda Crash Dumper", MB_YESNO | MB_ICONERROR | MB_TASKMODAL | MB_DEFBUTTON2 | MB_TOPMOST))
- Utils_ClipboardCopy(buffer);
+ Utils_ClipboardCopy(MClipUnicode(buffer));
}
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index b38a095635..49cdd922af 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -64,7 +64,7 @@ wchar_t* Utils::getFileNameFromPath(wchar_t *stzPath) void Utils::copyToClipboard(char *szText)
{
- Utils_ClipboardCopy(szText);
+ Utils_ClipboardCopy(MClipAnsi(szText));
}
void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl_slist *headerList, char *errorBuff)
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 4fc36e40f2..56473e795f 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -888,7 +888,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara return TRUE;
if (LOWORD(wParam) == ID_SHARELIST_COPYLINK)
- Utils_ClipboardCopy(sLink.c_str());
+ Utils_ClipboardCopy(MClipAnsi(sLink.c_str()));
else
Utils_OpenUrl(sLink.c_str());
}
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 269c3d3f48..fcda68205b 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -162,7 +162,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) break;
case IDM_LINK_COPY:
- Utils_ClipboardCopy(link);
+ Utils_ClipboardCopy(MClipUnicode(link));
break;
case IDM_SHOWMESSAGE:
diff --git a/plugins/IEView/src/external_funcs.cpp b/plugins/IEView/src/external_funcs.cpp index 57e4c8f5cf..0809e07afb 100644 --- a/plugins/IEView/src/external_funcs.cpp +++ b/plugins/IEView/src/external_funcs.cpp @@ -203,7 +203,7 @@ namespace External if (p == nullptr || p->cArgs < 1)
return E_INVALIDARG;
- Utils_ClipboardCopy(p->rgvarg[0].bstrVal);
+ Utils_ClipboardCopy(MClipUnicode(p->rgvarg[0].bstrVal));
return S_OK;
}
}
diff --git a/plugins/Import/src/progress.cpp b/plugins/Import/src/progress.cpp index 853c075ee7..eabdf13594 100644 --- a/plugins/Import/src/progress.cpp +++ b/plugins/Import/src/progress.cpp @@ -88,7 +88,7 @@ void CProgressPageDlg::OnContextMenu(CCtrlBase*) }
}
- Utils_ClipboardCopy(wszText);
+ Utils_ClipboardCopy(MClipUnicode(wszText));
break;
}
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 4cbf357fbd..eada043836 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -428,7 +428,7 @@ static INT_PTR onCopyID(WPARAM hContact, LPARAM) }
else buf = wszId;
- Utils_ClipboardCopy(buf);
+ Utils_ClipboardCopy(MClipUnicode(buf));
if (CTRL_IS_PRESSED)
ShowPopup(buf, hContact);
@@ -464,7 +464,7 @@ static INT_PTR onCopyStatusMsg(WPARAM hContact, LPARAM) }
}
- Utils_ClipboardCopy(wszBuffer);
+ Utils_ClipboardCopy(MClipUnicode(wszBuffer));
if (CTRL_IS_PRESSED)
ShowPopup(wszBuffer, hContact);
@@ -484,7 +484,7 @@ static INT_PTR onCopyIP(WPARAM hContact, LPARAM) if (rIP)
wszBuffer.AppendFormat(L"Internal IP: %d.%d.%d.%d\r\n", rIP >> 24, (rIP >> 16) & 0xFF, (rIP >> 8) & 0xFF, rIP & 0xFF);
- Utils_ClipboardCopy(wszBuffer);
+ Utils_ClipboardCopy(MClipUnicode(wszBuffer));
if (CTRL_IS_PRESSED)
ShowPopup(wszBuffer, hContact);
@@ -495,7 +495,7 @@ static INT_PTR onCopyMirVer(WPARAM hContact, LPARAM) {
LPWSTR msg = getMirVer(hContact);
if (msg) {
- Utils_ClipboardCopy(msg);
+ Utils_ClipboardCopy(MClipUnicode(msg));
if (CTRL_IS_PRESSED)
ShowPopup(msg, hContact);
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index 8ef718f6ae..1f73e2df08 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -410,7 +410,7 @@ public: if (proto) { char fprint[45]; if (otrl_privkey_fingerprint(otr_user_state, fprint, proto, proto)) - Utils_ClipboardCopy(fprint); + Utils_ClipboardCopy(MClipAnsi(fprint)); } break; @@ -795,7 +795,7 @@ public: case IDM_OPT_COPY: wchar_t hash[45]; otrl_privkey_hash_to_humanT(hash, fp->fingerprint); - Utils_ClipboardCopy(hash); + Utils_ClipboardCopy(MClipUnicode(hash)); break; case IDM_OPT_FINGER_FORGET: diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index f6f018936b..1ab7eebdcc 100644 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -572,7 +572,7 @@ bool bAdvancedCopy(HWND hwnd) pszCurDec++;
}
pszCurDec[0] = 0;
- Utils_ClipboardCopy(pszSrcBuf);
+ Utils_ClipboardCopy(MClipUnicode(pszSrcBuf));
delete[] pszSrcBuf;
return true;
}
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index d035320ddb..a9c543a9f8 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -284,7 +284,7 @@ void NewstoryListData::ClearSelection(int iFirst, int iLast) void NewstoryListData::Copy(bool bTextOnly)
{
- Utils_ClipboardCopy(GatherSelected(bTextOnly));
+ Utils_ClipboardCopy(MClipUnicode(GatherSelected(bTextOnly)));
}
void NewstoryListData::CopyPath()
@@ -293,7 +293,7 @@ void NewstoryListData::CopyPath() if (pItem->completed()) {
DB::EventInfo dbei(pItem->hEvent);
DB::FILE_BLOB blob(dbei);
- Utils_ClipboardCopy(blob.getLocalName());
+ Utils_ClipboardCopy(MClipUnicode(blob.getLocalName()));
}
}
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index d219fff6bf..53a690aef4 100644 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -449,7 +449,7 @@ public: {
CMStringW str(g_plugin.getMStringW("GPGPubKey"));
str.Replace(L"\n", L"\r\n");
- Utils_ClipboardCopy(str);
+ Utils_ClipboardCopy(MClipUnicode(str));
}
void onClick_LOG_FILE_SET(CCtrlButton*)
diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp index fdcfd86195..766978e7e1 100644 --- a/plugins/New_GPG/src/ui.cpp +++ b/plugins/New_GPG/src/ui.cpp @@ -551,7 +551,7 @@ public: return;
params.out.Remove('\r');
- Utils_ClipboardCopy(params.out);
+ Utils_ClipboardCopy(MClipAnsi(params.out));
}
void onClick_EXPORT_PRIVATE(CCtrlButton *)
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 8a4c95ce08..f711ca041d 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -952,7 +952,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
CMStringW tszText(FORMAT, L"%s\n\n%s", (m_lptzTitle) ? m_lptzTitle : L"", (m_lptzText) ? m_lptzText : L"");
- Utils_ClipboardCopy(tszText);
+ Utils_ClipboardCopy(MClipUnicode(tszText));
}
PUDeletePopup(m_hwnd);
break;
diff --git a/plugins/ProxySwitch/src/main.cpp b/plugins/ProxySwitch/src/main.cpp index 3b08113a3a..2db415334a 100644 --- a/plugins/ProxySwitch/src/main.cpp +++ b/plugins/ProxySwitch/src/main.cpp @@ -105,7 +105,7 @@ static INT_PTR CopyIP2Clipboard(WPARAM, LPARAM, LPARAM idx) { mir_cslock lck(csNIF_List); if (g_arNIF[idx].IPcount != 0) - Utils_ClipboardCopy(g_arNIF[idx].IPstr); + Utils_ClipboardCopy(MClipAnsi(g_arNIF[idx].IPstr)); return 0; } diff --git a/plugins/QuickSearch/src/window_misc.cpp b/plugins/QuickSearch/src/window_misc.cpp index a8e8bb32b9..bd377b09dd 100644 --- a/plugins/QuickSearch/src/window_misc.cpp +++ b/plugins/QuickSearch/src/window_misc.cpp @@ -211,7 +211,7 @@ void QSMainDlg::CopyMultiLines() buf.Append(L"\r\n");
}
- Utils_ClipboardCopy(buf);
+ Utils_ClipboardCopy(MClipUnicode(buf));
}
void QSMainDlg::DeleteByList()
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index b75ab78c42..145e7500ee 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -354,7 +354,7 @@ void CMsgDialog::onClick_UserMenu(CCtrlButton *pButton) {
if (GetKeyState(VK_SHIFT) & 0x8000) { // copy user name
ptrW id(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
- Utils_ClipboardCopy(id);
+ Utils_ClipboardCopy(MClipUnicode(id));
}
else {
RECT rc;
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 9fe86edcda..11092d0729 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1039,7 +1039,7 @@ static INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, case IDC_RSA_COPY:
wchar_t txt[128];
GetDlgItemTextW(hDlg, IDC_RSA_SHA, txt, _countof(txt));
- Utils_ClipboardCopy(txt);
+ Utils_ClipboardCopy(MClipUnicode(txt));
return TRUE;
case IDC_RSA_EXP:
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index a06829a422..6321215b1d 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -165,7 +165,7 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, }
else len = GetDlgItemText(hwndDlg, edtID, tmp, _countof(tmp));
- Utils_ClipboardCopy(CMStringW(tmp, len + 1));
+ Utils_ClipboardCopy(MClipUnicode(CMStringW(tmp, len + 1)));
if (LOWORD(wParam) == IDOK)
DestroyWindow(hwndDlg);
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 612e3d6e19..b4c8474bad 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -117,7 +117,7 @@ public: {
wchar_t msg[1024];
GetDlgItemText(m_hwnd, IDC_MSG, msg, _countof(msg));
- Utils_ClipboardCopy(msg);
+ Utils_ClipboardCopy(MClipUnicode(msg));
}
};
@@ -186,7 +186,7 @@ public: CMStringW wszMsg((wchar_t *)ack->lParam);
wszMsg.Replace(L"\n", L"\r\n");
- Utils_ClipboardCopy(wszMsg);
+ Utils_ClipboardCopy(MClipUnicode(wszMsg));
Close();
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 6c21e44ef9..fadb35b176 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -463,7 +463,7 @@ VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control) default: wchar_t item_string[128]; GetMenuString(hmenu, m_selection, (LPTSTR)&item_string, 128, MF_BYCOMMAND); - Utils_ClipboardCopy(item_string); + Utils_ClipboardCopy(MClipUnicode(item_string)); SendMessage(edit_control, WM_PASTE, 0, 0); break; } diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp index 5274c9f6fb..3f9e37d69b 100644 --- a/plugins/StatusManager/src/ss_options.cpp +++ b/plugins/StatusManager/src/ss_options.cpp @@ -161,7 +161,7 @@ public: { wchar_t cmdl[2048]; GetDlgItemText(m_hwnd, IDC_CMDL, cmdl, _countof(cmdl)); - Utils_ClipboardCopy(cmdl); + Utils_ClipboardCopy(MClipUnicode(cmdl)); } void onClick_Link(CCtrlButton*) diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 51a81a5bdf..030053400e 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -211,7 +211,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara case IDC_NAME:
if (GetKeyState(VK_SHIFT) & 0x8000) // copy UIN
- Utils_ClipboardCopy(m_cache->getUIN());
+ Utils_ClipboardCopy(MClipUnicode(m_cache->getUIN()));
else
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)(m_cache->getActiveContact()), 0);
break;
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 38bf1ffbe1..2704436c87 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -739,11 +739,11 @@ LRESULT CInfoPanel::cmdHandler(UINT cmd) switch (cmd) {
case CMD_IP_COPY:
if (m_hoverFlags & HOVER_NICK) {
- Utils_ClipboardCopy(m_dat->m_cache->getNick());
+ Utils_ClipboardCopy(MClipUnicode(m_dat->m_cache->getNick()));
return(S_OK);
}
if (m_hoverFlags & HOVER_UIN) {
- Utils_ClipboardCopy(m_isChat ? m_dat->m_si->ptszTopic : m_dat->m_cache->getUIN());
+ Utils_ClipboardCopy(MClipUnicode(m_isChat ? m_dat->m_si->ptszTopic : m_dat->m_cache->getUIN()));
return(S_OK);
}
break;
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 4f8d7cbdf5..2d9bd9b669 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -3029,7 +3029,7 @@ LRESULT CMsgDialog::WMCopyHandler(UINT msg, WPARAM wParam, LPARAM lParam) ptrW converted(mir_utf8decodeW(szFromStream));
if (converted != nullptr) {
Utils::FilterEventMarkers(converted);
- Utils_ClipboardCopy(converted);
+ Utils_ClipboardCopy(MClipUnicode(converted));
}
}
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 342dc7b06f..cfea821386 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -443,7 +443,7 @@ public: job->writeFlags();
break;
case ID_QUEUEMANAGER_COPYMESSAGETOCLIPBOARD:
- Utils_ClipboardCopy(ptrW(mir_utf8decodeW(job->sendBuffer)));
+ Utils_ClipboardCopy(MClipUnicode(ptrW(mir_utf8decodeW(job->sendBuffer))));
break;
case ID_QUEUEMANAGER_RESETSELECTED:
if (job->bCode == CSendLaterJob::JOB_DEFERRED) {
|