diff --git a/frm/frmLog.cpp b/frm/frmLog.cpp index e9a9e28..b9c5ed6 100644 --- a/frm/frmLog.cpp +++ b/frm/frmLog.cpp @@ -127,7 +127,7 @@ void frmLog::OnSendMail(wxCommandEvent& event) { #ifdef DEBUG wxString fn = "C:\\Users\\lsv\\Source\\Repos\\pgadmin64\\pgadmin\\x64\\Debug_(3.0)\\testhtml.txt" ; #else - wxString fn = "testhtml.txt"; + wxString fn = "mail.template"; #endif // DEBUG wxUtfFile file(fn, wxFile::read, wxFONTENCODING_UTF8); if (file.IsOpened()) @@ -548,6 +548,7 @@ frmLog::frmLog(frmMain *form, const wxString &_title, pgServer *srv) : pgFrame(N entries[1].Set(wxACCEL_CTRL, (int)'S', MNU_SEND_MAIL); wxAcceleratorTable accel(2, entries); SetAcceleratorTable(accel); + SetAcceleratorTable(accel); m_notebook = new wxNotebook( this, wxID_ANY ); diff --git a/include/utils/sysSettings.h b/include/utils/sysSettings.h index 3221a21..700a57e 100644 --- a/include/utils/sysSettings.h +++ b/include/utils/sysSettings.h @@ -873,6 +873,7 @@ private: bool moveLongValue(const wxChar *oldKey, const wxChar *newKey, int index = -1); wxFileConfig *defaultSettings; + wxString appName; }; #endif diff --git a/utils/log/Storage.cpp b/utils/log/Storage.cpp index 0cc82b1..ad8f5e8 100644 --- a/utils/log/Storage.cpp +++ b/utils/log/Storage.cpp @@ -533,8 +533,6 @@ Line Storage::getLineParse(const wxString& str, bool csv) { //fields.Add(logMessage); wxString logDetail = tk.GetNextToken(); //fields.Add(logDetail); - st.logDetail = { static_cast(t.Len()),static_cast(logDetail.Len()) }; - t += logDetail; wxString logHint = tk.GetNextToken(); //fields.Add(logHint); wxString logQuery = tk.GetNextToken(); @@ -544,6 +542,12 @@ Line Storage::getLineParse(const wxString& str, bool csv) { wxString logCursorpos = tk.GetNextToken(); if (!logDebug.IsEmpty() && logHint.IsEmpty()) logHint = logDebug; + if (!logContext.IsEmpty() && logDetail.IsEmpty()) + logDetail = logContext; + + st.logDetail = { static_cast(t.Len()),static_cast(logDetail.Len()) }; + t += logDetail; + st.logHint = { static_cast(t.Len()),static_cast(logHint.Len()) }; t += logHint; st.logMessage = { static_cast(t.Len()),static_cast(logMessage.Len()) }; diff --git a/utils/sysSettings.cpp b/utils/sysSettings.cpp index 82bb1c7..9fe6671 100644 --- a/utils/sysSettings.cpp +++ b/utils/sysSettings.cpp @@ -31,6 +31,7 @@ #include "utils/misc.h" sysSettings::sysSettings(const wxString &name) : wxConfig(name) { + appName = name; // Open the default settings file defaultSettings = NULL; if (!settingsIni.IsEmpty()) @@ -62,7 +63,11 @@ sysSettings::sysSettings(const wxString &name) : wxConfig(name) sysSettings::~sysSettings() { + wxRegKey key(wxRegKey::HKCU, "Software\\"+appName); + wxString fn= wxStandardPaths::Get().GetUserConfigDir() + wxT("\\postgresql\\autoSaveConfig.reg"); + if (wxFileName::FileExists(fn)) wxRemoveFile(fn); + key.Export(fn); if(defaultSettings) { delete defaultSettings;