From d343c7ed12d993658e62f4a5a3732276a0e627cb Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 13 Aug 2010 03:45:45 +0300 Subject: modified: main.cpp modified: messages.cpp modified: options.cpp --- options.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp index 906119a..0039b39 100644 --- a/options.cpp +++ b/options.cpp @@ -167,7 +167,12 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ptmp = mir_a2t(tmp); cmd += ptmp; mir_free(ptmp); - pxExecute(&cmd, "", &output,&exitcode); + if(pxExecute(&cmd, "", &output,&exitcode) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + mir_free(tmp); + break; + } MessageBoxA(0, "Key removed from GPG keyring", "info", MB_OK); } mir_free(tmp); @@ -376,7 +381,11 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP cmd += tmp2; cmd += _T("\""); } - pxExecute(&cmd, "", &output, &exitcode); + if(pxExecute(&cmd, "", &output, &exitcode) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + break; + } cp866_to_cp1251(&output); { string::size_type s = output.find("gpg: key ") + strlen("gpg: key "); -- cgit v1.2.3