From 83a7c837617d0a8c067f19b096e4aef0d66faea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandro=20S=C3=A1nchez=20Bach?= Date: Wed, 19 Feb 2014 05:33:31 +0100 Subject: [PATCH] Moved some lines and deleted old code * Removed Compiler ELF references from rpcs3.cpp * Reordered the menu bar lines. * Moved the construction of some panels of MainFrame from rpcs3.cpp to MainFrame.cpp --- rpcs3/Gui/MainFrame.cpp | 26 +++++++++++++++----------- rpcs3/Gui/MainFrame.h | 6 +++++- rpcs3/rpcs3.cpp | 9 --------- rpcs3/rpcs3.h | 2 -- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 16d9e2ff00..916f960731 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -5,7 +5,6 @@ #include "RSXDebugger.h" #include "git-version.h" -#include "Emu/System.h" #include "Ini.h" #include "Emu/GS/sysutil_video.h" #include "Gui/VHDDManager.h" @@ -81,45 +80,50 @@ MainFrame::MainFrame() wxMenuBar& menubar(*new wxMenuBar()); wxMenu& menu_boot(*new wxMenu()); - wxMenu& menu_sys(*new wxMenu()); - wxMenu& menu_conf(*new wxMenu()); - wxMenu& menu_tools(*new wxMenu()); - wxMenu& menu_help(*new wxMenu()); - menubar.Append(&menu_boot, "Boot"); - menubar.Append(&menu_sys, "System"); - menubar.Append(&menu_conf, "Config"); - menubar.Append(&menu_tools, "Tools"); - menubar.Append(&menu_help, "Help"); - menu_boot.Append(id_boot_game, "Boot game"); menu_boot.Append(id_install_pkg, "Install PKG"); menu_boot.AppendSeparator(); menu_boot.Append(id_boot_elf, "Boot (S)ELF"); + wxMenu& menu_sys(*new wxMenu()); + menubar.Append(&menu_sys, "System"); menu_sys.Append(id_sys_pause, "Pause")->Enable(false); menu_sys.Append(id_sys_stop, "Stop\tCtrl + S")->Enable(false); menu_sys.AppendSeparator(); menu_sys.Append(id_sys_send_open_menu, "Send open system menu cmd")->Enable(false); menu_sys.Append(id_sys_send_exit, "Send exit cmd")->Enable(false); + wxMenu& menu_conf(*new wxMenu()); + menubar.Append(&menu_conf, "Config"); menu_conf.Append(id_config_emu, "Settings"); menu_conf.Append(id_config_pad, "PAD Settings"); menu_conf.AppendSeparator(); menu_conf.Append(id_config_vfs_manager, "Virtual File System Manager"); menu_conf.Append(id_config_vhdd_manager, "Virtual HDD Manager"); + wxMenu& menu_tools(*new wxMenu()); + menubar.Append(&menu_tools, "Tools"); menu_tools.Append(id_tools_compiler, "ELF Compiler"); menu_tools.Append(id_tools_memory_viewer, "Memory Viewer"); menu_tools.Append(id_tools_rsx_debugger, "RSX Debugger"); + wxMenu& menu_help(*new wxMenu()); + menubar.Append(&menu_help, "Help"); menu_help.Append(id_help_about, "About..."); SetMenuBar(&menubar); + // Panels m_game_viewer = new GameViewer(this); + m_debugger_frame = new DebuggerPanel(this); + ConLogFrame = new LogFrame(this); + AddPane(m_game_viewer, "Game List", wxAUI_DOCK_BOTTOM); + AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM); + AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT); + // Events Connect( id_boot_game, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootGame) ); Connect( id_install_pkg, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::InstallPkg) ); Connect( id_boot_elf, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::BootElf) ); diff --git a/rpcs3/Gui/MainFrame.h b/rpcs3/Gui/MainFrame.h index ea4e1d0bce..af1cc69419 100644 --- a/rpcs3/Gui/MainFrame.h +++ b/rpcs3/Gui/MainFrame.h @@ -1,9 +1,13 @@ #pragma once -#include "GameViewer.h" + +#include "Gui/Debugger.h" +#include "Gui/GameViewer.h" + #include class MainFrame : public FrameBase { + DebuggerPanel* m_debugger_frame; GameViewer* m_game_viewer; wxAuiManager m_aui_mgr; AppConnector m_app_connector; diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp index 87b82ed0ca..d2d015c2cb 100644 --- a/rpcs3/rpcs3.cpp +++ b/rpcs3/rpcs3.cpp @@ -3,7 +3,6 @@ #include "Ini.h" #include "Emu/System.h" #include -#include "Gui/CompilerELF.h" const wxEventType wxEVT_DBG_COMMAND = wxNewEventType(); @@ -22,15 +21,7 @@ bool Rpcs3App::OnInit() SetTopWindow(m_MainFrame); Emu.Init(); - // (new CompilerELF(m_MainFrame))->Show(); - m_debugger_frame = new DebuggerPanel(m_MainFrame); - ConLogFrame = new LogFrame(m_MainFrame); - - m_MainFrame->AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM); - m_MainFrame->AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT); - //ConLogFrame->Show(); m_MainFrame->Show(); - m_MainFrame->DoSettings(true); return true; diff --git a/rpcs3/rpcs3.h b/rpcs3/rpcs3.h index 019185cce4..7100b182f0 100644 --- a/rpcs3/rpcs3.h +++ b/rpcs3/rpcs3.h @@ -1,7 +1,6 @@ #pragma once #include "Gui/MainFrame.h" -#include "Gui/Debugger.h" template T min(const T a, const T b) { return a < b ? a : b; } template T max(const T a, const T b) { return a > b ? a : b; } @@ -55,7 +54,6 @@ class Rpcs3App : public wxApp { public: MainFrame* m_MainFrame; - DebuggerPanel* m_debugger_frame; virtual bool OnInit(); virtual void Exit();