Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Doc/app_missing_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions Flow.Launcher.Infrastructure/Constant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions Flow.Launcher.Infrastructure/Image/ImageLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down
Binary file added Flow.Launcher/Images/app_missing_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Flow.Launcher/ViewModel/ResultViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions SolutionAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
[assembly: AssemblyInformationalVersion("1.3.0")]
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '1.2.1.{build}'
version: '1.3.0.{build}'

init:
- ps: |
Expand Down