From 820307153b05c8ce93f5022c6772a748cca49909 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 19 Oct 2011 06:40:18 +0300 Subject: cipy to clipboard button, may not work yet --- options.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) mode change 100644 => 100755 options.cpp (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp old mode 100644 new mode 100755 index fe1c2c3..4b68d63 --- a/options.cpp +++ b/options.cpp @@ -353,6 +353,19 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA f.close(); } break; + case IDC_COPY_KEY: + { + if(OpenClipboard(hwndDlg)) + { + char *szKey = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); + EmptyClipboard(); + SetClipboardData(CF_OEMTEXT, szKey); + CloseClipboard(); + mir_free(szKey); + } + else + MessageBoxA(0, "Error", "Failed to open clipboard", MB_OK); + } case IDC_LOG_FILE_SET: { tmp = GetFilePath(_T("Set log file"), _T("*"), _T("LOG files"), 1); @@ -366,7 +379,7 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; } - + case WM_NOTIFY: { EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), (bIsMiranda09 && IsDlgButtonChecked(hwndDlg, IDC_JABBER_API))); -- cgit v1.2.3