GUI : Added possibility to move the logwindow around in non-debugger mode, fix toolbar size issue, fix changing themes (again...) and added abort button to extract all as well as misc changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4281 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2009-09-15 21:35:32 +00:00
parent 3117bde5fb
commit c71f76834e
14 changed files with 106 additions and 190 deletions

View File

@ -56,25 +56,6 @@ CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent
// Create the toolbar // Create the toolbar
RecreateToolbar(); RecreateToolbar();
} }
CBreakPointWindow::~CBreakPointWindow()
{}
void CBreakPointWindow::Save(IniFile& _IniFile) const
{
_IniFile.Set("BreakPoint", "x", GetPosition().x);
_IniFile.Set("BreakPoint", "y", GetPosition().y);
_IniFile.Set("BreakPoint", "w", GetSize().GetWidth());
_IniFile.Set("BreakPoint", "h", GetSize().GetHeight());
}
void CBreakPointWindow::Load(IniFile& _IniFile)
{
int x,y,w,h;
_IniFile.Get("BreakPoint", "x", &x, GetPosition().x);
_IniFile.Get("BreakPoint", "y", &y, GetPosition().y);
_IniFile.Get("BreakPoint", "w", &w, GetSize().GetWidth());
_IniFile.Get("BreakPoint", "h", &h, GetSize().GetHeight());
SetSize(x, y, w, h);
}
void CBreakPointWindow::CreateGUIControls() void CBreakPointWindow::CreateGUIControls()
{ {

View File

@ -36,13 +36,7 @@ class CBreakPointWindow
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 250),
long style = wxNO_BORDER); long style = wxNO_BORDER);
virtual ~CBreakPointWindow();
void NotifyUpdate(); void NotifyUpdate();
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);
private: private:

View File

@ -489,9 +489,6 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK); jitsroff = pCoreMenu->Append(IDM_JITSROFF, _T("&JIT SystemRegisters off"), wxEmptyString, wxITEM_CHECK);
#endif #endif
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
pMenuBar->Append(pCoreMenu, _T("&JIT")); pMenuBar->Append(pCoreMenu, _T("&JIT"));
CreateMenuSymbols(); CreateMenuSymbols();

View File

