From e64976d4bcab0ce6587bc5bdb06fd8f56dc2c7a6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 16 Jan 2022 11:10:32 +0100 Subject: [PATCH] Renamed GuiGameScraper to GuiScraperSingle. --- es-app/CMakeLists.txt | 4 ++-- es-app/src/guis/GuiMetaDataEd.cpp | 6 ++--- es-app/src/guis/GuiMetaDataEd.h | 2 +- es-app/src/guis/GuiScraperSearch.cpp | 2 +- es-app/src/guis/GuiScraperSearch.h | 2 +- ...uiGameScraper.cpp => GuiScraperSingle.cpp} | 24 +++++++++---------- .../{GuiGameScraper.h => GuiScraperSingle.h} | 18 +++++++------- 7 files changed, 29 insertions(+), 29 deletions(-) rename es-app/src/guis/{GuiGameScraper.cpp => GuiScraperSingle.cpp} (92%) rename es-app/src/guis/{GuiGameScraper.h => GuiScraperSingle.h} (75%) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 707d86f26..af2353fc2 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -29,7 +29,6 @@ set(ES_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h @@ -38,6 +37,7 @@ set(ES_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSingle.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h @@ -79,7 +79,6 @@ set(ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.cpp @@ -88,6 +87,7 @@ set(ES_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSingle.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 3adf0f142..f8833d1aa 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -5,7 +5,7 @@ // // Game metadata edit user interface. // This interface is triggered from the GuiGamelistOptions menu. -// The scraping interface is handled by GuiGameScraper which calls GuiScraperSearch. +// The scraping interface is handled by GuiScraperSingle which calls GuiScraperSearch. // #include "guis/GuiMetaDataEd.h" @@ -24,8 +24,8 @@ #include "components/RatingComponent.h" #include "components/SwitchComponent.h" #include "components/TextComponent.h" -#include "guis/GuiGameScraper.h" #include "guis/GuiMsgBox.h" +#include "guis/GuiScraperSingle.h" #include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "resources/Font.h" @@ -747,7 +747,7 @@ void GuiMetaDataEd::save() void GuiMetaDataEd::fetch() { - GuiGameScraper* scr = new GuiGameScraper( + GuiScraperSingle* scr = new GuiScraperSingle( mWindow, mScraperParams, std::bind(&GuiMetaDataEd::fetchDone, this, std::placeholders::_1), mSavedMediaAndAborted); mWindow->pushGui(scr); diff --git a/es-app/src/guis/GuiMetaDataEd.h b/es-app/src/guis/GuiMetaDataEd.h index 90ed9c3bb..66db52f53 100644 --- a/es-app/src/guis/GuiMetaDataEd.h +++ b/es-app/src/guis/GuiMetaDataEd.h @@ -5,7 +5,7 @@ // // Game metadata edit user interface. // This interface is triggered from the GuiGamelistOptions menu. -// The scraping interface is handled by GuiGameScraper which calls GuiScraperSearch. +// The scraping interface is handled by GuiScraperSingle which calls GuiScraperSearch. // #ifndef ES_APP_GUIS_GUI_META_DATA_ED_H diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 8a4fc559a..5f9b5d93a 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -9,7 +9,7 @@ // to resolve scraping conflicts when run from GuiScraperMenu. // The function to properly save scraped metadata is located here too. // -// This GUI is called from GuiGameScraper for single-game scraping and +// This GUI is called from GuiScraperSingle for single-game scraping and // from GuiScraperMulti for multi-game scraping. // diff --git a/es-app/src/guis/GuiScraperSearch.h b/es-app/src/guis/GuiScraperSearch.h index 490fee366..354f4a3e8 100644 --- a/es-app/src/guis/GuiScraperSearch.h +++ b/es-app/src/guis/GuiScraperSearch.h @@ -9,7 +9,7 @@ // to resolve scraping conflicts when run from GuiScraperMenu. // The function to properly save scraped metadata is located here too. // -// This GUI is called from GuiGameScraper for single-game scraping and +// This GUI is called from GuiScraperSingle for single-game scraping and // from GuiScraperMulti for multi-game scraping. // diff --git a/es-app/src/guis/GuiGameScraper.cpp b/es-app/src/guis/GuiScraperSingle.cpp similarity index 92% rename from es-app/src/guis/GuiGameScraper.cpp rename to es-app/src/guis/GuiScraperSingle.cpp index 329362df4..c9e3ec5c7 100644 --- a/es-app/src/guis/GuiGameScraper.cpp +++ b/es-app/src/guis/GuiScraperSingle.cpp @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// GuiGameScraper.cpp +// GuiScraperSingle.cpp // // Single game scraping user interface. // This interface is triggered from GuiMetaDataEd. // GuiScraperSearch is called from here. // -#include "guis/GuiGameScraper.h" +#include "guis/GuiScraperSingle.h" #include "FileData.h" #include "MameNames.h" @@ -18,10 +18,10 @@ #include "components/TextComponent.h" #include "views/ViewController.h" -GuiGameScraper::GuiGameScraper(Window* window, - ScraperSearchParams& params, - std::function doneFunc, - bool& savedMediaAndAborted) +GuiScraperSingle::GuiScraperSingle(Window* window, + ScraperSearchParams& params, + std::function doneFunc, + bool& savedMediaAndAborted) : GuiComponent(window) , mClose(false) , mGrid(window, glm::ivec2{2, 6}) @@ -141,7 +141,7 @@ GuiGameScraper::GuiGameScraper(Window* window, mSearch->search(params); // Start the search. } -void GuiGameScraper::onSizeChanged() +void GuiScraperSingle::onSizeChanged() { mGrid.setRowHeightPerc( 0, (mGameName->getFont()->getLetterHeight() + Renderer::getScreenHeight() * 0.0637f) / @@ -164,7 +164,7 @@ void GuiGameScraper::onSizeChanged() mGameName->setPosition((mSize.x - newSizeX) / 2.0f, 0.0f); } -bool GuiGameScraper::input(InputConfig* config, Input input) +bool GuiScraperSingle::input(InputConfig* config, Input input) { if (config->isMappedTo("b", input) && input.value) { if (mSearch->getSavedNewMedia()) { @@ -181,7 +181,7 @@ bool GuiGameScraper::input(InputConfig* config, Input input) return GuiComponent::input(config, input); } -void GuiGameScraper::update(int deltaTime) +void GuiScraperSingle::update(int deltaTime) { GuiComponent::update(deltaTime); @@ -189,7 +189,7 @@ void GuiGameScraper::update(int deltaTime) delete this; } -std::vector GuiGameScraper::getHelpPrompts() +std::vector GuiScraperSingle::getHelpPrompts() { std::vector prompts = mGrid.getHelpPrompts(); prompts.push_back(HelpPrompt("b", "back (cancel)")); @@ -197,14 +197,14 @@ std::vector GuiGameScraper::getHelpPrompts() return prompts; } -HelpStyle GuiGameScraper::getHelpStyle() +HelpStyle GuiScraperSingle::getHelpStyle() { HelpStyle style = HelpStyle(); style.applyTheme(ViewController::getInstance()->getState().getSystem()->getTheme(), "system"); return style; } -void GuiGameScraper::close() +void GuiScraperSingle::close() { // This will cause update() to close the GUI. mClose = true; diff --git a/es-app/src/guis/GuiGameScraper.h b/es-app/src/guis/GuiScraperSingle.h similarity index 75% rename from es-app/src/guis/GuiGameScraper.h rename to es-app/src/guis/GuiScraperSingle.h index 1bc648dcb..3042a1cc3 100644 --- a/es-app/src/guis/GuiGameScraper.h +++ b/es-app/src/guis/GuiScraperSingle.h @@ -1,28 +1,28 @@ // SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition -// GuiGameScraper.h +// GuiScraperSingle.h // // Single game scraping user interface. // This interface is triggered from GuiMetaDataEd. // GuiScraperSearch is called from here. // -#ifndef ES_APP_GUIS_GUI_GAME_SCRAPER_H -#define ES_APP_GUIS_GUI_GAME_SCRAPER_H +#ifndef ES_APP_GUIS_GUI_SCRAPER_SINGLE_H +#define ES_APP_GUIS_GUI_SCRAPER_SINGLE_H #include "GuiComponent.h" #include "components/NinePatchComponent.h" #include "components/ScrollIndicatorComponent.h" #include "guis/GuiScraperSearch.h" -class GuiGameScraper : public GuiComponent +class GuiScraperSingle : public GuiComponent { public: - GuiGameScraper(Window* window, - ScraperSearchParams& params, - std::function doneFunc, - bool& savedMediaAndAborted); + GuiScraperSingle(Window* window, + ScraperSearchParams& params, + std::function doneFunc, + bool& savedMediaAndAborted); void onSizeChanged() override; @@ -54,4 +54,4 @@ private: std::function mCancelFunc; }; -#endif // ES_APP_GUIS_GUI_GAME_SCRAPER_H +#endif // ES_APP_GUIS_GUI_SCRAPER_SINGLE_H