Did some clean up of the GUI main. Also, parse command line options first, then set up directories (linux and apple), then load the log manager, sconfig, etc. Removes the need for my silly log manager and sysconf reload.

Changed the default font for the log window to the local font (why was a Japanese font the default?).  Also fixed an issue that prevented the log windows settings from being saved properly.  Lots more needs to be done with the AUI manager.  That stuff doesn't work.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5213 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-03-18 14:34:37 +00:00
parent 14bb53dcc6
commit f885eb2de0
8 changed files with 256 additions and 263 deletions
-4
View File
@@ -192,10 +192,6 @@ FileLogListener::FileLogListener(const char *filename) {
setEnable(true);
}
void FileLogListener::Reload() {
m_logfile = fopen(m_filename, "a+");
}
FileLogListener::~FileLogListener() {
free(m_filename);
if (m_logfile)
-2
View File
@@ -42,8 +42,6 @@ public:
FileLogListener(const char *filename);
~FileLogListener();
void Reload();
void Log(LogTypes::LOG_LEVELS, const char *msg);
bool isValid() {
-8
View File
@@ -25,14 +25,6 @@ SysConf::SysConf()
m_IsValid = true;
}
void SysConf::Reload()
{
if (m_IsValid)
return;
if (LoadFromFile(File::GetUserPath(F_WIISYSCONF_IDX)))
m_IsValid = true;
}
SysConf::~SysConf()
{
if (!m_IsValid)
-2
View File
@@ -71,8 +71,6 @@ public:
bool IsValid() { return m_IsValid; }
void Reload();
template<class T>
T GetData(const char* sectionName)
{
+5 -4
View File
@@ -105,7 +105,7 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
}
else
{
DoRemovePage(m_LogWindow);
DoRemovePage(m_LogWindow, bShow);
}
// Hide or Show the pane
@@ -402,9 +402,10 @@ void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
if (GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND)
{
GetNotebookFromId(i)->RemovePage(GetNotebookFromId(i)->GetPageIndex(Win));
// Reparent to avoid destruction if the notebook is closed and destroyed
if (!Win->IsBeingDeleted()) Win->Reparent(this);
if (_Hide) Win->Hide();
if (_Hide)
Win->Hide();
else
Win->Close();
}
}
}
+3 -4
View File
@@ -53,7 +53,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wx
, Parent(parent) , m_LogAccess(true)
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
, m_LogSection(1)
, m_SJISConv(wxFONTENCODING_SHIFT_JIS)
, m_CSConv(wxConvLocal)
{
m_LogManager = LogManager::GetInstance();
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
@@ -156,12 +156,11 @@ CLogWindow::~CLogWindow()
}
m_LogTimer->Stop();
delete m_LogTimer;
SaveSettings();
}
void CLogWindow::OnClose(wxCloseEvent& event)
{
SaveSettings();
wxGetApp().GetCFrame()->ToggleLogWindow(false);
event.Skip();
}
@@ -530,6 +529,6 @@ void CLogWindow::Log(LogTypes::LOG_LEVELS level, const char *text)
m_LogSection.Enter();
if (msgQueue.size() >= 100)
msgQueue.pop();
msgQueue.push(std::pair<u8, wxString>((u8)level, wxString(text, m_SJISConv)));
msgQueue.push(std::pair<u8, wxString>((u8)level, wxString(text, m_CSConv)));
m_LogSection.Leave();
}
+1 -1
View File
@@ -86,7 +86,7 @@ private:
Common::CriticalSection m_LogSection;
wxCSConv m_SJISConv;
wxCSConv m_CSConv;
DECLARE_EVENT_TABLE()
File diff suppressed because it is too large Load Diff