Merge the log window CreateGUIControls and LoadSettings methods. This allows the settings from the ini file to be applied when the controls are created rather than setting a default, and then changing the settings later. In particular word wrap is applied when the text control is created. This works around the crash at application start that users are reporting in issue 4196.

Also change the for loops in SysConf to use iterators to placate godisgovernment and billiard. :P


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7283 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-03-03 22:47:48 +00:00
parent 05719ac81a
commit 756c40163d
4 changed files with 105 additions and 123 deletions

View File

@ -53,7 +53,6 @@ public:
~CLogWindow();
void SaveSettings();
void LoadSettings();
void Log(LogTypes::LOG_LEVELS, const char *text);
int x, y, winpos;
@ -63,11 +62,9 @@ private:
wxFont DefaultFont, MonoSpaceFont;
std::vector<wxFont> LogFont;
wxTimer *m_LogTimer;
FileLogListener *m_fileLog;
ConsoleListener *m_console;
LogManager *m_LogManager;
std::queue<std::pair<u8, wxString> > msgQueue;
bool m_writeFile, m_writeConsole, m_writeWindow, m_LogAccess, m_bWrapLines;
bool m_writeFile, m_writeConsole, m_writeWindow, m_LogAccess;
// Controls
wxBoxSizer *sBottom;
@ -83,13 +80,13 @@ private:
wxTextCtrl * CreateTextCtrl(wxPanel* parent, wxWindowID id = wxID_ANY, long Style = NULL);
void CreateGUIControls();
void PopulateRight(); void UnPopulateRight();
void PopulateBottom();
void UnPopulateBottom();
void OnClose(wxCloseEvent& event);
void OnSize(wxSizeEvent& event);
void OnSubmit(wxCommandEvent& event);
void OnFontChange(wxCommandEvent& event);
void OnWrapLineCheck(wxCommandEvent& event);
void ToggleWrapLine(bool word_wrap);
void OnClear(wxCommandEvent& event);
void OnLogTimer(wxTimerEvent& WXUNUSED(event));
void UpdateLog();