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