diff --git a/Doc/app_missing_img.png b/Doc/app_missing_img.png new file mode 100644 index 00000000000..11d5466f029 Binary files /dev/null and b/Doc/app_missing_img.png differ diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index a8c72fb122f..c6a3b48f364 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -23,8 +23,10 @@ public static class Constant public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion; public static readonly int ThumbnailSize = 64; - public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.png"); - public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.png"); + private static readonly string ImagesDirectory = Path.Combine(ProgramDirectory, "Images"); + public static readonly string DefaultIcon = Path.Combine(ImagesDirectory, "app.png"); + public static readonly string ErrorIcon = Path.Combine(ImagesDirectory, "app_error.png"); + public static readonly string MissingImgIcon = Path.Combine(ImagesDirectory, "app_missing_img.png"); public static string PythonPath; diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 0bf575337c7..5cf3d84a61c 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -38,7 +38,7 @@ public static void Initialize() _imageCache.Usage = LoadStorageToConcurrentDictionary(); - foreach (var icon in new[] { Constant.DefaultIcon, Constant.ErrorIcon }) + foreach (var icon in new[] { Constant.DefaultIcon, Constant.MissingImgIcon }) { ImageSource img = new BitmapImage(new Uri(icon)); img.Freeze(); @@ -106,7 +106,7 @@ private static ImageResult LoadInternal(string path, bool loadFullImage = false) { if (string.IsNullOrEmpty(path)) { - return new ImageResult(_imageCache[Constant.ErrorIcon], ImageType.Error); + return new ImageResult(_imageCache[Constant.MissingImgIcon], ImageType.Error); } if (_imageCache.ContainsKey(path)) { @@ -139,7 +139,7 @@ private static ImageResult LoadInternal(string path, bool loadFullImage = false) Log.Exception($"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e); Log.Exception($"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2); - ImageSource image = _imageCache[Constant.ErrorIcon]; + ImageSource image = _imageCache[Constant.MissingImgIcon]; _imageCache[path] = image; imageResult = new ImageResult(image, ImageType.Error); } @@ -191,8 +191,8 @@ private static ImageResult GetThumbnailResult(ref string path, bool loadFullImag } else { - image = _imageCache[Constant.ErrorIcon]; - path = Constant.ErrorIcon; + image = _imageCache[Constant.MissingImgIcon]; + path = Constant.MissingImgIcon; } if (type != ImageType.Error) diff --git a/Flow.Launcher/Images/app_missing_img.png b/Flow.Launcher/Images/app_missing_img.png new file mode 100644 index 00000000000..11d5466f029 Binary files /dev/null and b/Flow.Launcher/Images/app_missing_img.png differ diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index 4392234eba3..a4fe2ede4fc 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -51,7 +51,7 @@ public ImageSource Image catch (Exception e) { Log.Exception($"|ResultViewModel.Image|IcoPath is empty and exception when calling Icon() for result <{Result.Title}> of plugin <{Result.PluginDirectory}>", e); - imagePath = Constant.ErrorIcon; + imagePath = Constant.MissingImgIcon; } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index b8633f3571e..69e077ee2f6 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -536,7 +536,7 @@ private BitmapImage ImageFromPath(string path) ProgramLogger.LogException($"|UWP|ImageFromPath|{path}" + $"|Unable to get logo for {UserModelId} from {path} and" + $" located in {Package.Location}", new FileNotFoundException()); - return new BitmapImage(new Uri(Constant.ErrorIcon)); + return new BitmapImage(new Uri(Constant.MissingImgIcon)); } } @@ -586,7 +586,7 @@ private ImageSource PlatedImage(BitmapImage image) $"|Unable to convert background string {BackgroundColor} " + $"to color for {Package.Location}", new InvalidOperationException()); - return new BitmapImage(new Uri(Constant.ErrorIcon)); + return new BitmapImage(new Uri(Constant.MissingImgIcon)); } } else diff --git a/SolutionAssemblyInfo.cs b/SolutionAssemblyInfo.cs index c7c8812f236..5591de39c9f 100644 --- a/SolutionAssemblyInfo.cs +++ b/SolutionAssemblyInfo.cs @@ -16,6 +16,6 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("1.2.1")] -[assembly: AssemblyFileVersion("1.2.1")] -[assembly: AssemblyInformationalVersion("1.2.1")] \ No newline at end of file +[assembly: AssemblyVersion("1.3.0")] +[assembly: AssemblyFileVersion("1.3.0")] +[assembly: AssemblyInformationalVersion("1.3.0")] \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 703f1cb0001..f3bc7cce364 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: '1.2.1.{build}' +version: '1.3.0.{build}' init: - ps: |