mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge remote-tracking branch 'origin/dev' into add_windows_settings_plugin
This commit is contained in:
commit
a701b48511
15 changed files with 361 additions and 115 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
|
@ -28,6 +28,11 @@ namespace Flow.Launcher.Core.Plugin
|
|||
var path = Path.Combine(Constant.ProgramDirectory, JsonRPC);
|
||||
_startInfo.EnvironmentVariables["PYTHONPATH"] = path;
|
||||
|
||||
_startInfo.EnvironmentVariables["FLOW_VERSION"] = Constant.Version;
|
||||
_startInfo.EnvironmentVariables["FLOW_PROGRAM_DIRECTORY"] = Constant.ProgramDirectory;
|
||||
_startInfo.EnvironmentVariables["FLOW_APPLICATION_DIRECTORY"] = Constant.ApplicationDirectory;
|
||||
|
||||
|
||||
//Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable
|
||||
_startInfo.ArgumentList.Add("-B");
|
||||
}
|
||||
|
|
@ -57,4 +62,4 @@ namespace Flow.Launcher.Core.Plugin
|
|||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ namespace Flow.Launcher.Plugin
|
|||
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
|
||||
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
|
||||
void ShellRun(string cmd, string filename = "cmd.exe");
|
||||
|
||||
/// <summary>
|
||||
/// Copy Text to clipboard
|
||||
/// </summary>
|
||||
/// <param name="Text">Text to save on clipboard</param>
|
||||
public void CopyToClipboard(string text);
|
||||
|
||||
/// <summary>
|
||||
/// Save everything, all of Flow Launcher and plugins' data and settings
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ namespace Flow.Launcher
|
|||
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
|
||||
ShellCommand.Execute(startInfo);
|
||||
}
|
||||
|
||||
public void CopyToClipboard(string text)
|
||||
{
|
||||
Clipboard.SetDataObject(text);
|
||||
}
|
||||
|
||||
public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible;
|
||||
|
||||
|
|
@ -222,4 +227,4 @@ namespace Flow.Launcher
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,132 @@
|
|||
<Window x:Class="Flow.Launcher.Plugin.Program.AddProgramSource"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
Width="400"
|
||||
Height="130"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<Window
|
||||
x:Class="Flow.Launcher.Plugin.Program.AddProgramSource"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{DynamicResource flowlauncher_plugin_program_directory}"
|
||||
Width="400"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="BtnCancel_OnClick"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,12,26,0">
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_directory}"
|
||||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,10" Orientation="Horizontal">
|
||||
<TextBox
|
||||
Name="Directory"
|
||||
Width="268"
|
||||
Margin="0,7"
|
||||
VerticalAlignment="Center" />
|
||||
<Button
|
||||
Width="70"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="BrowseButton_Click"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_browse}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Width="100"
|
||||
Margin="0,0,5,0"
|
||||
Click="BtnCancel_OnClick"
|
||||
Content="{DynamicResource cancel}" />
|
||||
|
||||
<Button
|
||||
Width="100"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Click="ButtonAdd_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_update}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
<!--
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource flowlauncher_plugin_program_directory}" Margin="15,10"/>
|
||||
<TextBox Name="Directory" VerticalAlignment="Center" Width="278" Margin="10,7" />
|
||||
<Label Margin="15,10" Content="{DynamicResource flowlauncher_plugin_program_directory}" />
|
||||
<TextBox
|
||||
Name="Directory"
|
||||
Width="278"
|
||||
Margin="10,7"
|
||||
VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="BrowseButton_Click" Content="{DynamicResource flowlauncher_plugin_program_browse}"
|
||||
HorizontalAlignment="Right" Margin="10" Height="31" Width="70" />
|
||||
<Button Click="ButtonAdd_OnClick" Content="{DynamicResource flowlauncher_plugin_program_update}"
|
||||
HorizontalAlignment="Right" Margin="10" Height="31" Width="70" />
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
Width="70"
|
||||
Height="31"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="BrowseButton_Click"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_browse}" />
|
||||
<Button
|
||||
Width="70"
|
||||
Height="31"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="ButtonAdd_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_update}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
-->
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ namespace Flow.Launcher.Plugin.Program
|
|||
}
|
||||
}
|
||||
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ButtonAdd_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string s = Directory.Text;
|
||||
|
|
|
|||
|
|
@ -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,12 +17,14 @@
|
|||
<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_description">Enable Program Description</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_enable_hidelnkpath">Hide app 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">Search in 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>
|
||||
<system:String x:Key="flowlauncher_plugin_program_max_depth_header">Max Depth</system:String>
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_program_directory">Directory:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_directory">Directory</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_browse">Browse</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_file_suffixes">File Suffixes:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_max_search_depth">Maximum Search Depth (-1 is unlimited):</system:String>
|
||||
|
|
@ -30,8 +33,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_program_delete_program_source">Are you sure you want to delete the selected program sources?</system:String>
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_program_update">OK</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_only_index_tip">Flow Launcher will only index files that end with the following suffixes:</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_split_by_tip">(Each suffix should split by ';' )</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_only_index_tip">Flow Launcher will only index files that end with the following suffixes. (Each suffix should split by ';' )</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_update_file_suffixes">Successfully updated file suffixes</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_program_suffixes_cannot_empty">File suffixes can't be empty</system:String>
|
||||
|
||||
|
|
@ -50,7 +52,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>
|
||||
|
|
|
|||
|
|
@ -147,10 +147,15 @@ namespace Flow.Launcher.Plugin.Program
|
|||
var t1 = Task.Run(IndexWin32Programs);
|
||||
var t2 = Task.Run(IndexUwpPrograms);
|
||||
await Task.WhenAll(t1, t2).ConfigureAwait(false);
|
||||
ResetCache();
|
||||
_settings.LastIndexTime = DateTime.Today;
|
||||
}
|
||||
|
||||
internal static void ResetCache()
|
||||
{
|
||||
var oldCache = cache;
|
||||
cache = new MemoryCache(cacheOptions);
|
||||
oldCache.Dispose();
|
||||
_settings.LastIndexTime = DateTime.Today;
|
||||
}
|
||||
|
||||
public Control CreateSettingPanel()
|
||||
|
|
|
|||
|
|
@ -1,19 +1,101 @@
|
|||
<Window x:Class="Flow.Launcher.Plugin.Program.ProgramSuffixes"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
Width="400"
|
||||
Height="180"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
d:DesignHeight="400" d:DesignWidth="300">
|
||||
<StackPanel>
|
||||
<TextBlock Margin="10 10 0 0" Foreground="Gray" Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}" />
|
||||
<TextBlock Margin="10 10 0 0" Foreground="Gray" Text="{DynamicResource flowlauncher_plugin_program_split_by_tip}" />
|
||||
<TextBox x:Name="tbSuffixes" Margin="10"/>
|
||||
<Button HorizontalAlignment="Right" Height="30" Width="80" Click="ButtonBase_OnClick" Margin="0 0 10 0" Content="{DynamicResource flowlauncher_plugin_program_update}" />
|
||||
</StackPanel>
|
||||
<Window
|
||||
x:Class="Flow.Launcher.Plugin.Program.ProgramSuffixes"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{DynamicResource flowlauncher_plugin_program_suffixes}"
|
||||
Width="400"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
ResizeMode="NoResize"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="BtnCancel_OnClick"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="26,12,26,0">
|
||||
<StackPanel Margin="0,0,0,12">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_suffixes}"
|
||||
TextAlignment="Left" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
FontSize="14"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_only_index_tip}"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox x:Name="tbSuffixes" Margin="0,20,0,20" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnCancel"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="0,0,5,0"
|
||||
Click="BtnCancel_OnClick"
|
||||
Content="{DynamicResource cancel}" />
|
||||
|
||||
<Button
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Click="ButtonBase_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_update}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ namespace Flow.Launcher.Plugin.Program
|
|||
_settings = settings;
|
||||
tbSuffixes.Text = string.Join(Settings.SuffixSeperator.ToString(), _settings.ProgramSuffixes);
|
||||
}
|
||||
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var suffixes = tbSuffixes.Text.Split(Settings.SuffixSeperator, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var result = new Result
|
||||
{
|
||||
Title = title,
|
||||
SubTitle = Package.Location,
|
||||
SubTitle = Main._settings.HideAppsPath ? string.Empty : Package.Location,
|
||||
Icon = Logo,
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var result = new Result
|
||||
{
|
||||
Title = title,
|
||||
SubTitle = LnkResolvedPath ?? FullPath,
|
||||
SubTitle = Main._settings.HideAppsPath ? string.Empty : LnkResolvedPath ?? FullPath,
|
||||
IcoPath = IcoPath,
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
|
|
|
|||
|
|
@ -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 HideAppsPath { get; set; } = true;
|
||||
public bool EnableRegistrySource { get; set; } = true;
|
||||
public string CustomizedExplorer { get; set; } = Explorer;
|
||||
public string CustomizedArgs { get; set; } = ExplorerArgs;
|
||||
|
|
|
|||
|
|
@ -5,75 +5,110 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:program="clr-namespace:Flow.Launcher.Plugin.Program"
|
||||
Height="450"
|
||||
d:DesignHeight="404.508"
|
||||
d:DesignWidth="600"
|
||||
Height="520"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
mc:Ignorable="d">
|
||||
<Grid Margin="20">
|
||||
<Grid Margin="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="170" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="60" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Horizontal">
|
||||
Orientation="Vertical">
|
||||
<StackPanel Width="Auto" Orientation="Vertical">
|
||||
<CheckBox
|
||||
Name="StartMenuEnabled"
|
||||
Margin="5"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_index_start}"
|
||||
IsChecked="{Binding EnableStartMenuSource}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" />
|
||||
<CheckBox
|
||||
Name="RegistryEnabled"
|
||||
Margin="5"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_index_registry}"
|
||||
IsChecked="{Binding EnableRegistrySource}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" />
|
||||
<CheckBox
|
||||
Name="DescriptionEnabled"
|
||||
Margin="5"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_enable_description}"
|
||||
IsChecked="{Binding EnableDescription}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" />
|
||||
<StackPanel Width="Auto" Orientation="Horizontal">
|
||||
<CheckBox
|
||||
Name="StartMenuEnabled"
|
||||
Width="200"
|
||||
Margin="70,8,10,8"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_index_start}"
|
||||
IsChecked="{Binding EnableStartMenuSource}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" />
|
||||
<CheckBox
|
||||
Name="RegistryEnabled"
|
||||
Margin="70,8,10,8"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_index_registry}"
|
||||
IsChecked="{Binding EnableRegistrySource}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" />
|
||||
</StackPanel>
|
||||
|
||||
<Separator
|
||||
Height="1"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1" />
|
||||
<StackPanel Width="Auto" Orientation="Horizontal">
|
||||
<CheckBox
|
||||
Name="HideLnkEnabled"
|
||||
Width="200"
|
||||
Margin="70,8,10,8"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_enable_hidelnkpath}"
|
||||
IsChecked="{Binding HideAppsPath}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_enable_hidelnkpath_tooltip}" />
|
||||
<CheckBox
|
||||
Name="DescriptionEnabled"
|
||||
Margin="70,8,10,8"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_enable_description}"
|
||||
IsChecked="{Binding EnableDescription}"
|
||||
ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" />
|
||||
</StackPanel>
|
||||
<Separator
|
||||
Height="1"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
BorderThickness="1" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Width="Auto"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="10,6,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnLoadAllProgramSource"
|
||||
Width="100"
|
||||
Height="31"
|
||||
Margin="10"
|
||||
Width="120"
|
||||
Margin="10,10,5,10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="btnLoadAllProgramSource_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_all_programs}" />
|
||||
<Button
|
||||
x:Name="btnProgramSuffixes"
|
||||
Width="100"
|
||||
Height="31"
|
||||
Margin="10"
|
||||
Width="120"
|
||||
Margin="5,10,5,10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="BtnProgramSuffixes_OnClick"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_suffixes}" />
|
||||
<Button
|
||||
x:Name="btnReindex"
|
||||
Width="100"
|
||||
Height="31"
|
||||
Margin="10"
|
||||
Width="120"
|
||||
Margin="5,10,5,10"
|
||||
HorizontalAlignment="Right"
|
||||
Click="btnReindex_Click"
|
||||
Content="{DynamicResource flowlauncher_plugin_program_reindex}" />
|
||||
<StackPanel
|
||||
x:Name="indexingPanel"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Hidden">
|
||||
<ProgressBar
|
||||
x:Name="progressBarIndexing"
|
||||
Width="80"
|
||||
Height="20"
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0" />
|
||||
<TextBlock
|
||||
Height="20"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_indexing}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<ListView
|
||||
x:Name="programSourceView"
|
||||
Grid.Row="1"
|
||||
Margin="0,13,0,10"
|
||||
Margin="20,0,20,0"
|
||||
AllowDrop="True"
|
||||
BorderBrush="DarkGray"
|
||||
BorderThickness="1"
|
||||
|
|
@ -81,14 +116,7 @@
|
|||
Drop="programSourceView_Drop"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"
|
||||
PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp"
|
||||
SelectionMode="Extended"
|
||||
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<EventSetter Event="PreviewMouseUp" Handler="Row_OnClick" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
SelectionMode="Extended">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="150" Header="Name">
|
||||
|
|
@ -121,25 +149,7 @@
|
|||
<DockPanel
|
||||
Grid.Row="2"
|
||||
Grid.RowSpan="1"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel
|
||||
x:Name="indexingPanel"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Hidden">
|
||||
<ProgressBar
|
||||
x:Name="progressBarIndexing"
|
||||
Width="80"
|
||||
Height="20"
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0" />
|
||||
<TextBlock
|
||||
Height="20"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{DynamicResource flowlauncher_plugin_program_indexing}" />
|
||||
</StackPanel>
|
||||
Margin="0,0,20,10">
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnProgramSourceStatus"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,20 @@ namespace Flow.Launcher.Plugin.Program.Views
|
|||
public bool EnableDescription
|
||||
{
|
||||
get => _settings.EnableDescription;
|
||||
set => _settings.EnableDescription = value;
|
||||
set
|
||||
{
|
||||
Main.ResetCache();
|
||||
_settings.EnableDescription = value;
|
||||
}
|
||||
}
|
||||
public bool HideAppsPath
|
||||
{
|
||||
get => _settings.HideAppsPath;
|
||||
set
|
||||
{
|
||||
Main.ResetCache();
|
||||
_settings.HideAppsPath = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnableRegistrySource
|
||||
|
|
@ -105,7 +118,6 @@ namespace Flow.Launcher.Plugin.Program.Views
|
|||
private async void ReIndexing()
|
||||
{
|
||||
ViewRefresh();
|
||||
|
||||
indexingPanel.Visibility = Visibility.Visible;
|
||||
await Main.IndexPrograms();
|
||||
indexingPanel.Visibility = Visibility.Hidden;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "Program",
|
||||
"Description": "Search programs in Flow.Launcher",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.7.0",
|
||||
"Version": "1.8.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",
|
||||
|
|
|
|||
Loading…
Reference in a new issue