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 /options.cpp | |
parent | 47be0fda4fb11916325c2ff3b55e24501ab43ea1 (diff) |
modified: main.cpp
modified: messages.cpp
modified: options.cpp
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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 ");
|