Skip to content
Merged
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
4 changes: 4 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
AutoCompleteText = GetAutoCompleteText(title, query, path, ResultType.Folder),
TitleHighlightData = Context.API.FuzzySearch(query.Search, title).MatchData,
CopyText = path,
Preview = new Result.PreviewInfo
{
FilePath = path,
},
PreviewPanel = new Lazy<UserControl>(() => new PreviewPanel(Settings, path, ResultType.Folder)),
Action = c =>
{
Expand Down Expand Up @@ -133,7 +137,7 @@
}
catch (Exception ex)
{
Context.API.ShowMsgBox(ex.Message, Context.API.GetTranslation("plugin_explorer_opendir_error"));

Check warning on line 140 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`opendir` is not a recognized word. (unrecognized-spelling)
return false;
}
}
Expand All @@ -148,7 +152,7 @@
}
catch (Exception ex)
{
Context.API.ShowMsgBox(ex.Message, Context.API.GetTranslation("plugin_explorer_opendir_error"));

Check warning on line 155 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`opendir` is not a recognized word. (unrecognized-spelling)
return false;
}
}
Expand All @@ -173,10 +177,10 @@
var title = string.Empty; // hide title when use progress bar,
var driveLetter = path[..1].ToUpper();
DriveInfo drv = new DriveInfo(driveLetter);
var freespace = ToReadableSize(drv.AvailableFreeSpace, 2);

Check warning on line 180 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`drv` is not a recognized word. (unrecognized-spelling)
var totalspace = ToReadableSize(drv.TotalSize, 2);

Check warning on line 181 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`drv` is not a recognized word. (unrecognized-spelling)
var subtitle = string.Format(Context.API.GetTranslation("plugin_explorer_diskfreespace"), freespace, totalspace);

Check warning on line 182 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`totalspace` is not a recognized word. (unrecognized-spelling)
double usingSize = (Convert.ToDouble(drv.TotalSize) - Convert.ToDouble(drv.AvailableFreeSpace)) / Convert.ToDouble(drv.TotalSize) * 100;

Check warning on line 183 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`drv` is not a recognized word. (unrecognized-spelling)

Check warning on line 183 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`drv` is not a recognized word. (unrecognized-spelling)

int? progressValue = Convert.ToInt32(usingSize);

Expand All @@ -184,7 +188,7 @@
progressBarColor = "#da2626";

var tooltip = Settings.DisplayMoreInformationInToolTip
? GetVolumeMoreInfoTooltip(path, freespace, totalspace)

Check warning on line 191 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`totalspace` is not a recognized word. (unrecognized-spelling)
: path;

return new Result
Expand Down Expand Up @@ -248,7 +252,7 @@
return new Result
{
Title = Context.API.GetTranslation("plugin_explorer_openresultfolder"),
SubTitle = Context.API.GetTranslation("plugin_explorer_openresultfolder_subtitle"),

Check warning on line 255 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`openresultfolder` is not a recognized word. (unrecognized-spelling)
AutoCompleteText = GetPathWithActionKeyword(folderPath, ResultType.Folder, actionKeyword),
IcoPath = folderPath,
Score = 500,
Expand Down Expand Up @@ -385,7 +389,7 @@
}
}

private static string GetVolumeMoreInfoTooltip(string volumePath, string freespace, string totalspace)

Check warning on line 392 in Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`totalspace` is not a recognized word. (unrecognized-spelling)
{
return string.Format(Context.API.GetTranslation("plugin_explorer_plugin_tooltip_more_info_volume"),
volumePath, freespace, totalspace, Environment.NewLine);
Expand Down
Loading