From 5019d8c0659e39f3665f4108449bed9907d0dafc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 6 Dec 2021 20:21:32 +0100 Subject: [PATCH] Moved the ScreenScraper account toggle to the bottom of the scraper account screen. --- es-app/src/guis/GuiScraperMenu.cpp | 28 ++++++++++++++-------------- es-core/src/Settings.cpp | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/es-app/src/guis/GuiScraperMenu.cpp b/es-app/src/guis/GuiScraperMenu.cpp index 0014e6832..2f009ed53 100644 --- a/es-app/src/guis/GuiScraperMenu.cpp +++ b/es-app/src/guis/GuiScraperMenu.cpp @@ -168,20 +168,6 @@ void GuiScraperMenu::openAccountOptions() { auto s = new GuiSettings(mWindow, "ACCOUNT SETTINGS"); - // Whether to use the ScreenScraper account when scraping. - auto scraper_use_account_screenscraper = std::make_shared(mWindow); - scraper_use_account_screenscraper->setState( - Settings::getInstance()->getBool("ScraperUseAccountScreenScraper")); - s->addWithLabel("USE THIS ACCOUNT FOR SCREENSCRAPER", scraper_use_account_screenscraper); - s->addSaveFunc([scraper_use_account_screenscraper, s] { - if (scraper_use_account_screenscraper->getState() != - Settings::getInstance()->getBool("ScraperUseAccountScreenScraper")) { - Settings::getInstance()->setBool("ScraperUseAccountScreenScraper", - scraper_use_account_screenscraper->getState()); - s->setNeedsSaving(); - } - }); - // ScreenScraper username. auto scraper_username_screenscraper = std::make_shared( mWindow, "", Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_RIGHT); @@ -216,6 +202,20 @@ void GuiScraperMenu::openAccountOptions() } }); + // Whether to use the ScreenScraper account when scraping. + auto scraper_use_account_screenscraper = std::make_shared(mWindow); + scraper_use_account_screenscraper->setState( + Settings::getInstance()->getBool("ScraperUseAccountScreenScraper")); + s->addWithLabel("USE THIS ACCOUNT FOR SCREENSCRAPER", scraper_use_account_screenscraper); + s->addSaveFunc([scraper_use_account_screenscraper, s] { + if (scraper_use_account_screenscraper->getState() != + Settings::getInstance()->getBool("ScraperUseAccountScreenScraper")) { + Settings::getInstance()->setBool("ScraperUseAccountScreenScraper", + scraper_use_account_screenscraper->getState()); + s->setNeedsSaving(); + } + }); + mWindow->pushGui(s); } diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 60869faed..8e79d22e1 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -85,9 +85,9 @@ void Settings::setDefaults() // Scraper. mStringMap["Scraper"] = {"screenscraper", "screenscraper"}; - mBoolMap["ScraperUseAccountScreenScraper"] = {true, true}; mStringMap["ScraperUsernameScreenScraper"] = {"", ""}; mStringMap["ScraperPasswordScreenScraper"] = {"", ""}; + mBoolMap["ScraperUseAccountScreenScraper"] = {true, true}; mBoolMap["ScrapeGameNames"] = {true, true}; mBoolMap["ScrapeRatings"] = {true, true};