@ -162,32 +162,21 @@ void CCodeWindow::Save()
ini.Set(_Section.c_str(), "Sound", iSoundWindow); ini.Set(_Section.c_str(), "Sound", iSoundWindow);
ini.Set(_Section.c_str(), "Video", iVideoWindow); ini.Set(_Section.c_str(), "Video", iVideoWindow);
// Save floating setting // Save floating setting
ini.Set("Float", "Log", (bool)FindWindowById(IDM_LOGWINDOW_PARENT)); ini.Set("Float", "Log", !!FindWindowById(IDM_LOGWINDOW_PARENT));
ini.Set("Float", "Console", (bool)FindWindowById(IDM_CONSOLEWINDOW_PARENT)); ini.Set("Float", "Console", !!FindWindowById(IDM_CONSOLEWINDOW_PARENT));
ini.Set("Float", "Code", (bool)FindWindowById(IDM_CODEWINDOW_PARENT)); ini.Set("Float", "Code", !!FindWindowById(IDM_CODEWINDOW_PARENT));
ini.Set("Float", "Registers", (bool)FindWindowById(IDM_REGISTERWINDOW_PARENT)); ini.Set("Float", "Registers", !!FindWindowById(IDM_REGISTERWINDOW_PARENT));
ini.Set("Float", "Breakpoints", (bool)FindWindowById(IDM_BREAKPOINTWINDOW_PARENT)); ini.Set("Float", "Breakpoints", !!FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
ini.Set("Float", "Memory", (bool)FindWindowById(IDM_MEMORYWINDOW_PARENT)); ini.Set("Float", "Memory", !!FindWindowById(IDM_MEMORYWINDOW_PARENT));
ini.Set("Float", "JIT", (bool)FindWindowById(IDM_JITWINDOW_PARENT)); ini.Set("Float", "JIT", !!FindWindowById(IDM_JITWINDOW_PARENT));
ini.Set("Float", "Sound", (bool)FindWindowById(IDM_SOUNDWINDOW_PARENT)); ini.Set("Float", "Sound", !!FindWindowById(IDM_SOUNDWINDOW_PARENT));
ini.Set("Float", "Video", (bool)FindWindowById(IDM_VIDEOWINDOW_PARENT)); ini.Set("Float", "Video", !!FindWindowById(IDM_VIDEOWINDOW_PARENT));
// Save window settings // Save window settings
/* ini.Set("MainWindow", "x", Parent->GetPosition().x);
ini.Set("CodeWindow", "x", GetPosition().x); ini.Set("MainWindow", "y", Parent->GetPosition().y);
ini.Set("CodeWindow", "y", GetPosition().y); ini.Set("MainWindow", "w", Parent->GetSize().GetWidth());
ini.Set("CodeWindow", "w", GetSize().GetWidth()); ini.Set("MainWindow", "h", Parent->GetSize().GetHeight());
ini.Set("CodeWindow", "h", GetSize().GetHeight());
ini.Set("MainWindow", "x", GetParent()->GetPosition().x);
ini.Set("MainWindow", "y", GetParent()->GetPosition().y);
ini.Set("MainWindow", "w", GetParent()->GetSize().GetWidth());
ini.Set("MainWindow", "h", GetParent()->GetSize().GetHeight());
if (m_BreakpointWindow) m_BreakpointWindow->Save(file);
if (m_RegisterWindow) m_RegisterWindow->Save(file);
if (m_MemoryWindow) m_MemoryWindow->Save(file);
if (m_JitWindow) m_JitWindow->Save(file);
*/
ini.Save(DEBUGGER_CONFIG_FILE); ini.Save(DEBUGGER_CONFIG_FILE);
} }

View File

@ -104,25 +104,6 @@ CJitWindow::~CJitWindow()
} }
void CJitWindow::Save(IniFile& _IniFile) const
{
_IniFile.Set("JitWindow", "x", GetPosition().x);
_IniFile.Set("JitWindow", "y", GetPosition().y);
_IniFile.Set("JitWindow", "w", GetSize().GetWidth());
_IniFile.Set("JitWindow", "h", GetSize().GetHeight());
}
void CJitWindow::Load(IniFile& _IniFile)
{
int x,y,w,h;
_IniFile.Get("JitWindow", "x", &x, GetPosition().x);
_IniFile.Get("JitWindow", "y", &y, GetPosition().y);
_IniFile.Get("JitWindow", "w", &w, GetSize().GetWidth());
_IniFile.Get("JitWindow", "h", &h, GetSize().GetHeight());
SetSize(x, y, w, h);
}
void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) { void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) {
block_list->Update(); block_list->Update();
} }

View File

@ -52,9 +52,6 @@ public:
long style = wxNO_BORDER); long style = wxNO_BORDER);
~CJitWindow(); ~CJitWindow();
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);
static void ViewAddr(u32 em_address); static void ViewAddr(u32 em_address);
void Update(); void Update();

View File

