Added LOGLEVEL support, release will now defined LOGLEVEL 2 (errors and warnings)

LOGGING should not be affected. 


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2550 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-03-04 22:29:03 +00:00
parent 0ade8bfc56
commit 0708677b53
18 changed files with 85 additions and 69 deletions

View File

@ -376,7 +376,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
// Additional dialogs
#ifdef LOGGING
#if LOGLEVEL > 0
if (bLogWindow)
{
m_LogWindow = new CLogWindow(this);
@ -504,7 +504,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
// ---------------
wxMenu* pDebugDialogs = new wxMenu;
if (LogManager::Enabled())
if (LogManager::GetLevel() > 0)
{
wxMenuItem* pLogWindow = pDebugDialogs->Append(IDM_LOGWINDOW, _T("&LogManager"), wxEmptyString, wxITEM_CHECK);
pLogWindow->Check(bLogWindow);

View File

@ -316,7 +316,7 @@ void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
/////////////////////////////////////////////////////////////////////////////////////////////////
void CCodeWindow::OnToggleLogWindow(wxCommandEvent& event)
{
if (LogManager::Enabled())
if (LogManager::GetLevel() > 0)
{
bool show = GetMenuBar()->IsChecked(event.GetId());

View File

@ -50,7 +50,11 @@ CLogWindow::CLogWindow(wxWindow* parent)
// left checkboxes and radio boxes -----------------------------------
int m_radioBoxNChoices[1];
wxString m_radioBoxChoices0[] = { wxT("0"), wxT("1"), wxT("2"), wxT("3") };
wxString m_radioBoxChoices0[LOGLEVEL+1];
for (int i=0;i<=LOGLEVEL;i++) {
m_radioBoxChoices0[i] = wxString::Format(wxT("%d"), i);
}
m_radioBoxNChoices[0] = sizeof( m_radioBoxChoices0 ) / sizeof( wxString );
m_RadioBox[0] = new wxRadioBox( this, IDM_RADIO0, wxT("Verbosity"),
wxDefaultPosition, wxDefaultSize, m_radioBoxNChoices[0], m_radioBoxChoices0, 1, wxRA_SPECIFY_ROWS);