mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
little Logwindow feature - enable/disable all logs
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@314 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ab4333ebac
commit
84336bd7b6
@ -24,6 +24,7 @@ enum
|
||||
IDM_UPDATELOG,
|
||||
IDM_CLEARLOG,
|
||||
IDM_LOGCHECKS,
|
||||
IDM_ENABLEALL,
|
||||
IDM_SUBMITCMD = 300,
|
||||
};
|
||||
|
||||
|
@ -31,6 +31,7 @@ BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||
EVT_BUTTON(IDM_SUBMITCMD, CLogWindow::OnSubmit)
|
||||
EVT_BUTTON(IDM_UPDATELOG, CLogWindow::OnUpdateLog)
|
||||
EVT_BUTTON(IDM_CLEARLOG, CLogWindow::OnClear)
|
||||
EVT_BUTTON(IDM_ENABLEALL, CLogWindow::OnEnableAll)
|
||||
EVT_CHECKLISTBOX(IDM_LOGCHECKS, CLogWindow::OnLogCheck)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@ -50,6 +51,7 @@ CLogWindow::CLogWindow(wxWindow* parent)
|
||||
|
||||
sizerTop->Add(new wxButton(this, IDM_UPDATELOG, _T("Update")));
|
||||
sizerTop->Add(new wxButton(this, IDM_CLEARLOG, _T("Clear")));
|
||||
sizerTop->Add(new wxButton(this, IDM_ENABLEALL, _T("Enable all")));
|
||||
m_checks = new wxCheckListBox(this, IDM_LOGCHECKS, wxDefaultPosition, wxSize(120, 280));
|
||||
sizerBottom->Add(m_cmdline, 8, wxGROW | wxRIGHT, 5);
|
||||
sizerBottom->Add(btn, 1, wxGROW, 0);
|
||||
@ -106,6 +108,22 @@ void CLogWindow::OnClear(wxCommandEvent& event)
|
||||
NotifyUpdate();
|
||||
}
|
||||
|
||||
void CLogWindow::OnEnableAll(wxCommandEvent& event)
|
||||
{
|
||||
static bool enable = true;
|
||||
IniFile ini;
|
||||
ini.Load("Dolphin.ini");
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
|
||||
{
|
||||
m_checks->Check(i, enable);
|
||||
LogManager::m_Log[i]->m_bEnable = enable;
|
||||
LogManager::m_Log[i]->m_bShowInLog = enable;
|
||||
ini.Set("LogManager", LogManager::m_Log[i]->m_szShortName, enable);
|
||||
}
|
||||
ini.Save("Dolphin.ini");
|
||||
enable = !enable;
|
||||
}
|
||||
|
||||
|
||||
void CLogWindow::OnLogCheck(wxCommandEvent& event)
|
||||
{
|
||||
|
@ -46,6 +46,7 @@ class CLogWindow
|
||||
void OnUpdateLog(wxCommandEvent& event);
|
||||
void OnLogCheck(wxCommandEvent& event);
|
||||
void OnClear(wxCommandEvent& event);
|
||||
void OnEnableAll(wxCommandEvent& event);
|
||||
|
||||
void UpdateChecks();
|
||||
void UpdateLog();
|
||||
|
Loading…
Reference in New Issue
Block a user