@ -38,23 +38,6 @@ CRegisterWindow::~CRegisterWindow()
{ {
} }
void CRegisterWindow::Save(IniFile& _IniFile) const
{
_IniFile.Set("RegisterWindow", "x", GetPosition().x);
_IniFile.Set("RegisterWindow", "y", GetPosition().y);
_IniFile.Set("RegisterWindow", "w", GetSize().GetWidth());
_IniFile.Set("RegisterWindow", "h", GetSize().GetHeight());
}
void CRegisterWindow::Load(IniFile& _IniFile)
{
int x,y,w,h;
_IniFile.Get("RegisterWindow", "x", &x, GetPosition().x);
_IniFile.Get("RegisterWindow", "y", &y, GetPosition().y);
_IniFile.Get("RegisterWindow", "w", &w, GetSize().GetWidth());
_IniFile.Get("RegisterWindow", "h", &h, GetSize().GetHeight());
SetSize(x, y, w, h);
}
void CRegisterWindow::CreateGUIControls() void CRegisterWindow::CreateGUIControls()
{ {

View File

@ -35,9 +35,6 @@ public:
virtual ~CRegisterWindow(); virtual ~CRegisterWindow();
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);
void NotifyUpdate(); void NotifyUpdate();

View File

@ -411,7 +411,7 @@ CFrame::CFrame(wxFrame* parent,
else else
{ {
m_Mgr->AddPane(m_Panel, wxAuiPaneInfo().Name(wxT("Pane 0")).Caption(wxT("Pane 0")).Hide()); m_Mgr->AddPane(m_Panel, wxAuiPaneInfo().Name(wxT("Pane 0")).Caption(wxT("Pane 0")).Hide());
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Name(wxT("Pane 1")).Caption(wxT("Pane 1")).Hide()); m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Name(wxT("Pane 1")).Caption(wxT("Logging")).Hide());
} }
// Setup perspectives // Setup perspectives
@ -423,7 +423,13 @@ CFrame::CFrame(wxFrame* parent,
} }
else else
{ {
IniFile ini; int pos;
ini.Load(LOGGER_CONFIG_FILE);
ini.Get("LogWindow", "pos", &pos, 2);
m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center(); m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center();
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(true).Layer(0)
.FloatingSize(wxSize(600, 350)).CloseButton(false).Direction(pos);
AuiFullscreen = m_Mgr->SavePerspective(); AuiFullscreen = m_Mgr->SavePerspective();
} }
@ -442,21 +448,14 @@ CFrame::CFrame(wxFrame* parent,
DoLoadPerspective(); DoLoadPerspective();
} }
else else
{
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(false).Layer(0).Right();
}
// Show window
Show();
if (!g_pCodeWindow)
{ {
SetSimplePaneSize(); SetSimplePaneSize();
if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true); if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true);
if (SConfig::GetInstance().m_InterfaceConsole) DoToggleWindow(IDM_CONSOLEWINDOW, true); if (SConfig::GetInstance().m_InterfaceConsole) DoToggleWindow(IDM_CONSOLEWINDOW, true);
} }
//sizerPanel->SetSizeHints(m_Panel); // Show window
Show();
// Commit // Commit
m_Mgr->Update(); m_Mgr->Update();
@ -829,11 +828,9 @@ void CFrame::Update()
double TmpSeconds = Common::Timer::GetDoubleTime(); // Get timestamp double TmpSeconds = Common::Timer::GetDoubleTime(); // Get timestamp
double CompareTime = TmpSeconds - HideDelay; // Compare it double CompareTime = TmpSeconds - HideDelay; // Compare it
if(m_iLastMotionTime < CompareTime) // Update cursor
#ifdef _WIN32 #ifdef _WIN32
MSWSetCursor(false); if(m_iLastMotionTime < CompareTime) // Update cursor
#else MSWSetCursor(false);
{}
#endif #endif
} }
} }

View File

