mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 14:00:21 +00:00
Add setting to not show changelog on update
This commit is contained in:
parent
7d27136bdc
commit
aa55346bde
3 changed files with 10 additions and 3 deletions
|
@ -259,7 +259,7 @@ namespace PKHeX.WinForms
|
||||||
showChangelog = false;
|
showChangelog = false;
|
||||||
|
|
||||||
// Version Check
|
// Version Check
|
||||||
if (Settings.Startup.Version.Length > 0) // already run on system
|
if (Settings.Startup.Version.Length > 0 && Settings.Startup.ShowChangelogOnUpdate) // already run on system
|
||||||
{
|
{
|
||||||
bool parsed = Version.TryParse(Settings.Startup.Version, out var lastrev);
|
bool parsed = Version.TryParse(Settings.Startup.Version, out var lastrev);
|
||||||
showChangelog = parsed && lastrev < CurrentProgramVersion;
|
showChangelog = parsed && lastrev < CurrentProgramVersion;
|
||||||
|
|
|
@ -118,6 +118,9 @@ namespace PKHeX.WinForms
|
||||||
[LocalizedDescription("Automatically Detect Save File on Program Startup")]
|
[LocalizedDescription("Automatically Detect Save File on Program Startup")]
|
||||||
public AutoLoadSetting AutoLoadSaveOnStartup { get; set; } = AutoLoadSetting.RecentBackup;
|
public AutoLoadSetting AutoLoadSaveOnStartup { get; set; } = AutoLoadSetting.RecentBackup;
|
||||||
|
|
||||||
|
[LocalizedDescription("Show the changelog when a new version of the program is run for the first time.")]
|
||||||
|
public bool ShowChangelogOnUpdate { get; set; } = true;
|
||||||
|
|
||||||
public List<string> RecentlyLoaded = new(MaxRecentCount);
|
public List<string> RecentlyLoaded = new(MaxRecentCount);
|
||||||
|
|
||||||
// Don't let invalid values slip into the startup version.
|
// Don't let invalid values slip into the startup version.
|
||||||
|
|
|
@ -229,8 +229,12 @@ namespace PKHeX.WinForms
|
||||||
public static void AddSaveFileExtensions(IEnumerable<string> exts)
|
public static void AddSaveFileExtensions(IEnumerable<string> exts)
|
||||||
{
|
{
|
||||||
// Only add new (unique) extensions
|
// Only add new (unique) extensions
|
||||||
var newExtensions = exts.Distinct().Except(CustomSaveExtensions);
|
var dest = CustomSaveExtensions;
|
||||||
CustomSaveExtensions.AddRange(newExtensions);
|
foreach (var ext in exts)
|
||||||
|
{
|
||||||
|
if (!dest.Contains(ext))
|
||||||
|
dest.Add(ext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly List<string> CustomSaveExtensions = new()
|
private static readonly List<string> CustomSaveExtensions = new()
|
||||||
|
|
Loading…
Reference in a new issue