From dc597d70cef7202480eae6708e2142148e09356f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Feb 2024 19:57:58 +0300 Subject: clipboard copy function is able now to copy in multiple formats at a time --- protocols/CloudFile/src/utils.cpp | 2 +- protocols/Gadu-Gadu/src/sessions.cpp | 2 +- protocols/JabberG/src/jabber_chat.cpp | 10 +++++----- protocols/JabberG/src/jabber_disco.cpp | 6 +++--- protocols/JabberG/src/jabber_iqid_muc.cpp | 2 +- protocols/JabberG/src/jabber_userinfo.cpp | 6 +++--- protocols/Tox/src/tox_options.cpp | 2 +- protocols/Tox/src/tox_profile.cpp | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) (limited to 'protocols') diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp index d241918c2f..755746f197 100644 --- a/protocols/CloudFile/src/utils.cpp +++ b/protocols/CloudFile/src/utils.cpp @@ -91,5 +91,5 @@ void Report(MCONTACT hContact, const wchar_t *data) PasteToInputArea(hContact, data); if (g_plugin.getByte("UrlCopyToClipboard", 0)) - Utils_ClipboardCopy(data); + Utils_ClipboardCopy(MClipUnicode(data)); } diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 080882053e..c9664a726f 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -324,7 +324,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w ListView_GetItemText(hList, lvhti.iItem, 1, szIP, _countof(szIP)); ListView_GetItemText(hList, lvhti.iItem, 2, szLoginTime, _countof(szLoginTime)); mir_snwprintf(szText, L"%s\t%s\t%s", szClientName, szIP, szLoginTime); - Utils_ClipboardCopy(szText); + Utils_ClipboardCopy(MClipUnicode(szText)); } break; diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 8e88a86346..b61953a9ca 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1125,16 +1125,16 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* break; case IDM_CPY_NICK: - Utils_ClipboardCopyU(him->m_szResourceName); + Utils_ClipboardCopy(MClipUtf8(him->m_szResourceName)); break; case IDM_RJID_COPY: case IDM_CPY_RJID: - Utils_ClipboardCopyU(him->m_szRealJid); + Utils_ClipboardCopy(MClipUtf8(him->m_szRealJid)); break; case IDM_CPY_INROOMJID: - Utils_ClipboardCopyU(MakeJid(item->jid, him->m_szResourceName)); + Utils_ClipboardCopy(MClipUtf8(MakeJid(item->jid, him->m_szResourceName))); break; case IDM_RJID_VCARD: @@ -1299,11 +1299,11 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK *g break; case IDM_CPY_RJID: - Utils_ClipboardCopyU(item->jid); + Utils_ClipboardCopy(MClipUtf8(item->jid)); break; case IDM_CPY_TOPIC: - Utils_ClipboardCopyU(item->getTemp()->m_szStatusMessage); + Utils_ClipboardCopy(MClipUtf8(item->getTemp()->m_szStatusMessage)); break; } } diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index fbca7ba7e2..709ca45e72 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -1054,15 +1054,15 @@ public: break; case SD_ACT_COPYJID: - Utils_ClipboardCopyU(pNode->GetJid()); + Utils_ClipboardCopy(MClipUtf8(pNode->GetJid())); break; case SD_ACT_COPYNODE: - Utils_ClipboardCopyU(pNode->GetNode()); + Utils_ClipboardCopy(MClipUtf8(pNode->GetNode())); break; case SD_ACT_COPYINFO: - Utils_ClipboardCopyU(pNode->GetTooltipText()); + Utils_ClipboardCopy(MClipUtf8(pNode->GetTooltipText())); break; case SD_ACT_FAVORITE: diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 9b41da8414..ba0c9622aa 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -335,7 +335,7 @@ public: if (TrackPopupMenu(hMenu, TPM_RETURNCMD | TPM_BOTTOMALIGN, pos->pt.x, pos->pt.y, 0, m_hwnd, nullptr)) { wchar_t buf[JABBER_MAX_JID_LEN]; m_list.GetItemText(pos->iCurr, 0, buf, _countof(buf)); - Utils_ClipboardCopy(buf); + Utils_ClipboardCopy(MClipUnicode(buf)); } DestroyMenu(hMenu); diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index a6017785c0..25325165d2 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -483,7 +483,7 @@ public: if (nReturnCmd == 1) { CMStringW buf; GetNodeText(pos->hItem, buf); - Utils_ClipboardCopy(buf); + Utils_ClipboardCopy(MClipUnicode(buf)); } else if (nReturnCmd == 2) { wchar_t szBuffer[1024]; @@ -494,9 +494,9 @@ public: tvi.pszText = szBuffer; if (m_tree.GetItem(&tvi)) { if (wchar_t *str = wcsstr(szBuffer, L": ")) - Utils_ClipboardCopy(str + 2); + Utils_ClipboardCopy(MClipUnicode(str + 2)); else - Utils_ClipboardCopy(szBuffer); + Utils_ClipboardCopy(MClipUnicode(szBuffer)); } } DestroyMenu(hMenu); diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 330872e6f2..345e5e6c81 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -95,7 +95,7 @@ void CToxOptionsMain::EnableUdp_OnClick(CCtrlBase*) void CToxOptionsMain::ToxAddressCopy_OnClick(CCtrlButton*) { - Utils_ClipboardCopy(ptrW(m_toxAddress.GetText())); + Utils_ClipboardCopy(MClipUnicode(ptrW(m_toxAddress.GetText()))); } void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*) diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index d6b53fb0e9..92b6104e89 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -186,7 +186,7 @@ void CToxProto::OnErase() INT_PTR CToxProto::OnCopyToxID(WPARAM, LPARAM) { - Utils_ClipboardCopy(ptrW(getWStringA(TOX_SETTINGS_ID))); + Utils_ClipboardCopy(MClipUnicode(ptrW(getWStringA(TOX_SETTINGS_ID)))); return 0; } -- cgit v1.2.3