Merge remote-tracking branch 'origin/dev' into fix_quickaccess_autocomplete

This commit is contained in:
Jeremy 2022-12-25 05:00:15 +11:00
commit 9f8b205b35
4 changed files with 16 additions and 25 deletions

View file

@ -64,7 +64,6 @@
<TextBlock
Grid.Column="0"
Margin="0,0,0,0"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource customQueryShortcut}"

View file

@ -66,7 +66,7 @@
<!-- Context menu items -->
<system:String x:Key="plugin_explorer_copypath">Copy path</system:String>
<system:String x:Key="plugin_explorer_copypath_subtitle">Copy path of current result to clipboard</system:String>
<system:String x:Key="plugin_explorer_copypath_subtitle">Copy path of current item to clipboard</system:String>
<system:String x:Key="plugin_explorer_copyfilefolder">Copy</system:String>
<system:String x:Key="plugin_explorer_copyfile_subtitle">Copy current file to clipboard</system:String>
<system:String x:Key="plugin_explorer_copyfolder_subtitle">Copy current folder to clipboard</system:String>
@ -78,7 +78,7 @@
<system:String x:Key="plugin_explorer_runasdifferentuser">Run as different user</system:String>
<system:String x:Key="plugin_explorer_runasdifferentuser_subtitle">Run the selected using a different user account</system:String>
<system:String x:Key="plugin_explorer_opencontainingfolder">Open containing folder</system:String>
<system:String x:Key="plugin_explorer_opencontainingfolder_subtitle">Opens the location that contains the item</system:String>
<system:String x:Key="plugin_explorer_opencontainingfolder_subtitle">Opens the location that contains current item</system:String>
<system:String x:Key="plugin_explorer_openwitheditor">Open With Editor:</system:String>
<system:String x:Key="plugin_explorer_openwitheditor_error">Failed to open file at {0} with Editor {1} at {2}</system:String>
<system:String x:Key="plugin_explorer_openwithshell">Open With Shell:</system:String>
@ -89,7 +89,7 @@
<system:String x:Key="plugin_explorer_openindexingoptions_subtitle">Manage indexed files and folders</system:String>
<system:String x:Key="plugin_explorer_openindexingoptions_errormsg">Failed to open Windows Indexing Options</system:String>
<system:String x:Key="plugin_explorer_add_to_quickaccess_title">Add to Quick Access</system:String>
<system:String x:Key="plugin_explorer_add_to_quickaccess_subtitle">Add current result to Quick Access</system:String>
<system:String x:Key="plugin_explorer_add_to_quickaccess_subtitle">Add current item to Quick Access</system:String>
<system:String x:Key="plugin_explorer_addfilefoldersuccess">Successfully Added</system:String>
<system:String x:Key="plugin_explorer_addfilefoldersuccess_detail">Successfully added to Quick Access</system:String>
<system:String x:Key="plugin_explorer_removefilefoldersuccess">Successfully Removed</system:String>
@ -97,8 +97,13 @@
<system:String x:Key="plugin_explorer_contextmenu_titletooltip">Add to Quick Access so it can be opened with Explorer's Search Activation action keyword</system:String>
<system:String x:Key="plugin_explorer_contextmenu_remove_titletooltip">Remove from Quick Access</system:String>
<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 result 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>
@ -130,6 +135,6 @@
<system:String x:Key="flowlauncher_plugin_everything_run_service">Click here to start it</system:String>
<system:String x:Key="flowlauncher_plugin_everything_installing_select">Unable to find an Everything installation, would you like to manually select a location?{0}{0}Click no and Everything will be automatically installed for you</system:String>
<system:String x:Key="flowlauncher_plugin_everything_enable_content_search">Do you want to enable content search for Everything?</system:String>
<system:String x:Key="flowlauncher_plugin_everything_enable_content_search_tips">"It can be very slow without index (which is only supported in Everything v1.5+)"</system:String>
<system:String x:Key="flowlauncher_plugin_everything_enable_content_search_tips">It can be very slow without index (which is only supported in Everything v1.5+)</system:String>
</ResourceDictionary>

View file

@ -114,7 +114,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);
@ -188,25 +190,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,

View file

@ -13,7 +13,6 @@
<system:String x:Key="flowlauncher_plugin_websearch_delete">삭제</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_edit">편집</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_add">추가</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enabled">사용</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_true">켬</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_false">Disabled</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_confirm">확인</system:String>
@ -36,7 +35,7 @@
<!-- web search edit -->
<system:String x:Key="flowlauncher_plugin_websearch_title">이름</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enabled">상태</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_enabled">사용</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_select_icon">아이콘 선택</system:String>
<system:String x:Key="flowlauncher_plugin_websearch_icon">아이콘</system:String>