-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PCSX2-WX: Add clear list option to ISO Selector #2080
Conversation
Looks like you beat @ssakash to it 😆 Tested. Works properly. |
I'm wondering if it might be a good idea to remove/gray out the menu item when there are no ISOs present in the list. Any opinion? (Personally I'd prefer destroying and appending the item over graying it out using Turtleli was a bit faster than me on adding that |
I like your suggestion. If there are no isos then the button should disappear. Having it just grey out will make the list bigger for no reason when it's not needed. |
The original intent with the grayed out items was that you could put your ISOs on an external drive and plug it in or out, and you'll know when they're available. They should get out of the list anyway when you open new ISOs. But feel free to remove it. |
Please have the Separator lines between "Always ask when booting", |
Latest commit makes the list item and separator generate in time with the ISO list itself instead of the entire sub menu. One thing I would like to draw attention to is that doing so required |
@RedPanda4552 The recent ISO list is considered part of the mainframe. That's what all the Wx menu systems are based off of. Basically, it's necessary for compilation. |
That helps but also raises another question. Is there a known reason |
I think you need to include App.h instead of MainFrame.h since that's where the enum actually is. Anyway, the current behaviour isn't that nice if you clear the ISO list while a game is running. Test case:
|
8f2cb82
to
64b1a27
Compare
Latest commit should resolve. The CurrentIso field in the ini was being wiped regardless of running state, which when the CDVD plugin is pausing and resuming, would understandably cause problems. |
64b1a27
to
071a6d6
Compare
I think you can squash it if it's ready for merge. |
071a6d6
to
d692ba1
Compare
And squashed. |
pcsx2/gui/MainMenuClicks.cpp
Outdated
{ | ||
if (!SysHasValidState()) | ||
SysUpdateIsoSrcFile(""); | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/gui/RecentIsoList.cpp
Outdated
@@ -35,6 +36,8 @@ RecentIsoManager::RecentIsoManager( wxMenu* menu, int firstIdForMenuItems_or_wxI | |||
{ | |||
m_cursel = 0; | |||
m_Separator = NULL; | |||
m_ClearSeparator = NULL; | |||
m_Clear = NULL; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/gui/RecentIsoList.cpp
Outdated
@@ -119,6 +134,9 @@ void RecentIsoManager::Repopulate() | |||
// but the menu is composed in reverse order such that the most recent item appears at the top. | |||
for( int i=cnt-1; i>=0; --i ) | |||
InsertIntoMenu( i ); | |||
|
|||
m_ClearSeparator = m_Menu->AppendSeparator(); | |||
m_Clear = m_Menu->Append(MenuIdentifiers::MenuId_IsoClear, _("Clear ISO list"), _("Clear the ISO list to get rid of unwanted ISO files.")); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/gui/MainMenuClicks.cpp
Outdated
if (SysHasValidState()) | ||
dialog += dialog.Heading(_("(Your running ISO will remain in the list)")); | ||
|
||
bool confirmed = (pxIssueConfirmation(dialog, MsgButtons().Yes().Cancel()) != wxID_CANCEL); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/gui/MainMenuClicks.cpp
Outdated
dialog += dialog.Heading(_("This will clear your entire ISO list. Continue?")); | ||
|
||
if (SysHasValidState()) | ||
dialog += dialog.Heading(_("(Your running ISO will remain in the list)")); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
pcsx2/gui/MainMenuClicks.cpp
Outdated
|
||
if (confirmed) | ||
{ | ||
if (!SysHasValidState()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
5c5aace
to
4284097
Compare
Review changes made and squashed. |
pcsx2/gui/RecentIsoList.cpp
Outdated
@@ -99,6 +102,18 @@ void RecentIsoManager::RemoveAllFromMenu() | |||
m_Menu->Destroy( m_Separator ); | |||
m_Separator = NULL; | |||
} | |||
|
|||
if ( m_ClearSeparator != NULL ) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
4284097
to
ad39573
Compare
Code seems fine to me. The buttons being Yes+Cancel feels slightly odd (I generally expect Yes+No or Ok+Cancel) but maybe that's just me. |
ad39573
to
43091f4
Compare
pcsx2/gui/MainMenuClicks.cpp
Outdated
wxDialogWithHelpers dialog(this, _("Confirm clearing ISO list")); | ||
dialog += dialog.Heading(_("This will clear the ISO list. If an ISO is running it will remain in the list. Continue?")); | ||
|
||
bool confirmed = pxIssueConfirmation(dialog, MsgButtons().YesNo()) != wxID_CANCEL; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
43091f4
to
f572d95
Compare
Adds "Clear ISO List" option to ISO Selector (Issue #2071).
A look at the UI before clearing, with all my iso and bin files: https://i.imgur.com/YnPCAXQ.png
I was kind enough to give users an opportunity to change their mind: https://i.imgur.com/VUVo5l0.png
And after clearning: https://i.imgur.com/Wvsdzfn.png
Closes #2071