Repository navigation
Add "Clear recently used" item to the Last used submenu - #742
Closed
mfkeeq199458 wants to merge 3 commits into
Closed
mfkeeq199458 wants to merge 3 commits into
mfkeeq199458 wants to merge 3 commits into
Conversation
Adds a clear entry at the bottom of File -> Last used that empties Settings.FileHistoryList and persists it immediately. Only the recent files list is affected; search, filter, filter-range, URI and regex histories are left untouched. - ConfigManager.ClearFileHistory() clears the list and calls Save(SettingsFlags.FileHistory) - MenuToolbarController builds the item at runtime, raises HistoryClearRequested on click and excludes the item from the right-click removal path so it is never treated as a file name - The item stays visible but disabled when the history is empty - Resources for en, zh-CN and de plus the matching Designer property - Tests: ConfigManager.ClearFileHistory (3) and menu behaviour (2)
Member
ReviewThe behaviour works end to end. Most of the points below are about test coverage and how the description is worded. Verified
SuggestionsTests
MenuToolbarController
ConfigManager
Description
Minor / no action needed
|
ClearFileHistory now holds the load/save lock across the clear and the save, so a save already in flight cannot serialise the list mid-clear and write the old entries back. The history menu keeps a reference to the clear row and stores each file path in Tag. The click handler matches by reference and the right-click handler reads Tag instead of the display text, so a history entry whose text happens to look like the clear label is no longer treated as the clear command. The population path also snapshots the live file history list before hopping to the UI thread. Documents on IConfigManager that only the file history list is cleared and the other history lists keep their entries.
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.
Adds a clear entry at the bottom of File -> Last used that empties Settings.FileHistoryList and persists it immediately. Only the recent files list is affected; search, filter, filter-range, URI and regex histories are left untouched.