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
34 lines
2.1 KiB
Markdown
34 lines
2.1 KiB
Markdown
# Move Clock Settings to Own Category
|
|
|
|
## Task Description
|
|
Moved all clock-related settings into a dedicated "Clock" tab in the settings screen, renamed "Home Screen Clock" to "Clock" (since it's now shown globally), and made "Set UTC Offset" conditionally visible only when timezone is set to "Custom".
|
|
|
|
## Changes Made
|
|
|
|
### 1. Rename "Home Screen Clock" -> "Clock"
|
|
- **`lib/I18n/I18nKeys.h`**: Renamed `STR_HOME_SCREEN_CLOCK` to `STR_CLOCK`.
|
|
- **All 8 YAML translation files**: Updated key name and shortened labels (e.g., "Home Screen Clock" -> "Clock", "Hodiny na domovske obrazovce" -> "Hodiny").
|
|
- **`src/CrossPointSettings.h`**: Renamed field `homeScreenClock` to `clockFormat`.
|
|
- **`src/CrossPointSettings.cpp`**: Updated all references (`writeSettings`, `loadFromFile`).
|
|
- **`src/SettingsList.h`**: Updated setting entry and JSON API key.
|
|
- **`src/main.cpp`**, **`src/components/themes/BaseTheme.cpp`**, **`src/components/themes/lyra/LyraTheme.cpp`**: Updated all `SETTINGS.homeScreenClock` references to `SETTINGS.clockFormat`.
|
|
|
|
### 2. New "Clock" settings category
|
|
- **`lib/I18n/I18nKeys.h`**: Added `STR_CAT_CLOCK`.
|
|
- **All 8 YAML translation files**: Added localized "Clock" category label.
|
|
- **`src/SettingsList.h`**: Changed category of Clock, Clock Size, and Timezone from `STR_CAT_DISPLAY` to `STR_CAT_CLOCK`.
|
|
|
|
### 3. Wire up in SettingsActivity
|
|
- **`src/activities/settings/SettingsActivity.h`**: Added `clockSettings` vector, `rebuildClockActions()` helper, bumped `categoryCount` to 5.
|
|
- **`src/activities/settings/SettingsActivity.cpp`**:
|
|
- Added `STR_CAT_CLOCK` to `categoryNames` (index 1, between Display and Reader).
|
|
- Added routing for `STR_CAT_CLOCK` in the category-sorting loop.
|
|
- Implemented `rebuildClockActions()`: always adds "Set Time", conditionally adds "Set UTC Offset" only when `timezone == TZ_CUSTOM`. Called on `onEnter()` and after every `toggleCurrentSetting()`.
|
|
- Updated category switch indices (Display=0, Clock=1, Reader=2, Controls=3, System=4).
|
|
|
|
## Build Status
|
|
Firmware builds successfully.
|
|
|
|
## Follow-up Items
|
|
- Test on device: verify the new Clock tab, setting visibility toggle, and tab bar layout with 5 tabs.
|