diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-13 03:45:45 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-13 03:45:45 +0300 |
commit | d343c7ed12d993658e62f4a5a3732276a0e627cb (patch) | |
tree | 42bdb8fbf7e01a3a260fa7cf1052d008d4969ed6 /messages.cpp | |
parent | 47be0fda4fb11916325c2ff3b55e24501ab43ea1 (diff) |
modified: main.cpp
modified: messages.cpp
modified: options.cpp
Diffstat (limited to 'messages.cpp')
-rw-r--r-- | messages.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
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);
|