From b3d3b95a16be5b1785681f0f6fdc3bcdb967a42e Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 8 Dec 2017 04:42:36 +0300 Subject: new_gpg: get rid of "extern chaos" - moving ui related code to separated file, split definition and implementation of ui --- plugins/New_GPG/src/gpg_wrapper.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'plugins/New_GPG/src/gpg_wrapper.cpp') diff --git a/plugins/New_GPG/src/gpg_wrapper.cpp b/plugins/New_GPG/src/gpg_wrapper.cpp index 38e06f2254..30d9fc0264 100755 --- a/plugins/New_GPG/src/gpg_wrapper.cpp +++ b/plugins/New_GPG/src/gpg_wrapper.cpp @@ -20,9 +20,8 @@ pxResult pxExecute(std::vector &aargv, string *aoutput, LPDWORD aexitcode, pxResult *result, boost::process::child *_child) { - if(!gpg_valid) + if(!globals.gpg_valid) return pxNotConfigured; - extern logtofile debuglog; wchar_t *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L""); @@ -30,8 +29,8 @@ pxResult pxExecute(std::vector &aargv, string *aoutput, LPDWORD ae if(!boost::filesystem::exists(bin_path)) { mir_free(bin_path); - if(bDebugLog) - debuglog< &aargv, string *aoutput, LPDWORD ae argv.push_back(L"-z9"); argv.insert(argv.end(), aargv.begin(), aargv.end()); - if(bDebugLog) + if(globals.bDebugLog) { std::wstring args; for(unsigned int i = 0; i < argv.size(); ++i) @@ -69,7 +68,7 @@ pxResult pxExecute(std::vector &aargv, string *aoutput, LPDWORD ae args += L" "; } args.erase(args.size()-1, 1); - debuglog< &aargv, string *aoutput, LPDWORD ae } catch(const std::exception &e) { - if(bDebugLog) - debuglog< &aargv, string *aoutput, LPDWORD ae } catch(const std::exception &e) { - if(bDebugLog) - debuglog< &aargv, string *aoutput, LPDWORD ae if(*aexitcode) { - if(bDebugLog) - debuglog< &aargv, pxResult *result, boost::process::child *_child) { - if(!gpg_valid) + if(!globals.gpg_valid) return pxNotConfigured; - extern logtofile debuglog; wchar_t *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L""); { if(!boost::filesystem::exists(bin_path)) { mir_free(bin_path); - if(bDebugLog) - debuglog<