mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add hide uwp/lnk path setting
This commit is contained in:
parent
5e57d73a4d
commit
8343bc761d
6 changed files with 48 additions and 9 deletions
|
|
@ -1,8 +1,9 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<!--Program setting-->
|
||||
<!-- Program setting -->
|
||||
<system:String x:Key="flowlauncher_plugin_program_delete">Delete</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_edit">Edit</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_add">Add</system:String>
|
||||
|
|
@ -16,6 +17,8 @@
|
|||
<system:String x:Key="flowlauncher_plugin_program_index_start_tooltip">When enabled, Flow will load programs from the start menu</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_index_registry">Index Registry</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_index_registry_tooltip">When enabled, Flow will load programs from the registry</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_enable_hidelnkpath">Hide Apps path</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_enable_hidelnkpath_tooltip">For executable files such as UWP or lnk, hide the file path from being visible</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_enable_description">Enable Program Description</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_enable_description_tooltip">Disabling this will also stop Flow from searching via the program desciption</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_suffixes_header">Suffixes</system:String>
|
||||
|
|
@ -50,7 +53,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_program_tooltip_customizedexplorer">You can customized the explorer used for opening the container folder by inputing the Environmental Variable of the explorer you want to use. It will be useful to use CMD to test whether the Environmental Variable is avaliable.</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_tooltip_args">Enter the customized args you want to add for your customized explorer. %s for parent directory, %f for full path (which only works for win32). Check the explorer's website for details.</system:String>
|
||||
|
||||
<!--Dialogs-->
|
||||
<!-- Dialogs -->
|
||||
<system:String x:Key="flowlauncher_plugin_program_disable_dlgtitle_success">Success</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_disable_dlgtitle_success_message">Successfully disabled this program from displaying in your query</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_run_as_administrator_not_supported_message">This app is not intended to be run as administrator</system:String>
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var result = new Result
|
||||
{
|
||||
Title = title,
|
||||
SubTitle = Package.Location,
|
||||
SubTitle = HideLnkPath(),
|
||||
Icon = Logo,
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
|
|
@ -351,6 +351,18 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
return result;
|
||||
}
|
||||
public string HideLnkPath()
|
||||
{
|
||||
bool lnkSetting = Main._settings.EnableHideLnkPath;
|
||||
if (lnkSetting)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return Package.Location;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Result> ContextMenus(IPublicAPI api)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var result = new Result
|
||||
{
|
||||
Title = title,
|
||||
SubTitle = LnkResolvedPath ?? FullPath,
|
||||
SubTitle = HideLnkPath(),
|
||||
IcoPath = IcoPath,
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
|
|
@ -545,5 +545,17 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
return UniqueIdentifier == other.UniqueIdentifier;
|
||||
}
|
||||
|
||||
public string HideLnkPath()
|
||||
{
|
||||
bool lnkSetting = Main._settings.EnableHideLnkPath;
|
||||
if (lnkSetting) {
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return LnkResolvedPath ?? FullPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,8 @@ namespace Flow.Launcher.Plugin.Program
|
|||
|
||||
public bool EnableStartMenuSource { get; set; } = true;
|
||||
|
||||
public bool EnableDescription { get; set; } = true;
|
||||
public bool EnableDescription { get; set; } = false;
|
||||
public bool EnableHideLnkPath { get; set; } = true;
|
||||
public bool EnableRegistrySource { get; set; } = true;
|
||||
public string CustomizedExplorer { get; set; } = Explorer;
|
||||
public string CustomizedArgs { get; set; } = ExplorerArgs;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
mc:Ignorable="d">
|
||||
<Grid Margin="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="165" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
|
|
@ -33,6 +33,12 @@
|
|||
Content="{DynamicResource flowlauncher_plugin_program_index_registry}"
|
||||
IsChecked="{Binding EnableRegistrySource}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" />
|
||||
<CheckBox
|
||||
Name="HideLnkEnabled"
|
||||
Margin="5"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_enable_hidelnkpath}"
|
||||
IsChecked="{Binding EnableHideLnkPath}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_enable_hidelnkpath_tooltip}" />
|
||||
<CheckBox
|
||||
Name="DescriptionEnabled"
|
||||
Margin="5"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ namespace Flow.Launcher.Plugin.Program.Views
|
|||
get => _settings.EnableDescription;
|
||||
set => _settings.EnableDescription = value;
|
||||
}
|
||||
public bool EnableHideLnkPath
|
||||
{
|
||||
get => _settings.EnableHideLnkPath;
|
||||
set => _settings.EnableHideLnkPath = value;
|
||||
}
|
||||
|
||||
public bool EnableRegistrySource
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue