Don't offer to remove a recent menu item if the list is frozen

This commit is contained in:
adelikat 2014-08-02 23:03:29 +00:00
parent 3c39a91977
commit 9de16f8af3
1 changed files with 10 additions and 3 deletions

View File

@ -53,10 +53,17 @@ namespace BizHawk.Client.EmuHawk.ToolExtensions
public static void HandleLoadError(this RecentFiles recent, string path)
{
GlobalWin.Sound.StopSound();
var result = MessageBox.Show("Could not open " + path + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (result == DialogResult.Yes)
if (recent.Frozen)
{
recent.Remove(path);
var result = MessageBox.Show("Could not open " + path, "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
var result = MessageBox.Show("Could not open " + path + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (result == DialogResult.Yes)
{
recent.Remove(path);
}
}
GlobalWin.Sound.StartSound();