From 555996a3cb0af16704543f1bfcf4de254453758a Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Sat, 1 Jan 2022 12:37:33 +0100 Subject: [PATCH] [BUG] File name is cut off if it contains a point (#282), version 1.2.0.8 --- Business/Menus.cs | 15 +++++++++------ DataClasses/RowData.cs | 11 +---------- Properties/AssemblyInfo.cs | 4 ++-- README.md | 3 ++- UserInterface/AppContextMenu.cs | 12 ++++++++---- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Business/Menus.cs b/Business/Menus.cs index e6b6104..4b03b52 100644 --- a/Business/Menus.cs +++ b/Business/Menus.cs @@ -470,8 +470,7 @@ namespace SystemTrayMenu.Business continue; } - RowData rowData = ReadRowData(directory, false); - rowData.ContainsMenu = true; + RowData rowData = ReadRowData(directory, false, true); rowData.HiddenEntry = hiddenEntry; string resolvedLnkPath = string.Empty; rowData.ReadIcon(true, ref resolvedLnkPath, level); @@ -524,12 +523,11 @@ namespace SystemTrayMenu.Business continue; } - RowData rowData = ReadRowData(file, false); + RowData rowData = ReadRowData(file, false, false); string resolvedLnkPath = string.Empty; if (rowData.ReadIcon(false, ref resolvedLnkPath, level)) { - rowData = ReadRowData(resolvedLnkPath, true, rowData); - rowData.ContainsMenu = true; + rowData = ReadRowData(resolvedLnkPath, true, true, rowData); rowData.HiddenEntry = hiddenEntry; } @@ -790,13 +788,14 @@ namespace SystemTrayMenu.Business } } - private static RowData ReadRowData(string fileName, bool isResolvedLnk, RowData rowData = null) + private static RowData ReadRowData(string fileName, bool isResolvedLnk, bool containsMenu, RowData rowData = null) { if (rowData == null) { rowData = new RowData(); } + rowData.ContainsMenu = containsMenu; rowData.IsResolvedLnk = isResolvedLnk; try @@ -811,6 +810,10 @@ namespace SystemTrayMenu.Business int directoryNameBegin = path.LastIndexOf(@"\", StringComparison.InvariantCulture) + 1; rowData.SetText(path[directoryNameBegin..]); } + else if (!rowData.ContainsMenu && Config.IsHideFileExtension()) + { + rowData.SetText(Path.GetFileNameWithoutExtension(rowData.FileInfo.Name)); + } else { rowData.SetText(rowData.FileInfo.Name); diff --git a/DataClasses/RowData.cs b/DataClasses/RowData.cs index c9d7a87..32f4afa 100644 --- a/DataClasses/RowData.cs +++ b/DataClasses/RowData.cs @@ -73,16 +73,7 @@ namespace SystemTrayMenu.DataClasses row[0] = data.icon; } - if (!ContainsMenu && - Config.IsHideFileExtension()) - { - row[1] = Path.GetFileNameWithoutExtension(data.text); - } - else - { - row[1] = data.text; - } - + row[1] = data.text; row[2] = data; } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 54ea503..ab3eb54 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -39,5 +39,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0.7")] -[assembly: AssemblyFileVersion("1.2.0.7")] +[assembly: AssemblyVersion("1.2.0.8")] +[assembly: AssemblyFileVersion("1.2.0.8")] diff --git a/README.md b/README.md index ca6dceb..080f99e 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Yes, you can select this option in the settings menu, that you can open by right **What can I do if I have a problem, idea or question?** If a problem has occured or you have any ideas or questions, you are welcome to contact us. -Create an issue or write us an email [Markus Hofknecht](Markus@Hofknecht.de) +[Create an issue](https://github.com/Hofknecht/SystemTrayMenu/issues/new/choose) or write us an email [Markus Hofknecht](Markus@Hofknecht.de) **Find more FAQ topics here:** [SystemTrayMenu FAQ](https://github.com/Hofknecht/SystemTrayMenu/issues?q=is%3Aissue+is%3Aclosed+label%3AFAQ) @@ -164,6 +164,7 @@ Thanks for ideas, reporting issues and contributing! #273 #274 [ParasiteDelta](https://github.com/ParasiteDelta), #275 #276 #278 [donaldaken](https://github.com/donaldaken), #277 Jan S., +#282 [akuznets](https://github.com/akuznets), Donations diff --git a/UserInterface/AppContextMenu.cs b/UserInterface/AppContextMenu.cs index 815bf15..b8b4648 100644 --- a/UserInterface/AppContextMenu.cs +++ b/UserInterface/AppContextMenu.cs @@ -89,15 +89,19 @@ namespace SystemTrayMenu.Helper // Thanks for letting me being part of this project and that I am allowed to be listed here :-) ab.AppMoreInfo += "Peter Kirmeier (mai" + "lto:top" + "ete" + "rk@f" + "reen" + "et." + "de)" + Environment.NewLine; - ab.AppMoreInfo += "French by Pascal Aloy (mailto:paloy@wanadoo.fr)" + Environment.NewLine; // #145 - ab.AppMoreInfo += "Dutch by HansieNL (https://github.com/HansieNL)" + Environment.NewLine; // #162 - ab.AppMoreInfo += "Portuguese (Brazil) by igorruckert (https://github.com/igorruckert)" + Environment.NewLine; // #163 - ab.AppMoreInfo += "http://www.hofknecht.eu/systemtraymenu/" + Environment.NewLine; ab.AppMoreInfo += "https://github.com/Hofknecht/SystemTrayMenu" + Environment.NewLine; ab.AppMoreInfo += Environment.NewLine; ab.AppMoreInfo += "GNU GENERAL PUBLIC LICENSE" + Environment.NewLine; ab.AppMoreInfo += "(Version 3, 29 June 2007)" + Environment.NewLine; + + ab.AppMoreInfo += "Thanks for ideas, reporting issues and contributing!" + Environment.NewLine; + ab.AppMoreInfo += "#123 Mordecai00, #125 Holgermh, #135 #153 #154 #164 jakkaas, #145 Pascal Aloy, #153 #158 #160 blackcrack,"; + ab.AppMoreInfo += "#162 HansieNL, #163 igorruckert, #171 kehoen, #186 Dtrieb, #188 #189 #191 #195 iJahangard, #195 #197 #238 the-phuctran, "; + ab.AppMoreInfo += "#205 kristofzerbe, #209 jonaskohl, #211 blacksparrow15, #220 Yavuz E., #229 #230 #239 Peter O., #231 Ryonez, "; + ab.AppMoreInfo += "#235 #242 243 #247, #271 Tom, #237 Torsten S., #240 video Patrick, #244 Gunter D., #246 MACE4GITHUB, #259 vanjac, "; + ab.AppMoreInfo += "#262 terencemcdonnell, #269 petersnows25, #272 Peter M., #273 #274 ParasiteDelta, #275 #276 #278 donaldaken, "; + ab.AppMoreInfo += "#277 Jan S., #282 akuznets," + Environment.NewLine; ab.AppDetailsButton = true; ab.ShowDialog(); }