summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-10-19 08:59:25 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-10-19 08:59:25 +0300
commitf9f50a5ce2120ca30100dcbc47b5b4cea6b44b77 (patch)
tree1d9e5722851de42d53c4e07b6d6a201c6a84f930 /options.cpp
parentb12986a6163f7634a20e34761b9b32776b64c226 (diff)
modified: options.cpp
Diffstat (limited to 'options.cpp')
-rwxr-xr-xoptions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/options.cpp b/options.cpp
index b067cb3..5f0c99f 100755
--- a/options.cpp
+++ b/options.cpp
@@ -358,6 +358,14 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if(OpenClipboard(hwndDlg))
{
char *szKey = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", "");
+ TCHAR *buf = mir_utf8decodeT(szKey);
+ mir_free(szKey);
+ std::wstring str = buf;
+ mir_free(buf);
+ for(std::wstring::size_type i = str.find(_T("\n")); i != std::wstring::npos; i = str.find(_T("\n"), i+2))
+ str.replace(i, 1, _T("\r\n"));
+ szKey = mir_utf8encodeW(str.c_str());
+ str.clear();
EmptyClipboard();
if(!SetClipboardData(CF_OEMTEXT, szKey))
{