Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Clear missing files" option to recent ISO list #4975

Merged
merged 2 commits into from
Dec 28, 2021

Conversation

italodirenzo93
Copy link
Contributor

Description of Changes

Adds an option to the recent ISO list to remove all entries that can no longer be found in their original location.

Rationale behind Changes

Solution for #4963. I decided on using the term "prune" instead of "clean" because it sounds too similar to the existing "clear". Would welcome input on what the terminology for this function should be.

Suggested Testing Steps

  1. Load an ISO file into PCSX2
  2. In a separate file browser window, move that file to a different location on disk
  3. Click the "Prune ISO list" option and the file will be removed from the list

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@lightningterror
Copy link
Contributor

Maybe Clear invalid ISO list would make more sense.

@IlDucci
Copy link
Contributor

IlDucci commented Nov 4, 2021

Maybe Clear invalid ISO list would make more sense.

Or simply "Clear invalid ISO files". Maybe things could be made more obvious by referring to the entire ISO list (for the full removal, "Clean ISO list") and to the individual ISO files (for the pruning of only any missing ISO files, "Prune invalid ISO files").

@refractionpcsx2
Copy link
Member

Or an even more user friendly way of writing it
Clear missing files

@nf6429
Copy link

nf6429 commented Nov 4, 2021

Agree with the above. "Clear invalid ISO" to an end user could indicate something is wrong with your file itself, not that it's just been moved, whilst "clear missing files" directly states what the issue is.

@IlDucci
Copy link
Contributor

IlDucci commented Nov 4, 2021

Agree with the above. "Clear invalid ISO" to an end user could indicate something is wrong with your file itself, not that it's just been moved, whilst "clear missing files" directly states what the issue is.

Agreed as well.

@arcum42
Copy link
Contributor

arcum42 commented Nov 5, 2021

My main suggestion would be to show a list of what's going to be removed on the confirmation dialog box, before you actually remove it. Otherwise, I could see times where you could accidentally remove all or most of the entries because of something not being mounted at the moment...

@RedDevilus
Copy link
Contributor

* Game1
* Game2
* Game3
These will be removed from the listing. Do you confirm?
OK              Cancel

Should be feasible to do something like this.

@darkxex
Copy link
Contributor

darkxex commented Nov 5, 2021

I find it very useful.

@italodirenzo93
Copy link
Contributor Author

italodirenzo93 commented Nov 5, 2021

I agree. Will update the PR with a new commit soon.

Is it still recommended to use the wx* functions and types wherever possible instead of STL? (ex. wxFileExists vs std::filesystem::exists or wxString vs std::string).

I know the style guide says to prefer wx but I keep hearing that there's a QT rewrite planned and was wondering if that means there's less of a focus now on using the existing wx code?

@RedDevilus
Copy link
Contributor

On your location you can't fully avoid WX but if you can, sure.

@italodirenzo93 italodirenzo93 changed the title Add "Prune ISO list" option Add "Clear missing files" option to recent ISO list Nov 6, 2021
Copy link
Contributor

@lightningterror lightningterror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commits should be squashed and properly named with prefixes.

Copy link
Contributor

@lightningterror lightningterror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be tested.

@arcum42 arcum42 self-assigned this Dec 28, 2021
@arcum42
Copy link
Contributor

arcum42 commented Dec 28, 2021

Works properly, from what I can see.

@arcum42 arcum42 merged commit e50feb7 into PCSX2:master Dec 28, 2021
@italodirenzo93 italodirenzo93 deleted the prune_iso_list branch December 28, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants