summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-10-31 13:02:56 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2010-10-31 13:02:56 +0200
commit0922841b20da6c15076f1467280a0e67407826d1 (patch)
tree359a1149b1d24c603ffbac4a7fb68c7e380821be /options.cpp
parentf375e4f961eb52fa504c17e7825e832829310e8a (diff)
log rework
better gpg configuration check removed annoying message boxes (info now out to log)
Diffstat (limited to 'options.cpp')
-rw-r--r--options.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/options.cpp b/options.cpp
index 246be86..ab12158 100644
--- a/options.cpp
+++ b/options.cpp
@@ -255,13 +255,12 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if(!gpg_thread.timed_join(boost::posix_time::seconds(10)))
{
gpg_thread.~thread();
- MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK);
+ debuglog<<time_str()<<": GPG execution timed out, aborted\n";
mir_free(tmp);
break;
}
if(result == pxNotFound)
{
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
mir_free(tmp);
break;
}
@@ -697,11 +696,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
if(!gpg_thread.timed_join(boost::posix_time::seconds(10)))
{
gpg_thread.~thread();
- MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK);
- }
- if(result == pxNotFound)
- {
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ debuglog<<time_str()<<": GPG execution timed out, aborted\n";
}
if((out.find("-----BEGIN PGP PUBLIC KEY BLOCK-----") != string::npos) && (out.find("-----END PGP PUBLIC KEY BLOCK-----") != string::npos))
{
@@ -850,14 +845,11 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
if(!gpg_thread.timed_join(boost::posix_time::seconds(10)))
{
gpg_thread.~thread();
- MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK);
+ debuglog<<time_str()<<": GPG execution timed out, aborted\n";
break;
}
if(result == pxNotFound)
- {
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
break;
- }
mir_free(begin);
mir_free(end);
if(hContact)
@@ -1088,14 +1080,11 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
if(!gpg_thread.timed_join(boost::posix_time::seconds(10)))
{
gpg_thread.~thread();
- MessageBox(0, _T("GPG execution timed out, aborted"), _T(""), MB_OK);
+ debuglog<<time_str()<<": GPG execution timed out, aborted\n";
break;
}
if(result == pxNotFound)
- {
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
break;
- }
string::size_type s = 0;
while((s = out.find("\r", s)) != string::npos)
{
@@ -1178,7 +1167,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
if(key_buf.empty())
{
key_buf.clear();
- debuglog<<"info: Failed to read key file\n";
+ debuglog<<time_str()<<": info: Failed to read key file\n";
break;
}
ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"));