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(); void SetMainformMovieInfo();
/// <remarks>only referenced from <see cref="TAStudio"/></remarks>
void SetWindowText();
bool StartNewMovie(IMovie movie, bool record); bool StartNewMovie(IMovie movie, bool record);
/// <remarks>only referenced from <see cref="TAStudio"/></remarks> /// <remarks>only referenced from <see cref="TAStudio"/></remarks>
@ -113,5 +110,8 @@ namespace BizHawk.Client.EmuHawk
/// <remarks>only referenced from <see cref="BookmarksBranchesBox"/></remarks> /// <remarks>only referenced from <see cref="BookmarksBranchesBox"/></remarks>
void UpdateStatusSlots(); 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; PlayRecordStatusButton.Visible = false;
} }
SetWindowText(); UpdateWindowTitle();
UpdateStatusSlots(); UpdateStatusSlots();
} }

View File

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

View File

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