From 4cb6b67080780263d30b9af5a69f02c9e1cdc343 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Wed, 25 Oct 2017 00:24:36 +0300 Subject: More correct SortRawTitle --- Apps/NesMiniApplication.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Apps') diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs index 8c6983be..33f59573 100644 --- a/Apps/NesMiniApplication.cs +++ b/Apps/NesMiniApplication.cs @@ -351,6 +351,9 @@ namespace com.clusterrr.hakchi_gui if (!hasUnsavedChanges) return false; Debug.WriteLine(string.Format("Saving application \"{0}\" as {1}", Name, Code)); Name = Regex.Replace(Name, @"'(\d)", @"`$1"); // Apostrophe + any number in game name crashes whole system. What. The. Fuck? + var sortRawTitle = Name.ToLower(); + if (sortRawTitle.StartsWith("the ")) + sortRawTitle = sortRawTitle.Substring(4); // Sorting without "THE" File.WriteAllText(ConfigPath, $"[Desktop Entry]\n" + $"Type=Application\n" + @@ -366,7 +369,7 @@ namespace com.clusterrr.hakchi_gui $"Simultaneous={(Simultaneous ? 1 : 0)}\n" + $"ReleaseDate={ReleaseDate ?? DefaultReleaseDate}\n" + $"SaveCount={SaveCount}\n" + - $"SortRawTitle={(Name ?? Code).ToLower()}\n" + + $"SortRawTitle={sortRawTitle}\n" + $"SortRawPublisher={(Publisher ?? DefaultPublisher).ToUpper()}\n" + $"Copyright=hakchi2 ©2017 Alexey 'Cluster' Avdyukhin\n"); -- cgit v1.2.3