@ -92,13 +92,13 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
m_Mgr->Update(); m_Mgr->Update();
} }
// Enable and disable the log window // Enable and disable the log window
void CFrame::OnToggleLogWindow(wxCommandEvent& event) void CFrame::OnToggleLogWindow(wxCommandEvent& event)
{ {
SConfig::GetInstance().m_InterfaceLogWindow = event.IsChecked(); SConfig::GetInstance().m_InterfaceLogWindow = event.IsChecked();
DoToggleWindow(event.GetId(), event.IsChecked()); DoToggleWindow(event.GetId(), event.IsChecked());
} }
void CFrame::ToggleLogWindow(bool bShow, int i) void CFrame::ToggleLogWindow(bool bShow, int i)
{ {
if (bShow) if (bShow)
@ -113,16 +113,15 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
// Hide pane // Hide pane
if (!g_pCodeWindow) HidePane(); if (!g_pCodeWindow) HidePane();
// Make sure the check is updated (if wxw isn't calling this func)
//GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(Show);
} }
// Enable and disable the console // Enable and disable the console
void CFrame::OnToggleConsole(wxCommandEvent& event) void CFrame::OnToggleConsole(wxCommandEvent& event)
{ {
SConfig::GetInstance().m_InterfaceConsole = event.IsChecked(); SConfig::GetInstance().m_InterfaceConsole = event.IsChecked();
DoToggleWindow(event.GetId(), event.IsChecked()); DoToggleWindow(event.GetId(), event.IsChecked());
} }
void CFrame::ToggleConsole(bool bShow, int i) void CFrame::ToggleConsole(bool bShow, int i)
{ {
#ifdef _WIN32 #ifdef _WIN32
@ -167,13 +166,8 @@ void CFrame::ToggleConsole(bool bShow, int i)
// Hide pane // Hide pane
if (!g_pCodeWindow) HidePane(); if (!g_pCodeWindow) HidePane();
// Make sure the check is updated (if wxw isn't calling this func)
//GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(Show);
#endif #endif
} }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Notebooks // Notebooks
@ -332,10 +326,6 @@ void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
event.Skip(); event.Skip();
event.Allow(); event.Allow();
ResizeConsole(); ResizeConsole();
// wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
// If we drag away the last one the tab bar goes away and we can't add any panes to it
//if (Ctrl->GetPageCount() == 1) Ctrl->AddPage(CreateEmptyPanel(), wxT("<>"), true);
} }
void CFrame::HidePane() void CFrame::HidePane()
{ {
@ -353,6 +343,7 @@ void CFrame::HidePane()
m_Mgr->GetPane(wxT("Pane 1")).Show(); m_Mgr->GetPane(wxT("Pane 1")).Show();
m_Mgr->Update(); m_Mgr->Update();
} }
SetSimplePaneSize(); SetSimplePaneSize();
} }
@ -795,27 +786,24 @@ void CFrame::ResizeConsole()
void CFrame::SetSimplePaneSize() void CFrame::SetSimplePaneSize()
{ {
wxArrayInt Pane, Size; int x = 0, y = 0;
Pane.Add(0); Size.Add(50);
Pane.Add(1); Size.Add(50);
int iClientSize = this->GetSize().GetX(); // Produce pixel width from percentage width
// Fix the pane sizes int Size = PercentageToPixels(50, this->GetSize().GetX());
for (u32 i = 0; i < Pane.size(); i++)
{ IniFile ini;
// Check limits ini.Load(LOGGER_CONFIG_FILE);
Size[i] = Limit(Size[i], 5, 95); ini.Get("LogWindow", "x", &x, Size);
// Produce pixel width from percentage width ini.Get("LogWindow", "y", &y, Size);
Size[i] = PercentageToPixels(Size[i], iClientSize);
// Update size // Update size
m_Mgr->GetPane(wxString::Format(wxT("Pane %i"), Pane[i])).BestSize(Size[i], -1).MinSize(Size[i], -1).MaxSize(Size[i], -1); m_Mgr->GetPane(wxT("Pane 0")).BestSize(x, y).MinSize(x, y).MaxSize(x, y);
} m_Mgr->GetPane(wxT("Pane 1")).BestSize(x, y).MinSize(x, y).MaxSize(x, y);
m_Mgr->Update(); m_Mgr->Update();
for (u32 i = 0; i < Pane.size(); i++)
{ // Set the position of the Pane
// Remove the size limits m_Mgr->GetPane(wxT("Pane 1")).MinSize(-1, -1).MaxSize(-1, -1);
m_Mgr->GetPane(wxString::Format(wxT("Pane %i"), Pane[i])).MinSize(-1, -1).MaxSize(-1, -1); m_Mgr->GetPane(wxT("Pane 0")).MinSize(-1, -1).MaxSize(-1, -1);
}
} }
void CFrame::SetPaneSize() void CFrame::SetPaneSize()
@ -942,7 +930,6 @@ void CFrame::SaveLocal()
ini.Get("Perspectives", "Active", &ActivePerspective, 5); ini.Get("Perspectives", "Active", &ActivePerspective, 5);
SplitString(_Perspectives, ",", VPerspectives); SplitString(_Perspectives, ",", VPerspectives);
//
for (u32 i = 0; i < VPerspectives.size(); i++) for (u32 i = 0; i < VPerspectives.size(); i++)
{ {
SPerspectives Tmp; SPerspectives Tmp;

View File

@ -118,9 +118,8 @@ void CFrame::CreateMenu()
fileMenu->Append(wxID_REFRESH, _T("&Refresh List")); fileMenu->Append(wxID_REFRESH, _T("&Refresh List"));
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _T("&Browse for ISOs...")); fileMenu->Append(IDM_BROWSE, _T("&Browse for ISOs..."));
// fileMenu->AppendSeparator();
// fileMenu->Append(IDM_RESTART, g_pCodeWindow ? _T("Restart in regular mode") : _T("Restart in debugging mode"));
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
// fileMenu->Append(IDM_RESTART, g_pCodeWindow ? _T("Restart in regular &mode") : _T("&Restart in debugging &mode"));
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt+F4")); fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt+F4"));
m_MenuBar->Append(fileMenu, _T("&File")); m_MenuBar->Append(fileMenu, _T("&File"));
@ -216,18 +215,24 @@ void CFrame::CreateMenu()
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
} }
viewMenu->AppendCheckItem(IDM_LISTWII, _T("Show Wii")); wxMenu *platformMenu = new wxMenu;
viewMenu->Check(IDM_LISTWII, SConfig::GetInstance().m_ListWii); viewMenu->AppendSubMenu(platformMenu, _T("Show Platforms"));
viewMenu->AppendCheckItem(IDM_LISTGC, _T("Show GameCube")); platformMenu->AppendCheckItem(IDM_LISTWII, _T("Show Wii"));
viewMenu->Check(IDM_LISTGC, SConfig::GetInstance().m_ListGC); platformMenu->Check(IDM_LISTWII, SConfig::GetInstance().m_ListWii);
viewMenu->AppendCheckItem(IDM_LISTWAD, _T("Show Wad")); platformMenu->AppendCheckItem(IDM_LISTGC, _T("Show GameCube"));
viewMenu->Check(IDM_LISTWAD, SConfig::GetInstance().m_ListWad); platformMenu->Check(IDM_LISTGC, SConfig::GetInstance().m_ListGC);
viewMenu->AppendCheckItem(IDM_LISTJAP, _T("Show JAP")); platformMenu->AppendCheckItem(IDM_LISTWAD, _T("Show Wad"));
viewMenu->Check(IDM_LISTJAP, SConfig::GetInstance().m_ListJap); platformMenu->Check(IDM_LISTWAD, SConfig::GetInstance().m_ListWad);
viewMenu->AppendCheckItem(IDM_LISTPAL, _T("Show PAL"));
viewMenu->Check(IDM_LISTPAL, SConfig::GetInstance().m_ListPal); wxMenu *regionMenu = new wxMenu;
viewMenu->AppendCheckItem(IDM_LISTUSA, _T("Show USA")); viewMenu->AppendSubMenu(regionMenu, _T("Show Regions"));
viewMenu->Check(IDM_LISTUSA, SConfig::GetInstance().m_ListUsa); regionMenu->AppendCheckItem(IDM_LISTJAP, _T("Show JAP"));
regionMenu->Check(IDM_LISTJAP, SConfig::GetInstance().m_ListJap);
regionMenu->AppendCheckItem(IDM_LISTPAL, _T("Show PAL"));
regionMenu->Check(IDM_LISTPAL, SConfig::GetInstance().m_ListPal);
regionMenu->AppendCheckItem(IDM_LISTUSA, _T("Show USA"));
regionMenu->Check(IDM_LISTUSA, SConfig::GetInstance().m_ListUsa);
viewMenu->AppendCheckItem(IDM_LISTDRIVES, _T("Show Drives")); viewMenu->AppendCheckItem(IDM_LISTDRIVES, _T("Show Drives"));
viewMenu->Check(IDM_LISTDRIVES, SConfig::GetInstance().m_ListDrives); viewMenu->Check(IDM_LISTDRIVES, SConfig::GetInstance().m_ListDrives);
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
@ -276,8 +281,7 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _T("DSP"), m_Bitmaps[Toolbar_PluginDSP], _T("DSP settings")); ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _T("DSP"), m_Bitmaps[Toolbar_PluginDSP], _T("DSP settings"));
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _T("Pad"), m_Bitmaps[Toolbar_PluginPAD], _T("Pad settings")); ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _T("Pad"), m_Bitmaps[Toolbar_PluginPAD], _T("Pad settings"));
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _T("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _T("Wiimote settings")); ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _T("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _T("Wiimote settings"));
// FIXME: UGLY HACK!!! why doesn't get the right size without this line?!?!?
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _T("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _T("Wiimote settings"));
// after adding the buttons to the toolbar, must call Realize() to reflect // after adding the buttons to the toolbar, must call Realize() to reflect
// the changes // the changes
ToolBar->Realize(); ToolBar->Realize();
@ -301,6 +305,12 @@ void CFrame::PopulateToolbarAui(wxAuiToolBar* ToolBar)
// Delete and recreate the toolbar // Delete and recreate the toolbar
void CFrame::RecreateToolbar() void CFrame::RecreateToolbar()
{ {
if (m_ToolBar)
{
m_Mgr->DetachPane(m_ToolBar);
m_ToolBar->Destroy();
}
m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE); m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
PopulateToolbar(m_ToolBar); PopulateToolbar(m_ToolBar);
@ -309,7 +319,7 @@ void CFrame::RecreateToolbar()
ToolbarPane().Top(). ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false)); LeftDockable(false).RightDockable(false).Floatable(false));
if (g_pCodeWindow) if (g_pCodeWindow && !m_ToolBarDebug)
{ {
m_ToolBarDebug = new wxAuiToolBar(this, ID_TOOLBAR_DEBUG, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE); m_ToolBarDebug = new wxAuiToolBar(this, ID_TOOLBAR_DEBUG, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
g_pCodeWindow->PopulateToolbar(m_ToolBarDebug); g_pCodeWindow->PopulateToolbar(m_ToolBarDebug);
@ -326,6 +336,8 @@ void CFrame::RecreateToolbar()
ToolbarPane().Top(). ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false)); LeftDockable(false).RightDockable(false).Floatable(false));
} }
UpdateGUI();
} }
void CFrame::InitBitmaps() void CFrame::InitBitmaps()
@ -425,7 +437,7 @@ void CFrame::InitBitmaps()
} }
// Update in case the bitmap has been updated // Update in case the bitmap has been updated
//if (GetToolBar() != NULL) RecreateToolbar(); if (m_ToolBar != NULL) RecreateToolbar();
aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
} }
@ -865,10 +877,9 @@ void CFrame::UpdateGUI()
bool Paused = Core::GetState() == Core::CORE_PAUSE; bool Paused = Core::GetState() == Core::CORE_PAUSE;
// Make sure that we have a toolbar // Make sure that we have a toolbar
if (m_ToolBar != NULL) if (m_ToolBar)
{ {
// Enable/disable the Config and Stop buttons // Enable/disable the Config and Stop buttons
//GetToolBar()->EnableTool(IDM_CONFIG_MAIN, !initialized);
m_ToolBar->EnableTool(wxID_OPEN, !Initialized); m_ToolBar->EnableTool(wxID_OPEN, !Initialized);
m_ToolBar->EnableTool(wxID_REFRESH, !Initialized); // Don't allow refresh when we don't show the list m_ToolBar->EnableTool(wxID_REFRESH, !Initialized); // Don't allow refresh when we don't show the list
m_ToolBar->EnableTool(IDM_STOP, Running || Paused); m_ToolBar->EnableTool(IDM_STOP, Running || Paused);
@ -890,9 +901,6 @@ void CFrame::UpdateGUI()
m_pSubMenuLoad->Enable(Initialized); m_pSubMenuLoad->Enable(Initialized);
m_pSubMenuSave->Enable(Initialized); m_pSubMenuSave->Enable(Initialized);
// Let's enable it by default.
//m_pSubMenuFrameSkipping->Enable(initialized);
// Misc // Misc
GetMenuBar()->FindItem(IDM_CHANGEDISC)->Enable(Initialized); GetMenuBar()->FindItem(IDM_CHANGEDISC)->Enable(Initialized);
if (DiscIO::CNANDContentManager::Access().GetNANDLoader(FULL_WII_MENU_DIR).IsValid()) if (DiscIO::CNANDContentManager::Access().GetNANDLoader(FULL_WII_MENU_DIR).IsValid())
@ -900,7 +908,7 @@ void CFrame::UpdateGUI()
if (Running) if (Running)
{ {
if (m_ToolBar != NULL) if (m_ToolBar)
{ {
m_ToolBar->SetToolBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Pause]); m_ToolBar->SetToolBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Pause]);
m_ToolBar->SetToolShortHelp(IDM_PLAY, _("Pause")); m_ToolBar->SetToolShortHelp(IDM_PLAY, _("Pause"));
@ -910,7 +918,7 @@ void CFrame::UpdateGUI()
} }
else else
{ {
if (m_ToolBar != NULL) if (m_ToolBar)
{ {
m_ToolBar->SetToolBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Play]); m_ToolBar->SetToolBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Play]);
m_ToolBar->SetToolShortHelp(IDM_PLAY, _("Play")); m_ToolBar->SetToolShortHelp(IDM_PLAY, _("Play"));
@ -945,10 +953,11 @@ void CFrame::UpdateGUI()
} }
} }
// Commit changes to toolbar
if (m_ToolBar != NULL) m_ToolBar->Realize();
if (g_pCodeWindow) g_pCodeWindow->Update(); if (g_pCodeWindow) g_pCodeWindow->Update();
// Commit changes to manager // Commit changes to manager
if (m_ToolBar)
m_ToolBar->Refresh();
m_Mgr->Update(); m_Mgr->Update();
} }

