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 --- main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index a7595b1..834d6c7 100644 --- a/main.cpp +++ b/main.cpp @@ -88,7 +88,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM string::size_type p = 0, p2 = 0, stop = 0; { wstring cmd = _T("--list-secret-keys"); - pxExecute(&cmd, "", &out, &code); + if(pxExecute(&cmd, "", &out, &code) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + break; + } } cp866_to_cp1251(&out); while(p != string::npos) @@ -152,7 +156,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM DWORD code; wstring cmd = _T("--export -a "); cmd += fp; - pxExecute(&cmd, "", &out, &code); + if(pxExecute(&cmd, "", &out, &code) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + break; + } DBWriteContactSettingString(NULL, szModuleName, "GPGPubKey", out.c_str()); } DBWriteContactSettingByte(NULL, szModuleName, "FirstRun", 0); -- cgit v1.2.3