Directories: pinned favorite show folders for quick switching - #6957
Open
heffneil wants to merge 2 commits into
Open
Directories: pinned favorite show folders for quick switching#6957heffneil wants to merge 2 commits into
heffneil wants to merge 2 commits into
Conversation
Adds a Favorite Show Folders list to the Directories dialog: pin the current folder, remove, and switch to a pinned folder permanently or temporarily (double-click = permanent). Favorites persist in the xLights config (up to 30) and are independent of the auto Recent Show Folders MRU. Switching reuses SetDir(dir, permanent) with the ObtainAccessToURL sandbox check (mirroring OnMenuMRU) and guards against a folder that has been moved or deleted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brian's feedback on the favorites list: a pinned folder should carry a display name, and favorites should be reachable from the File menu rather than only from the Directories dialog. - Add Current prompts for a name, pre-filled with the folder's own name, and a Rename button changes it later. - The list becomes a wxListCtrl with Name and Folder columns, name first. - File > Favorite Show Folders sits directly under Recent Show Folders and shows names only, with the full path as the item's help text. The menu cannot follow OnMenuMRU's approach of reading the show folder back out of the menu label, since the label is now a name - picking one would try to open a directory called "Christmas 2026". Favorites keep an id -> path map instead. Names are escaped with wxControl::EscapeMnemonics so an '&' in a folder name does not become an accelerator. Names live in new ShowFolderFavoriteName* config keys, so favorites pinned before this change still load, defaulting to their folder name. The menu is rebuilt when the Directories dialog closes as well as on a folder change - adding a favorite without switching folders would otherwise leave the menu stale. Both the dialog and the menu read through ShowDirectoriesDialog::ReadFavoritesFromConfig so the config keys and the 30-slot cap are defined once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds pinned favorite show folders to the Directories dialog so you can jump between shows you use often without browsing each time. Previously the dialog only let you Change Permanently / Temporarily via a folder picker.
A new Favorite Show Folders section shows a list of pinned folders with:
Favorites are persisted in the xLights config (up to 30 slots) and survive restarts. They are manual/pinned, independent of the existing auto Recent Show Folders MRU on the File menu.


How
ShowDirectoriesDialoggains awxListBox+ four buttons and astd::vector<wxString> _favorites.GetXLightsConfig()under keysShowFolderFavorite0..29; unused trailing slots are blanked on save so removed favorites don't reappear.xLightsFrame::SetDir(dir, permanent)path with theObtainAccessToURL(dir, true)sandbox check — mirroringOnMenuMRU(the recent-folders switch) — and clears display elements + layout undo first, matching the dialog's existing temporary-switch cleanup.Addis disabled at the 30-slot cap or when the current folder is already pinned.Testing
Built (macOS Debug). Pinned/removed folders, switched permanently and temporarily, confirmed the list persists across a restart and that a deleted folder is handled gracefully.
iPad parity
Desktop-only setup UI (
src-ui-wx/setup/); the iPad has no equivalent Directories dialog. No iPad counterpart to change.🤖 Generated with Claude Code