summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/src
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-25 21:02:56 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-25 21:02:56 +0000
commit84336bd7b6eb51f972298959fb03a9512dc626df (patch)
treebc103b1a8857a9c5e644bd33b1d19f73e48833a0 /Source/Core/DebuggerWX/src
parentab4333ebacbc8375b4284be6da16dbc9b6381021 (diff)
little Logwindow feature - enable/disable all logs
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@314 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/src')
-rw-r--r--Source/Core/DebuggerWX/src/Debugger.h1
-rw-r--r--Source/Core/DebuggerWX/src/LogWindow.cpp18
-rw-r--r--Source/Core/DebuggerWX/src/LogWindow.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/Source/Core/DebuggerWX/src/Debugger.h b/Source/Core/DebuggerWX/src/Debugger.h
index 67df2cf93e..693050d490 100644
--- a/Source/Core/DebuggerWX/src/Debugger.h
+++ b/Source/Core/DebuggerWX/src/Debugger.h
@@ -24,6 +24,7 @@ enum
IDM_UPDATELOG,
IDM_CLEARLOG,
IDM_LOGCHECKS,
+ IDM_ENABLEALL,
IDM_SUBMITCMD = 300,
};
diff --git a/Source/Core/DebuggerWX/src/LogWindow.cpp b/Source/Core/DebuggerWX/src/LogWindow.cpp
index 05003d4f49..de74d0a8e3 100644
--- a/Source/Core/DebuggerWX/src/LogWindow.cpp
+++ b/Source/Core/DebuggerWX/src/LogWindow.cpp
@@ -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)
{
diff --git a/Source/Core/DebuggerWX/src/LogWindow.h b/Source/Core/DebuggerWX/src/LogWindow.h
index 1fb5060db1..9e43624365 100644
--- a/Source/Core/DebuggerWX/src/LogWindow.h
+++ b/Source/Core/DebuggerWX/src/LogWindow.h
@@ -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();