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/log.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 plugins/New_GPG/src/log.cpp (limited to 'plugins/New_GPG/src/log.cpp') diff --git a/plugins/New_GPG/src/log.cpp b/plugins/New_GPG/src/log.cpp old mode 100644 new mode 100755 index bc3dc5047f..c4d0ef7156 --- a/plugins/New_GPG/src/log.cpp +++ b/plugins/New_GPG/src/log.cpp @@ -19,7 +19,7 @@ logtofile& logtofile::operator<<(wchar_t *buf) { - if(_bDebugLog != bDebugLog) + if(_bDebugLog != globals.bDebugLog) init(); log_mutex.lock(); log.open(toUTF8(path).c_str(), std::ios::app |std::ios::ate); @@ -31,7 +31,7 @@ logtofile& logtofile::operator<<(wchar_t *buf) } logtofile& logtofile::operator<<(char *buf) { - if(_bDebugLog != bDebugLog) + if(_bDebugLog != globals.bDebugLog) init(); log_mutex.lock(); log.open(toUTF8(path).c_str(), std::ios::app |std::ios::ate); @@ -43,7 +43,7 @@ logtofile& logtofile::operator<<(char *buf) } logtofile& logtofile::operator<<(string buf) { - if(_bDebugLog != bDebugLog) + if(_bDebugLog != globals.bDebugLog) init(); log_mutex.lock(); char *tmp = mir_utf8encode(buf.c_str()); @@ -57,7 +57,7 @@ logtofile& logtofile::operator<<(string buf) } logtofile& logtofile::operator<<(wstring buf) { - if(_bDebugLog != bDebugLog) + if(_bDebugLog != globals.bDebugLog) init(); log_mutex.lock(); log.open(toUTF8(path).c_str(), std::ios::app |std::ios::ate); @@ -69,13 +69,13 @@ logtofile& logtofile::operator<<(wstring buf) } void logtofile::init() { - if(bDebugLog) + if(globals.bDebugLog) { if(path) mir_free(path); path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szLogFilePath", L"C:\\GPGdebug.log"); } - _bDebugLog = bDebugLog; + _bDebugLog = globals.bDebugLog; } logtofile::logtofile() { -- cgit v1.2.3