From 4c048779ce446457f51895f8caca13bdb81e5830 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Feb 2017 11:54:33 -0500 Subject: [PATCH] Fix downloader UI It now shoes the icon of the file it's downloading... and I just misspelled 'shows' as 'shoes' and don't feel like correcting it. --- ShiftOS.WinForms/Applications/Shiftnet.cs | 2 -- ShiftOS.WinForms/Program.cs | 4 ++++ ShiftOS_TheReturn/FileSkimmerBackend.cs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ShiftOS.WinForms/Applications/Shiftnet.cs b/ShiftOS.WinForms/Applications/Shiftnet.cs index d89b55a..2425910 100644 --- a/ShiftOS.WinForms/Applications/Shiftnet.cs +++ b/ShiftOS.WinForms/Applications/Shiftnet.cs @@ -103,8 +103,6 @@ namespace ShiftOS.WinForms.Applications public void ShiftnetNavigate(string Url, bool pushHistory = true) { - - if (Url.EndsWith(".rnp") || !Url.Contains(".")) { if (!string.IsNullOrEmpty(CurrentUrl) && pushHistory) diff --git a/ShiftOS.WinForms/Program.cs b/ShiftOS.WinForms/Program.cs index ad6c772..0ed5b02 100644 --- a/ShiftOS.WinForms/Program.cs +++ b/ShiftOS.WinForms/Program.cs @@ -159,5 +159,9 @@ namespace ShiftOS.WinForms } + public Image GetImage(string path) + { + return Applications.FileSkimmer.GetImage(FileSkimmerBackend.GetFileType(path)); + } } } diff --git a/ShiftOS_TheReturn/FileSkimmerBackend.cs b/ShiftOS_TheReturn/FileSkimmerBackend.cs index 8030a6e..6e2f6be 100644 --- a/ShiftOS_TheReturn/FileSkimmerBackend.cs +++ b/ShiftOS_TheReturn/FileSkimmerBackend.cs @@ -131,7 +131,7 @@ namespace ShiftOS.Engine public static System.Drawing.Image GetImage(string filepath) { - return new Bitmap(42, 42); + return _fs.GetImage(filepath); } } @@ -143,6 +143,7 @@ namespace ShiftOS.Engine void OpenFile(string filepath); void GetPath(string[] filetypes, FileOpenerStyle style, Action callback); void OpenDirectory(string path); + Image GetImage(string path); }