Fixed some more case sensitivity issues in file dialogs on Linux. Fixes #872

This commit is contained in:
biwa 2023-04-22 22:29:15 +02:00
parent 86f1532a9f
commit f7d767c115
2 changed files with 30 additions and 10 deletions

View file

@ -1525,7 +1525,12 @@ namespace CodeImp.DoomBuilder
// Show save as dialog
SaveFileDialog savefile = new SaveFileDialog();
#if NO_WIN32
// No easy way to have case-insesitivity for non-Windows platforms
savefile.Filter = "Doom WAD Files (*.wad)|*.wad;*.Wad;*.wAd;*.WAd;*.waD;*.WaD;*.wAD;*.WAD";
#else
savefile.Filter = "Doom WAD Files (*.wad)|*.wad";
#endif
savefile.Title = "Save Map As";
savefile.AddExtension = true;
savefile.CheckPathExists = true;
@ -1613,7 +1618,12 @@ namespace CodeImp.DoomBuilder
// Show save as dialog
SaveFileDialog savefile = new SaveFileDialog();
#if NO_WIN32
// No easy way to have case-insesitivity for non-Windows platforms
savefile.Filter = "Doom WAD Files (*.wad)|*.wad;*.Wad;*.wAd;*.WAd;*.waD;*.WaD;*.wAD;*.WAD";
#else
savefile.Filter = "Doom WAD Files (*.wad)|*.wad";
#endif
savefile.Title = "Save Map Into";
savefile.AddExtension = true;
savefile.CheckPathExists = true;

View file

@ -83,6 +83,16 @@ namespace CodeImp.DoomBuilder.Windows
// Initialize
InitializeComponent();
#if NO_WIN32
// No easy way to have case-insesitivity for non-Windows platforms
wadfiledialog.Filter = "Doom WAD Files (*.wad)|*.wad;*.Wad;*.wAd;*.WAd;*.waD;*.WaD;*.wAD;*.WAD";
pk3filedialog.Filter = "Doom PK3/PK7 Files (*.pk3;*.pk7;*.ipk3;*.ipk7)|" +
"*.pk3;*.Pk3;*.pK3;*.PK3;" +
"*.pk7;*.Pk7;*.pK7;*.PK7;" +
"*.ipk3;*.iPk3;*.ipK3;*.iPK3;*.Ipk3;*.IPk3;*.IpK3;*.IPK3;" +
"*.ipk7;*.iPk7;*.ipK7;*.iPK7;*.Ipk7;*.IPk7;*.IpK7;*.IPK7";
#endif
// Set caption
this.Text = caption;
@ -129,9 +139,9 @@ namespace CodeImp.DoomBuilder.Windows
public static List<string> CheckRequiredArchives(GameConfiguration config, DataLocation loc, CancellationToken token)
{
#if DEBUG
#if DEBUG
General.WriteLogLine(string.Format("CheckRequiredArchives (Config = {0})", config?.Name));
#endif
#endif
if (config == null)
return new List<string>();
@ -205,10 +215,10 @@ namespace CodeImp.DoomBuilder.Windows
classes.Add(cls.ToLowerInvariant());
}
#if DEBUG
#if DEBUG
if (zscript.HasError)
General.WriteLogLine(string.Format("CRA({0}): ZScript error: {1}", loc.location, zscript.ErrorDescription));
#endif
#endif
// load DECORATE
var decorate = new DecorateParser(zscript.AllActorsByClass) {
@ -240,17 +250,17 @@ namespace CodeImp.DoomBuilder.Windows
classes.Add(cls.ToLowerInvariant());
}
#if DEBUG
#if DEBUG
if (decorate.HasError)
General.WriteLogLine(string.Format("CRA({0}): DECORATE error: {1}", loc.location, decorate.ErrorDescription));
#endif
#endif
}
if (!classes.Contains(e.Class.ToLowerInvariant()))
{
#if DEBUG
#if DEBUG
General.WriteLogLine(string.Format("CRA({2}): Does not contain class: {1} <- {0}", string.Join(",", classes), e.Class, loc.location));
#endif
#endif
found = false;
break;
}
@ -258,9 +268,9 @@ namespace CodeImp.DoomBuilder.Windows
if (e.Lump != null && !dr.FileExists(e.Lump))
{
#if DEBUG
#if DEBUG
General.WriteLogLine(string.Format("CRA({1}): Does not contain lump: {0}", e.Lump, loc.location));
#endif
#endif
found = false;
break;
}