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 --- messages.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index db6fdad..8617a70 100644 --- a/messages.cpp +++ b/messages.cpp @@ -70,7 +70,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) 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); + return CallService(MS_PROTO_CHAINRECV, w, l); + } cp866_to_cp1251(&output); MessageBoxA(0, output.c_str(), "", MB_OK); DeleteFile(tmp2); @@ -103,7 +107,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) cmd += _T(" -d -a \""); cmd += path; cmd += _T("\""); - pxExecute(&cmd, "", &out, &code); + if(pxExecute(&cmd, "", &out, &code) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + return CallService(MS_PROTO_CHAINRECV, w, l); + } DeleteFile(path.c_str()); str.clear(); { @@ -198,7 +206,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) mir_free(tmp); f.close(); } - pxExecute(&cmd, "", &out, &code); + if(pxExecute(&cmd, "", &out, &code) == pxNotFound) + { + MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + return CallService(MS_PROTO_CHAINSEND, w, l); + } DeleteFile(path.c_str()); path.append(_T(".asc")); wfstream f(path.c_str(), std::ios::in); -- cgit v1.2.3