From 3757b31fbc3ace0ac72d9aa3bc32713679845618 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 11 Jul 2021 13:47:31 +0200 Subject: [PATCH] Fixed an issue where a menu option was available when it shouldn't be. Also changed some misleading comments related to graying out menu options. --- es-app/src/guis/GuiMenu.cpp | 2 +- es-app/src/guis/GuiScraperMenu.cpp | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index bc9a2f77f..2c337a92a 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -937,7 +937,7 @@ void GuiMenu::openOtherOptions() } }); - // If the RunInBackground setting is enabled, then disable this option. + // If the RunInBackground setting is enabled, then gray out this option. if (Settings::getInstance()->getBool("RunInBackground")) { launch_workaround->setEnabled(false); launch_workaround->setOpacity(DISABLED_OPACITY); diff --git a/es-app/src/guis/GuiScraperMenu.cpp b/es-app/src/guis/GuiScraperMenu.cpp index a03ca047e..4040c0e50 100644 --- a/es-app/src/guis/GuiScraperMenu.cpp +++ b/es-app/src/guis/GuiScraperMenu.cpp @@ -240,7 +240,7 @@ void GuiScraperMenu::openContentOptions() } }); - // Ratings are not supported by TheGamesDB, so disable the option if this scraper is selected. + // Ratings are not supported by TheGamesDB, so gray out the option if this scraper is selected. if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { scrape_ratings->setEnabled(false); scrape_ratings->setOpacity(DISABLED_OPACITY); @@ -271,7 +271,7 @@ void GuiScraperMenu::openContentOptions() } }); - // Videos are not supported by TheGamesDB, so disable the option if this scraper is selected. + // Videos are not supported by TheGamesDB, so gray out the option if this scraper is selected. if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { scrape_videos->setEnabled(false); scrape_videos->setOpacity(DISABLED_OPACITY); @@ -325,7 +325,7 @@ void GuiScraperMenu::openContentOptions() } }); - // 3D box images are not supported by TheGamesDB, so disable the option if this scraper + // 3D box images are not supported by TheGamesDB, so gray out the option if this scraper // is selected. if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { scrape_3dboxes->setEnabled(false); @@ -544,7 +544,7 @@ void GuiScraperMenu::openOtherOptions() } }); - // Regions are not supported by TheGamesDB, so disable the option if this scraper is selected. + // Regions are not supported by TheGamesDB, so gray out the option if this scraper is selected. if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { scraper_region->setEnabled(false); scraper_region->setOpacity(DISABLED_OPACITY); @@ -592,7 +592,8 @@ void GuiScraperMenu::openOtherOptions() } }); - // Languages are not supported by TheGamesDB, so disable the option if this scraper is selected. + // Languages are not supported by TheGamesDB, so gray out the option if this scraper is + // selected. if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { scraper_language->setEnabled(false); scraper_language->setOpacity(DISABLED_OPACITY); @@ -667,7 +668,7 @@ void GuiScraperMenu::openOtherOptions() } }); - // If interactive mode is set to off, then disable this option. + // If interactive mode is set to off, then gray out this option. if (!Settings::getInstance()->getBool("ScraperInteractive")) { scraper_semiautomatic->setEnabled(false); scraper_semiautomatic->setOpacity(DISABLED_OPACITY); @@ -704,7 +705,7 @@ void GuiScraperMenu::openOtherOptions() } }); - // If respecting excluded files is set to off, then disable this option. + // If respecting excluded files is set to off, then gray out this option. if (!Settings::getInstance()->getBool("ScraperRespectExclusions")) { scraper_exclude_recursively->setEnabled(false); scraper_exclude_recursively->setOpacity(DISABLED_OPACITY); @@ -740,6 +741,16 @@ void GuiScraperMenu::openOtherOptions() } }); + // The TLS/certificate issue is not present for TheGamesDB, so gray out the option if this + // scraper is selected. + if (Settings::getInstance()->getString("Scraper") == "thegamesdb") { + retry_peer_verification->setEnabled(false); + retry_peer_verification->setOpacity(DISABLED_OPACITY); + retry_peer_verification->getParent() + ->getChild(retry_peer_verification->getChildIndex() - 1) + ->setOpacity(DISABLED_OPACITY); + } + // Switch callbacks. auto interactiveToggleFunc = [scraper_semiautomatic]() { if (scraper_semiautomatic->getEnabled()) {