From 425bd47bcd9293e64c76320b9d71315bf86dc955 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Sat, 16 May 2026 12:25:04 +0200 Subject: [PATCH] Change subsection name --- lib/I18n/translations/english.yaml | 3 ++- src/activities/home/FileContextMenuActivity.cpp | 15 +++++++-------- src/activities/reader/EpubReaderMenuActivity.cpp | 4 +++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/I18n/translations/english.yaml b/lib/I18n/translations/english.yaml index 960be0be..ebd6deca 100644 --- a/lib/I18n/translations/english.yaml +++ b/lib/I18n/translations/english.yaml @@ -669,4 +669,5 @@ STR_FIRMWARE_UPDATE_DO_NOT_POWER_OFF: "Do not power off!" STR_RECOVERY_MODE: "Recovery Mode" STR_RECOVERY_MODE_HINT: "Place firmware.bin on SD card root and select it" STR_VIEW_LIST: "List" -STR_VIEW_GRID: "Grid" \ No newline at end of file +STR_VIEW_GRID: "Grid" +STR_TOOL_UTILITIES: "Utilities" diff --git a/src/activities/home/FileContextMenuActivity.cpp b/src/activities/home/FileContextMenuActivity.cpp index 6ba0e0d4..5475208d 100644 --- a/src/activities/home/FileContextMenuActivity.cpp +++ b/src/activities/home/FileContextMenuActivity.cpp @@ -4,10 +4,10 @@ #include #include "../ActivityResult.h" +#include "../settings/SettingInfo.h" #include "CrossPointSettings.h" #include "KOReaderCredentialStore.h" #include "components/UITheme.h" -#include "../settings/SettingInfo.h" FileContextMenuActivity::FileContextMenuActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::string& filePath) @@ -17,17 +17,16 @@ FileContextMenuActivity::FileContextMenuActivity(GfxRenderer& renderer, MappedIn const bool isEpub = FsHelpers::hasEpubExtension(name); const bool isXtc = FsHelpers::hasXtcExtension(name); const bool isTxt = FsHelpers::hasTxtExtension(name) || FsHelpers::hasMarkdownExtension(name); - const bool isImage = FsHelpers::hasBmpExtension(name) || FsHelpers::hasJpgExtension(name) || - FsHelpers::hasPngExtension(name); + const bool isImage = + FsHelpers::hasBmpExtension(name) || FsHelpers::hasJpgExtension(name) || FsHelpers::hasPngExtension(name); if (isBin) { menuItems.push_back(SettingInfo::Action(StrId::STR_FLASH_FIRMWARE, SettingAction::None)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT)); menuItems.push_back(SettingInfo::Action(StrId::STR_REMOVE, SettingAction::None)); } else if (isImage) { menuItems.push_back(SettingInfo::Action(StrId::STR_OPEN, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_SET_SLEEP_SCREEN, SettingAction::None)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT)); + menuItems.push_back(SettingInfo::Separator(StrId::STR_TOOL_UTILITIES)); menuItems.push_back(SettingInfo::Action(StrId::STR_REMOVE, SettingAction::None)); } else if (isEpub) { menuItems.push_back(SettingInfo::Action(StrId::STR_OPEN, SettingAction::None)); @@ -36,20 +35,20 @@ FileContextMenuActivity::FileContextMenuActivity(GfxRenderer& renderer, MappedIn } menuItems.push_back(SettingInfo::Action(StrId::STR_MARK_AS_READ, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_INFO, SettingAction::None)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT)); + menuItems.push_back(SettingInfo::Separator(StrId::STR_TOOL_UTILITIES)); menuItems.push_back(SettingInfo::Action(StrId::STR_DELETE_CACHE, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_REMOVE, SettingAction::None)); } else if (isXtc) { menuItems.push_back(SettingInfo::Action(StrId::STR_OPEN, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_MARK_AS_READ, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_INFO, SettingAction::None)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT)); + menuItems.push_back(SettingInfo::Separator(StrId::STR_TOOL_UTILITIES)); menuItems.push_back(SettingInfo::Action(StrId::STR_DELETE_CACHE, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_REMOVE, SettingAction::None)); } else if (isTxt) { menuItems.push_back(SettingInfo::Action(StrId::STR_OPEN, SettingAction::None)); menuItems.push_back(SettingInfo::Action(StrId::STR_MARK_AS_READ, SettingAction::None)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT)); + menuItems.push_back(SettingInfo::Separator(StrId::STR_TOOL_UTILITIES)); menuItems.push_back(SettingInfo::Action(StrId::STR_REMOVE, SettingAction::None)); } } diff --git a/src/activities/reader/EpubReaderMenuActivity.cpp b/src/activities/reader/EpubReaderMenuActivity.cpp index 676e07b7..8d763cb3 100644 --- a/src/activities/reader/EpubReaderMenuActivity.cpp +++ b/src/activities/reader/EpubReaderMenuActivity.cpp @@ -256,15 +256,17 @@ void EpubReaderMenuActivity::buildMenuItems(bool hasFootnotes, bool hasStarredPa SettingInfo::Action(StrId::STR_MARK_AS_READ, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS)); menuItems.push_back( SettingInfo::Action(StrId::STR_DELETE_CACHE, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS)); - menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT).withSubmenu(StrId::STR_READER_TOOLS)); + menuItems.push_back(SettingInfo::Separator(StrId::STR_TOOL_UTILITIES).withSubmenu(StrId::STR_READER_TOOLS)); menuItems.push_back( SettingInfo::Action(StrId::STR_SCREENSHOT_BUTTON, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS)); menuItems.push_back( SettingInfo::Action(StrId::STR_DISPLAY_QR, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS)); menuItems.push_back(SettingInfo::Action(StrId::STR_GO_HOME_BUTTON, SettingAction::None)); +#ifdef ENABLE_BENCHMARKS menuItems.push_back(SettingInfo::Separator(StrId::STR_NONE_OPT).withSubmenu(StrId::STR_READER_TOOLS)); menuItems.push_back( SettingInfo::Action(StrId::STR_RENDER_BENCHMARK, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS)); +#endif } EpubReaderMenuActivity::MenuAction EpubReaderMenuActivity::actionForNameId(StrId nameId) {