Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal static List<Result> AccessLinkListMatched(Query query, IEnumerable<Acce
{
ResultType.Volume => ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore),
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore, name: l.Name),
_ => throw new ArgumentOutOfRangeException()
})
.ToList();
Expand All @@ -35,7 +35,7 @@ internal static List<Result> AccessLinkListAll(Query query, IEnumerable<AccessLi
{
ResultType.Volume => ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore),
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore, name: l.Name),
_ => throw new ArgumentOutOfRangeException()
}).ToList();
}
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
}
catch (Exception ex)
{
Context.API.ShowMsgBox(ex.Message, Localize.plugin_explorer_opendir_error());

Check warning on line 141 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)

Check warning on line 141 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 @@ -153,7 +153,7 @@
}
catch (Exception ex)
{
Context.API.ShowMsgBox(ex.Message, Localize.plugin_explorer_opendir_error());

Check warning on line 156 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)

Check warning on line 156 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 Down Expand Up @@ -188,10 +188,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 191 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 191 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 192 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 192 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 = Localize.plugin_explorer_diskfreespace(freespace, totalspace);

Check warning on line 193 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)

Check warning on line 193 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 194 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 194 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 194 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 194 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 @@ -199,7 +199,7 @@
progressBarColor = "#da2626";

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

Check warning on line 202 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)

Check warning on line 202 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 @@ -263,7 +263,7 @@
return new Result
{
Title = Localize.plugin_explorer_openresultfolder(),
SubTitle = Localize.plugin_explorer_openresultfolder_subtitle(),

Check warning on line 266 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)

Check warning on line 266 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 All @@ -282,10 +282,10 @@
};
}

internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false)
internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false, string name = null)
{
var isMedia = IsMedia(Path.GetExtension(filePath));
var title = Path.GetFileName(filePath) ?? string.Empty;
var title = name ?? Path.GetFileName(filePath) ?? string.Empty;
var directory = Path.GetDirectoryName(filePath) ?? string.Empty;

/* Preview Detail */
Expand Down Expand Up @@ -399,7 +399,7 @@
}
}

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

Check warning on line 402 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)

Check warning on line 402 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 Localize.plugin_explorer_plugin_tooltip_more_info_volume(volumePath, freespace, totalspace, Environment.NewLine);
}
Expand Down
Loading