diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-20 13:29:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-20 13:29:24 +0300 |
commit | 0dfd93b286dd2ab1caf7fcaacbce7273c492433b (patch) | |
tree | ca219dee0b67d4f57e90f9934ffdcedae6232036 /protocols/JabberG/src/jabber_util.cpp | |
parent | 397d070df1e8b0f208cc148371d3fd56f314afc6 (diff) |
Jabber:
- fixes #1855 (Jabber: chinese in services info);
- fixes #1854 (Jabber: crash on receiving channels list);
- strange obsolete class UserInfoStringBuf removed;
- code optimization
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_util.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index dceac9a0db..659d3b391f 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -769,6 +769,23 @@ const wchar_t *JabberStrIStr(const wchar_t *str, const wchar_t *substr) ////////////////////////////////////////////////////////////////////////
// clipboard processing
+void JabberCopyText(HWND hwnd, const char *pszText)
+{
+ if (!hwnd || !pszText) return;
+
+ if (OpenClipboard(hwnd)) {
+ Utf2T text(pszText);
+
+ EmptyClipboard();
+ HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t)*(mir_wstrlen(text) + 1));
+ wchar_t *s = (wchar_t *)GlobalLock(hMem);
+ mir_wstrcpy(s, text);
+ GlobalUnlock(hMem);
+ SetClipboardData(CF_UNICODETEXT, hMem);
+ CloseClipboard();
+ }
+}
+
void JabberCopyText(HWND hwnd, const wchar_t *text)
{
if (!hwnd || !text) return;
|