mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
commit
5a5d407398
3 changed files with 10 additions and 18 deletions
|
|
@ -64,7 +64,6 @@
|
|||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource customQueryShortcut}"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,11 @@
|
|||
<system:String x:Key="plugin_explorer_remove_from_quickaccess_title">Remove from Quick Access</system:String>
|
||||
<system:String x:Key="plugin_explorer_remove_from_quickaccess_subtitle">Remove current item from Quick Access</system:String>
|
||||
<system:String x:Key="plugin_explorer_show_contextmenu_title">Show Windows Context Menu</system:String>
|
||||
|
||||
<!-- Special Results-->
|
||||
<system:String x:Key="plugin_explorer_diskfreespace">{0} free of {1}</system:String>
|
||||
<system:String x:Key="plugin_explorer_openresultfolder">Open in Default File Manager</system:String>
|
||||
<system:String x:Key="plugin_explorer_openresultfolder_subtitle">Use '>' to search in this directory, '*' to search for file extensions or '>*' to combine both searches.</system:String>
|
||||
|
||||
<!-- Everything -->
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sdk_issue">Failed to load Everything SDK</system:String>
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
var driveLetter = path[..1].ToUpper();
|
||||
var driveName = driveLetter + ":\\";
|
||||
DriveInfo drv = new DriveInfo(driveLetter);
|
||||
var subtitle = ToReadableSize(drv.AvailableFreeSpace, 2) + " free of " + ToReadableSize(drv.TotalSize, 2);
|
||||
var freespace = ToReadableSize(drv.AvailableFreeSpace, 2);
|
||||
var totalspace = ToReadableSize(drv.TotalSize, 2);
|
||||
var subtitle = string.Format(Context.API.GetTranslation("plugin_explorer_diskfreespace"), freespace, totalspace);
|
||||
double usingSize = (Convert.ToDouble(drv.TotalSize) - Convert.ToDouble(drv.AvailableFreeSpace)) / Convert.ToDouble(drv.TotalSize) * 100;
|
||||
|
||||
int? progressValue = Convert.ToInt32(usingSize);
|
||||
|
|
@ -170,25 +172,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
// Path passed from PathSearchAsync ends with Constants.DirectorySeperator ('\'), need to remove the seperator
|
||||
// so it's consistent with folder results returned by index search which does not end with one
|
||||
var folderPath = path.TrimEnd(Constants.DirectorySeperator);
|
||||
|
||||
var folderName = folderPath.TrimEnd(Constants.DirectorySeperator).Split(new[]
|
||||
{
|
||||
Path.DirectorySeparatorChar
|
||||
}, StringSplitOptions.None).Last();
|
||||
|
||||
var title = $"Open {folderName}";
|
||||
|
||||
var subtitleFolderName = folderName;
|
||||
|
||||
// ie. max characters can be displayed without subtitle cutting off: "Program Files (x86)"
|
||||
if (folderName.Length > 19)
|
||||
subtitleFolderName = "the directory";
|
||||
|
||||
return new Result
|
||||
{
|
||||
Title = title,
|
||||
SubTitle = $"Use > to search within {subtitleFolderName}, " +
|
||||
$"* to search for file extensions or >* to combine both searches.",
|
||||
Title = Context.API.GetTranslation("plugin_explorer_openresultfolder"),
|
||||
SubTitle = Context.API.GetTranslation("plugin_explorer_openresultfolder_subtitle"),
|
||||
AutoCompleteText = GetPathWithActionKeyword(folderPath, ResultType.Folder, actionKeyword),
|
||||
IcoPath = folderPath,
|
||||
Score = 500,
|
||||
|
|
|
|||
Loading…
Reference in a new issue