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
7 changes: 7 additions & 0 deletions Flow.Launcher.Plugin/IPublicAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public interface IPublicAPI
/// </summary>
void CheckForNewUpdate();

/// <summary>
/// Show the error message using Flow's standard error icon.
/// </summary>
/// <param name="title">Message title</param>
/// <param name="subTitle">Optional message subtitle</param>
void ShowMsgError(string title, string subTitle = "");

/// <summary>
/// Show message box
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions Flow.Launcher/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public List<Result> 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;
}

Expand All @@ -208,7 +208,7 @@ public List<Result> 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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
},
Expand Down Expand Up @@ -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;
}
},
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.Explorer/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down