View File

@ -657,12 +657,13 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
DEBUG_LOG(DISCIO,"Dir found from %u to %u\nextracting to:\n%s",index[0],index[1],_rExportFolder); DEBUG_LOG(DISCIO,"Dir found from %u to %u\nextracting to:\n%s",index[0],index[1],_rExportFolder);
} }
wxProgressDialog dialog(index[0] ? _T("Extracting Directory") : _T("Extracting All Files"), wxString dialogTitle = index[0] ? _T("Extracting Directory") : _T("Extracting All Files");
wxProgressDialog dialog(dialogTitle,
_T("Extracting..."), _T("Extracting..."),
index[1], // range index[1], // range
this, // parent this, // parent
wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_ELAPSED_TIME | wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT |
wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME |
wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
); );
dialog.CenterOnParent(); dialog.CenterOnParent();
@ -670,6 +671,8 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
// Extraction // Extraction
for (u32 i = index[0]; i < index[1]; i++) for (u32 i = index[0]; i < index[1]; i++)
{ {
dialog.SetTitle(wxString::Format(_T("%s : %d%%"), dialogTitle,
(u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100)));
if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), wxString::FromAscii(fst[i]->m_FullPath)))) if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), wxString::FromAscii(fst[i]->m_FullPath))))
break; break;

