From 4768f2fc0b4d9054ca4fe8bfbbddd50d29bf9284 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 15 Aug 2014 07:24:27 -0700 Subject: [PATCH] Moving XdbApp under ui::. --- src/xdb/sources.gypi | 2 -- src/xdb/ui/sources.gypi | 2 ++ src/xdb/{ => ui}/xdb_app.cc | 8 +++++--- src/xdb/{ => ui}/xdb_app.h | 14 ++++++-------- tools/xenia-debug/xenia-debug.cc | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) rename src/xdb/{ => ui}/xdb_app.cc (95%) rename src/xdb/{ => ui}/xdb_app.h (89%) diff --git a/src/xdb/sources.gypi b/src/xdb/sources.gypi index 621a218e1..eec8b4a15 100644 --- a/src/xdb/sources.gypi +++ b/src/xdb/sources.gypi @@ -8,8 +8,6 @@ 'protocol.h', 'xdb.cc', 'xdb.h', - 'xdb_app.cc', - 'xdb_app.h', ], 'includes': [ diff --git a/src/xdb/ui/sources.gypi b/src/xdb/ui/sources.gypi index bc406dd7d..9f4541a7b 100644 --- a/src/xdb/ui/sources.gypi +++ b/src/xdb/ui/sources.gypi @@ -4,6 +4,8 @@ 'main_frame.cc', 'main_frame.h', 'open_postmortem_trace_dialog.h', + 'xdb_app.cc', + 'xdb_app.h', 'xdb_ui.cpp', 'xdb_ui.h', ], diff --git a/src/xdb/xdb_app.cc b/src/xdb/ui/xdb_app.cc similarity index 95% rename from src/xdb/xdb_app.cc rename to src/xdb/ui/xdb_app.cc index 2da4cf668..c902142b7 100644 --- a/src/xdb/xdb_app.cc +++ b/src/xdb/ui/xdb_app.cc @@ -7,7 +7,7 @@ ****************************************************************************** */ -#include +#include #include #include @@ -20,6 +20,7 @@ #include namespace xdb { +namespace ui { IMPLEMENT_APP(XdbApp); @@ -32,7 +33,7 @@ int XdbApp::OnExit() { void XdbApp::OpenEmpty() { while (true) { - ui::OpenPostmortemTraceDialog dialog; + OpenPostmortemTraceDialog dialog; if (dialog.ShowModal() == wxID_CANCEL) { Exit(); return; @@ -100,7 +101,7 @@ bool XdbApp::OpenTraceFile(const std::wstring& trace_file_path, } bool XdbApp::OpenDebugTarget(std::unique_ptr debug_target) { - auto main_frame = new ui::MainFrame(std::move(debug_target)); + auto main_frame = new MainFrame(std::move(debug_target)); main_frames_.push_back(main_frame); main_frame->Connect(wxEVT_DESTROY, wxEventHandler(XdbApp::OnMainFrameDestroy), @@ -128,4 +129,5 @@ void XdbApp::OnMainFrameDestroy(wxEvent& event) { assert_always(); } +} // namespace ui } // namespace xdb diff --git a/src/xdb/xdb_app.h b/src/xdb/ui/xdb_app.h similarity index 89% rename from src/xdb/xdb_app.h rename to src/xdb/ui/xdb_app.h index 1aa607042..c6c3bfd7d 100644 --- a/src/xdb/xdb_app.h +++ b/src/xdb/ui/xdb_app.h @@ -7,8 +7,8 @@ ****************************************************************************** */ -#ifndef XDB_XDB_APP_H_ -#define XDB_XDB_APP_H_ +#ifndef XDB_UI_XDB_APP_H_ +#define XDB_UI_XDB_APP_H_ #include #include @@ -19,11 +19,8 @@ namespace xdb { namespace ui { -class MainFrame; -} // namespace ui -} // namespace xdb -namespace xdb { +class MainFrame; class XdbApp : public wxApp { public: @@ -42,9 +39,10 @@ class XdbApp : public wxApp { void OnMainFrameDestroy(wxEvent& event); - std::vector main_frames_; + std::vector main_frames_; }; +} // namespace ui } // namespace xdb -#endif // XDB_XDB_APP_H_ +#endif // XDB_UI_XDB_APP_H_ diff --git a/tools/xenia-debug/xenia-debug.cc b/tools/xenia-debug/xenia-debug.cc index 090975438..2adeaf618 100644 --- a/tools/xenia-debug/xenia-debug.cc +++ b/tools/xenia-debug/xenia-debug.cc @@ -14,7 +14,7 @@ #include #include #include -#include +#include DEFINE_string(trace_file, "", "Trace file to load on startup."); DEFINE_string(content_file, "", @@ -38,7 +38,7 @@ int main(int argc, xechar_t** argv) { } // App is auto-freed by wx. - auto app = new XdbApp(); + auto app = new ui::XdbApp(); wxApp::SetInstance(app); if (!wxEntryStart(0, nullptr)) { XEFATAL("Failed to enter wxWidgets app");