diff --git a/Flow.Launcher.Plugin/IPublicAPI.cs b/Flow.Launcher.Plugin/IPublicAPI.cs
index 0c1cd7bfd53..cd903898a3b 100644
--- a/Flow.Launcher.Plugin/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/IPublicAPI.cs
@@ -47,6 +47,13 @@ public interface IPublicAPI
///
void CheckForNewUpdate();
+ ///
+ /// Show the error message using Flow's standard error icon.
+ ///
+ /// Message title
+ /// Optional message subtitle
+ void ShowMsgError(string title, string subTitle = "");
+
///
/// Show message box
///
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 77902ecd9bc..edc3b9a3e36 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -84,6 +84,8 @@ public void SaveAppAllSettings()
public Task ReloadAllPluginData() => PluginManager.ReloadData();
+ public void ShowMsgError(string title, string subTitle = "") => ShowMsg(title, subTitle, Constant.ErrorIcon, true);
+
public void ShowMsg(string title, string subTitle = "", string iconPath = "") => ShowMsg(title, subTitle, iconPath, true);
public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
index 21eb844b449..c6bf7bcacaf 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
@@ -184,7 +184,7 @@ public List LoadContextMenus(Result selectedResult)
{
var message = $"Fail to delete {fileOrFolder} at {record.FullPath}";
LogException(message, e);
- Context.API.ShowMsg(message);
+ Context.API.ShowMsgError(message);
return false;
}
@@ -208,7 +208,7 @@ public List LoadContextMenus(Result selectedResult)
{
var name = "Plugin: Folder";
var message = $"File not found: {e.Message}";
- Context.API.ShowMsg(name, message);
+ Context.API.ShowMsgError(name, message);
}
return true;
@@ -236,7 +236,7 @@ private Result CreateOpenContainingFolderResult(SearchResult record)
{
var message = $"Fail to open file at {record.FullPath}";
LogException(message, e);
- Context.API.ShowMsg(message);
+ Context.API.ShowMsgError(message);
return false;
}
@@ -267,7 +267,7 @@ private Result CreateOpenWithEditorResult(SearchResult record)
{
var message = $"Failed to open editor for file at {record.FullPath}";
LogException(message, e);
- Context.API.ShowMsg(message);
+ Context.API.ShowMsgError(message);
return false;
}
},
@@ -326,7 +326,7 @@ private Result CreateOpenWindowsIndexingOptions()
{
var message = Context.API.GetTranslation("plugin_explorer_openindexingoptions_errormsg");
LogException(message, e);
- Context.API.ShowMsg(message);
+ Context.API.ShowMsgError(message);
return false;
}
},
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json
index f95befd561c..376c273d052 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json
@@ -7,7 +7,7 @@
"Name": "Explorer",
"Description": "Search and manage files and folders. Explorer utilises Windows Index Search",
"Author": "Jeremy Wu",
- "Version": "1.7.4",
+ "Version": "1.7.5",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",