Rename `IMainFormForTools.SetWindowText` to `UpdateWindowTitle`

in practice there is only one implementation and it just called the other method
(which is inherited from `FormBase`)
This commit is contained in:
YoshiRulz 2022-08-07 17:26:22 +10:00
parent a5a68af3f9
commit f228b01bdf
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
4 changed files with 10 additions and 18 deletions

View File

@ -89,9 +89,6 @@ namespace BizHawk.Client.EmuHawk
void SetMainformMovieInfo();
/// <remarks>only referenced from <see cref="TAStudio"/></remarks>
void SetWindowText();
bool StartNewMovie(IMovie movie, bool record);
/// <remarks>only referenced from <see cref="TAStudio"/></remarks>
@ -113,5 +110,8 @@ namespace BizHawk.Client.EmuHawk
/// <remarks>only referenced from <see cref="BookmarksBranchesBox"/></remarks>
void UpdateStatusSlots();
/// <remarks>only referenced from <see cref="TAStudio"/></remarks>
void UpdateWindowTitle();
}
}

View File

@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk
PlayRecordStatusButton.Visible = false;
}
SetWindowText();
UpdateWindowTitle();
UpdateStatusSlots();
}

View File

@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
{
private void MainForm_Load(object sender, EventArgs e)
{
SetWindowText();
UpdateWindowTitle();
foreach (var (groupLabel, appliesTo, coreNames) in Config.CorePickerUIData.Select(static tuple => (GroupLabel: tuple.AppliesTo[0], tuple.AppliesTo, tuple.CoreNames))
.OrderBy(static tuple => tuple.GroupLabel))
@ -461,15 +461,12 @@ namespace BizHawk.Client.EmuHawk
Sound?.StopSound();
};
Resize += (o, e) =>
{
SetWindowText();
};
Resize += (_, _) => UpdateWindowTitle();
ResizeEnd += (o, e) =>
{
_inResizeLoop = false;
SetWindowText();
UpdateWindowTitle();
if (_presentationPanel != null)
{
@ -1758,8 +1755,6 @@ namespace BizHawk.Client.EmuHawk
}
}
public void SetWindowText() => UpdateWindowTitle();
private void ClearAutohold()
{
ClearHolds();
@ -3284,10 +3279,7 @@ namespace BizHawk.Client.EmuHawk
OSD.Fps = fpsString;
// need to refresh window caption in this case
if (Config.DispSpeedupFeatures == 0)
{
SetWindowText();
}
if (Config.DispSpeedupFeatures is 0) UpdateWindowTitle();
}
private void InitializeFpsData()
@ -4018,7 +4010,7 @@ namespace BizHawk.Client.EmuHawk
private void OnRomChanged()
{
OSD.Fps = "0 fps";
SetWindowText();
UpdateWindowTitle();
HandlePlatformMenus();
_stateSlots.ClearRedoList();
UpdateStatusSlots();

View File

@ -806,7 +806,7 @@ namespace BizHawk.Client.EmuHawk
_autosaveTimer.Start();
}
MainForm.SetWindowText();
MainForm.UpdateWindowTitle();
});
}