Add Recent Files Menu and Improve Recent Sessions #1616
Merged
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.
This primarily does 2 things:
It adds a new Recent Files pop up menu which keeps track of the most recently opened files and URLs and allows reopening them quickly. This was asked for here: (Feature Request: Recently opened files #1547). It doesn't include the asked for feature of tracking the genome associated with each file to make it easier to reload that genome, that could be added in the future if necessary.
It makes the recent sessions list update dynamically instead of only on file load. Previously saving or opening a session doesn't update the list, now it will update as expected.
It adds a new collection type which I called "StackSet" which is basically a stack that only allows unique entries. Adding an element that already exists moves it to the top of the stack. It's implemented twice (RecentFilesSet, RecentUrlsSet) since the serialization of recent session files has to be handled differently than the serialization of files which might have an associated index.
I've refactored the code around saving recent sessions to make it a bit cleaner.
In the future, it might make sense to move the list of recent sessions to a pop up as well.