From dd29e0cad38c40b6af9d914c9ce8d4b3a889ae2d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 1 Jul 2022 20:25:25 -0700 Subject: [PATCH] Qt: Clean up views --- src/platform/qt/Window.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 543eb4b2f..b01b97a5d 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1316,10 +1316,6 @@ void Window::setupMenu(QMenuBar* menubar) { #ifdef M_CORE_GBA Action* scanCard = addGameAction(tr("Scan e-Reader dotcodes..."), "scanCard", this, &Window::scanCard, "file"); m_platformActions.insert(mPLATFORM_GBA, scanCard); - -#ifdef USE_FFMPEG - m_actions.addAction(tr("Convert e-Reader card image to raw..."), "parseCard", this, &Window::parseCard, "file"); -#endif #endif addGameAction(tr("ROM &info..."), "romInfo", openControllerTView(), "file"); @@ -1646,6 +1642,9 @@ void Window::setupMenu(QMenuBar* menubar) { m_actions.addAction(tr("Game Pak sensors..."), "sensorWindow", openNamedControllerTView(&m_sensorView, &m_inputController), "tools"); addGameAction(tr("&Cheats..."), "cheatsWindow", openControllerTView(), "tools"); +#ifdef ENABLE_SCRIPTING + m_actions.addAction(tr("Scripting..."), "scripting", this, &Window::scriptingOpen, "tools"); +#endif m_actions.addSeparator("tools"); m_actions.addAction(tr("Settings..."), "settings", this, &Window::openSettingsWindow, "tools")->setRole(Action::Role::SETTINGS); @@ -1659,17 +1658,15 @@ void Window::setupMenu(QMenuBar* menubar) { m_platformActions.insert(mPLATFORM_GBA, gdbWindow); #endif #endif -#ifdef ENABLE_SCRIPTING - m_actions.addAction(tr("Scripting..."), "scripting", this, &Window::scriptingOpen, "tools"); -#endif #if defined(USE_DEBUGGERS) || defined(ENABLE_SCRIPTING) m_actions.addSeparator("tools"); #endif - addGameAction(tr("View &palette..."), "paletteWindow", openControllerTView(), "tools"); - addGameAction(tr("View &sprites..."), "spriteWindow", openControllerTView(), "tools"); - addGameAction(tr("View &tiles..."), "tileWindow", openControllerTView(), "tools"); - addGameAction(tr("View &map..."), "mapWindow", openControllerTView(), "tools"); + m_actions.addMenu(tr("Game state views"), "stateViews", "tools"); + addGameAction(tr("View &palette..."), "paletteWindow", openControllerTView(), "stateViews"); + addGameAction(tr("View &sprites..."), "spriteWindow", openControllerTView(), "stateViews"); + addGameAction(tr("View &tiles..."), "tileWindow", openControllerTView(), "stateViews"); + addGameAction(tr("View &map..."), "mapWindow", openControllerTView(), "stateViews"); addGameAction(tr("&Frame inspector..."), "frameWindow", [this]() { if (!m_frameView) { @@ -1685,11 +1682,16 @@ void Window::setupMenu(QMenuBar* menubar) { m_frameView->setAttribute(Qt::WA_DeleteOnClose); } m_frameView->show(); - }, "tools"); + }, "stateViews"); - addGameAction(tr("View memory..."), "memoryView", openControllerTView(), "tools"); - addGameAction(tr("Search memory..."), "memorySearch", openControllerTView(), "tools"); - addGameAction(tr("View &I/O registers..."), "ioViewer", openControllerTView(), "tools"); + addGameAction(tr("View memory..."), "memoryView", openControllerTView(), "stateViews"); + addGameAction(tr("Search memory..."), "memorySearch", openControllerTView(), "stateViews"); + addGameAction(tr("View &I/O registers..."), "ioViewer", openControllerTView(), "stateViews"); + +#if defined(USE_FFMPEG) && defined(M_CORE_GBA) + m_actions.addSeparator("tools"); + m_actions.addAction(tr("Convert e-Reader card image to raw..."), "parseCard", this, &Window::parseCard, "tools"); +#endif m_actions.addSeparator("tools"); addGameAction(tr("Record debug video log..."), "recordVL", this, &Window::startVideoLog, "tools");