View File

@ -161,10 +161,9 @@ void CLogWindow::OnClose(wxCloseEvent& event)
void CLogWindow::SaveSettings() void CLogWindow::SaveSettings()
{ {
IniFile ini; IniFile ini;
ini.Set("LogWindow", "x", GetPosition().x); ini.Set("LogWindow", "x", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth());
ini.Set("LogWindow", "y", GetPosition().y); ini.Set("LogWindow", "y", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight());
ini.Set("LogWindow", "w", GetSize().GetWidth()); ini.Set("LogWindow", "pos", Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction);
ini.Set("LogWindow", "h", GetSize().GetHeight());
ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1); ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1);
ini.Set("Options", "Font", m_FontChoice->GetSelection()); ini.Set("Options", "Font", m_FontChoice->GetSelection());
ini.Set("Options", "WriteToFile", m_writeFile); ini.Set("Options", "WriteToFile", m_writeFile);
@ -179,12 +178,7 @@ void CLogWindow::LoadSettings()
{ {
IniFile ini; IniFile ini;
ini.Load(LOGGER_CONFIG_FILE); ini.Load(LOGGER_CONFIG_FILE);
int x,y,w,h,verbosity,font; int verbosity,font;
ini.Get("LogWindow", "x", &x, GetPosition().x);
ini.Get("LogWindow", "y", &y, GetPosition().y);
ini.Get("LogWindow", "w", &w, GetSize().GetWidth());
ini.Get("LogWindow", "h", &h, GetSize().GetHeight());
SetSize(x, y, w, h);
ini.Get("Options", "Verbosity", &verbosity, 0); ini.Get("Options", "Verbosity", &verbosity, 0);
if (verbosity < 1) verbosity = 1; if (verbosity < 1) verbosity = 1;
if (verbosity > MAX_LOGLEVEL) verbosity = MAX_LOGLEVEL; if (verbosity > MAX_LOGLEVEL) verbosity = MAX_LOGLEVEL;

View File

@ -338,20 +338,27 @@ bool DolphinApp::OnInit()
#ifdef _DEBUG #ifdef _DEBUG
const char *title = "Dolphin Debug SVN R " SVN_REV_STR; const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
#else #else
const char *title = "Dolphin SVN R " SVN_REV_STR; #ifdef DEBUGFAST
const char *title = "Dolphin Debugfast SVN R " SVN_REV_STR;
#else
const char *title = "Dolphin SVN R " SVN_REV_STR;
#endif
#endif #endif
// If we are debugging let use save the main window position and size
IniFile ini;
ini.Load(DEBUGGER_CONFIG_FILE);
int x, y, w, h;
ini.Get("MainWindow", "x", &x, 100);
ini.Get("MainWindow", "y", &y, 100);
ini.Get("MainWindow", "w", &w, 800);
ini.Get("MainWindow", "h", &h, 600);
if (UseDebugger) if (UseDebugger)
{ {
// If we are debugging let user save the main window position and size
IniFile ini;
ini.Load(DEBUGGER_CONFIG_FILE);
int x, y, w, h;
ini.Get("MainWindow", "x", &x, 100);
ini.Get("MainWindow", "y", &y, 100);
ini.Get("MainWindow", "w", &w, 800);
ini.Get("MainWindow", "h", &h, 600);
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title), main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
wxPoint(x, y), wxSize(w, h), true, UseLogger); wxPoint(x, y), wxSize(w, h), true, UseLogger);
} }