Files
crosspoint-reader-mod/chat-summaries/2026-02-16_19-30-summary.md
cottongin dfbc931c14 mod: Phase 1 - bring forward mod-exclusive files with ActivityManager migration
Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch:

Activities (migrated to new ActivityManager pattern):
- Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity
- Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity,
  DictionaryWordSelectActivity, LookedUpWordsActivity
- Bookmark: EpubReaderBookmarkSelectionActivity
- Book management: BookManageMenuActivity, EndOfBookMenuActivity
- OPDS: OpdsServerListActivity, OpdsSettingsActivity
- Utility: DirectoryPickerActivity, NumericStepperActivity

Utilities (unchanged):
- BookManager, BookSettings, BookmarkStore, BootNtpSync
- Dictionary, LookupHistory, TimeSync, OpdsServerStore

Libraries: PlaceholderCover, TableData, ChapterXPathIndexer
Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover
Docs: KOReader sync XPath mapping

Migration changes:
- ActivityWithSubactivity -> Activity base class
- Callback constructors -> finish()/setResult() pattern
- enterNewActivity() -> startActivityForResult()
- Activity::RenderLock&& -> RenderLock&&

These files won't compile yet - they reference mod settings and I18n
strings that will be added in subsequent phases.

Made-with: Cursor
2026-03-07 15:10:00 -05:00

3.2 KiB

Reader Menu Improvements

Task

Overhaul the EPUB reader menu: consolidate dictionary actions behind long-press, add portrait/landscape toggle with preferred-orientation settings, add font size cycling, and rename several menu labels.

Changes Made

1. Consolidated Dictionary Menu Items

  • Removed "Lookup Word History" and "Delete Dictionary Cache" from the reader menu
  • Long-pressing Confirm on "Lookup Word" now opens the Lookup History screen
  • "Delete Dictionary Cache" moved to a sentinel entry at the bottom of the Lookup History word list

Files: EpubReaderMenuActivity.h, EpubReaderMenuActivity.cpp, LookedUpWordsActivity.h, LookedUpWordsActivity.cpp, EpubReaderActivity.cpp

2. Toggle Portrait/Landscape

  • Renamed "Reading Orientation" to "Toggle Portrait/Landscape" in the reader menu (kept the original name in global Settings)
  • Short-press now toggles between preferred portrait and preferred landscape orientations
  • Long-press opens a popup sub-menu with all 4 orientation options
  • Added preferredPortrait and preferredLandscape settings to CrossPointSettings (serialized at end for backward-compat)
  • Added corresponding settings to SettingsList.h using DynamicEnum (maps non-sequential enum values correctly)

Files: CrossPointSettings.h, CrossPointSettings.cpp, SettingsList.h, EpubReaderMenuActivity.h, EpubReaderMenuActivity.cpp

3. Toggle Font Size

  • Added new TOGGLE_FONT_SIZE menu action
  • Cycles through Small → Medium → Large → Extra Large → Small on each press
  • Shows current size value next to the label (like orientation)
  • Applied on menu exit via extended onBack callback (uint8_t orientation, uint8_t fontSize)
  • Added applyFontSize() to EpubReaderActivity (saves to settings, resets section for re-layout)

Files: EpubReaderMenuActivity.h, EpubReaderMenuActivity.cpp, EpubReaderActivity.h, EpubReaderActivity.cpp

4. Label Renames

  • "Letterbox Fill" → "Override Letterbox Fill" (reader menu only; global setting keeps original name)
  • "Sync Progress" → "Sync Reading Progress"

Files: english.yaml (I18n source), regenerated I18nKeys.h, I18nStrings.h, I18nStrings.cpp

5. Long-Press Safety

  • Added ignoreNextConfirmRelease flag to EpubReaderMenuActivity to prevent stale releases
  • Added initialSkipRelease constructor parameter to LookedUpWordsActivity
  • Extended ignoreNextConfirmRelease guard to cover the word-selection path (not just delete-confirm mode)
  • Orientation sub-menu also uses ignoreNextConfirmRelease to avoid selecting on long-press release

6. New I18n Strings

  • STR_TOGGLE_ORIENTATION: "Toggle Portrait/Landscape"
  • STR_TOGGLE_FONT_SIZE: "Toggle Font Size"
  • STR_OVERRIDE_LETTERBOX_FILL: "Override Letterbox Fill"
  • STR_PREFERRED_PORTRAIT: "Preferred Portrait"
  • STR_PREFERRED_LANDSCAPE: "Preferred Landscape"

Build Status

Successfully compiled (default environment). RAM: 31.1%, Flash: 99.4%.

Follow-up Items

  • Translations: New strings fall back to English for all non-English languages. Translators can add entries to their respective YAML files.
  • The SettingInfo::Enum approach doesn't work for non-sequential enum values (portrait=0, inverted=2). Used DynamicEnum with getter/setter lambdas instead.