From ab206c09091feef79f91721f3e5f135379d38d3d Mon Sep 17 00:00:00 2001 From: Paul Sladen Date: Sun, 5 Apr 2009 20:56:07 +0300 Subject: [PATCH] * Don't display hidden .files and .folders in ListViews --- debian/changelog | 1 + openBVE/OpenBve/formMain.cs | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/debian/changelog b/debian/changelog index cd7749c..882bedd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ openbve (1.0.2.0-0buntu1) unreleased; urgency=low * Update 'openbve-data' Depends: >= 1.0.2.0+dfsg * Load timetables relative to route directory, not trainpath + disable spurious Train folder warning message, as existance is not required later + * Don't display hidden .files and .folders in ListViews -- Paul Sladen Sun, 05 Apr 2009 12:33:10 +0000 diff --git a/openBVE/OpenBve/formMain.cs b/openBVE/OpenBve/formMain.cs index a52fa0b..b5f8836 100644 --- a/openBVE/OpenBve/formMain.cs +++ b/openBVE/OpenBve/formMain.cs @@ -996,6 +996,7 @@ namespace OpenBve { Array.Sort(Folders); for (int i = 0; i < Folders.Length; i++) { string Name = System.IO.Path.GetFileName(Folders[i]); + if (Name[0] == '.') continue; if (Name.Length == 0) Name = Folders[i]; ListViewItem Item = listviewRouteFiles.Items.Add(Name); Item.ImageKey = "folder"; @@ -1012,6 +1013,7 @@ namespace OpenBve { case ".rw": case ".csv": string Name = System.IO.Path.GetFileName(Files[i]); + if (Name[0] == '.') continue; if (Name.Length == 0) Name = Files[i]; ListViewItem Item = listviewRouteFiles.Items.Add(Name); Item.ImageKey = "route"; @@ -1176,6 +1178,7 @@ namespace OpenBve { try { string File = Interface.GetCombinedFileName(Folders[i], "train.dat"); string Name = System.IO.Path.GetFileName(Folders[i]); + if (Name[0] == '.') continue; if (Name.Length == 0) Name = Folders[i]; ListViewItem Item = listviewTrainFolders.Items.Add(Name); if (System.IO.File.Exists(File)) { -- 1.6.0.4