Skip to content

Commit 6dedb4f

Browse files
authored
Release 1.9.4 (#1287)
* Merge pull request #1205 from Flow-Launcher/fix_cmd_command_with_blank Fix shell cmd command with quote and space * Bump NuGet.CommandLine from 5.4.0 to 5.7.2 (#1241) * Merge pull request #1098 from Flow-Launcher/ScrollToSelectedPlugin Scroll to selected item when expanded or size changed * fix RemoveOldQueryResults NullPointerException (#1204) * Merge pull request #1005 from Flow-Launcher/KillProcess Use Cancellation Token to avoid potential race tracing issue * Merge pull request #1187 from Flow-Launcher/update_python_download_mirrors Update Python download mirrors * Merge pull request #1108 from Flow-Launcher/CalculatorDecimalSeparator Respect Decimal Separator for query not just result * Merge pull request #1087 from Flow-Launcher/turnoff_replace_win_r_shell Set Shell plugin's default replace Win R hotkey to off * Merge pull request #1077 from Flow-Launcher/fix_explorer_button_visibility Fix incorrect button visibility in Explorer's expander control * Merge pull request #1076 from Flow-Launcher/fix_path_search_with_index Fix the use of index in path search * Merge pull request #1071 from medlir/fix-browser-bookmarks-plugin-exception avoid exception in ChromiumBookmarkLoader.cs * Merge pull request #1056 from Flow-Launcher/fix_context_menu_typo Fix typo for plugin title in context menu and WindowsSettings name * Merge pull request #1119 from onesounds/antialising Remove All Cleartype Rendering * Version bump * Remove Calculator plugin CopyText feature for 1.9.4 release
1 parent 84a806b commit 6dedb4f

File tree

23 files changed

+266
-162
lines changed

23 files changed

+266
-162
lines changed

Flow.Launcher.Core/Flow.Launcher.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</ItemGroup>
5454

5555
<ItemGroup>
56-
<PackageReference Include="Droplex" Version="1.4.0" />
56+
<PackageReference Include="Droplex" Version="1.4.1" />
5757
<PackageReference Include="FSharp.Core" Version="5.0.2" />
5858
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.1.3" />
5959
<PackageReference Include="squirrel.windows" Version="1.5.2" />

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected string Execute(ProcessStartInfo startInfo)
241241
protected async Task<Stream> ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token = default)
242242
{
243243
Process process = null;
244-
bool disposed = false;
244+
using var exitTokenSource = new CancellationTokenSource();
245245
try
246246
{
247247
process = Process.Start(startInfo);
@@ -251,6 +251,7 @@ protected async Task<Stream> ExecuteAsync(ProcessStartInfo startInfo, Cancellati
251251
return Stream.Null;
252252
}
253253

254+
254255
await using var source = process.StandardOutput.BaseStream;
255256

256257
var buffer = BufferManager.GetStream();
@@ -259,7 +260,7 @@ protected async Task<Stream> ExecuteAsync(ProcessStartInfo startInfo, Cancellati
259260
{
260261
// ReSharper disable once AccessToModifiedClosure
261262
// Manually Check whether disposed
262-
if (!disposed && !process.HasExited)
263+
if (!exitTokenSource.IsCancellationRequested && !process.HasExited)
263264
process.Kill();
264265
});
265266

@@ -302,8 +303,8 @@ protected async Task<Stream> ExecuteAsync(ProcessStartInfo startInfo, Cancellati
302303
}
303304
finally
304305
{
306+
exitTokenSource.Cancel();
305307
process?.Dispose();
306-
disposed = true;
307308
}
308309
}
309310

Flow.Launcher/Flow.Launcher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
9292
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
9393
<PackageReference Include="NHotkey.Wpf" Version="2.1.0" />
94-
<PackageReference Include="NuGet.CommandLine" Version="5.4.0">
94+
<PackageReference Include="NuGet.CommandLine" Version="5.7.2">
9595
<PrivateAssets>all</PrivateAssets>
9696
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
9797
</PackageReference>

Flow.Launcher/Languages/en.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
5656

5757
<!-- Setting Plugin -->
58-
<system:String x:Key="plugin">Plugins</system:String>
58+
<system:String x:Key="plugin">Plugin</system:String>
5959
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
6060
<system:String x:Key="enable">On</system:String>
6161
<system:String x:Key="disable">Off</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,9 @@
927927
ScrollViewer.CanContentScroll="False"
928928
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
929929
SelectedItem="{Binding SelectedPlugin}"
930-
SnapsToDevicePixels="True">
930+
SelectionChanged="SelectedPluginChanged"
931+
SnapsToDevicePixels="True"
932+
Name="Plugins">
931933
<ListBox.ItemsPanel>
932934
<ItemsPanelTemplate>
933935
<StackPanel Margin="0,0,0,18" />
@@ -1116,7 +1118,8 @@
11161118
Margin="0"
11171119
Padding="1"
11181120
VerticalAlignment="Stretch"
1119-
Content="{Binding SettingControl}" />
1121+
Content="{Binding SettingControl}"
1122+
SizeChanged="ItemSizeChanged"/>
11201123
</StackPanel>
11211124

11221125
<StackPanel>

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
using System;
1414
using System.IO;
1515
using System.Windows;
16+
using System.Windows.Controls;
1617
using System.Windows.Forms;
1718
using System.Windows.Input;
1819
using System.Windows.Interop;
20+
using System.Windows.Media;
1921
using System.Windows.Navigation;
2022
using Button = System.Windows.Controls.Button;
2123
using Control = System.Windows.Controls.Control;
24+
using ListViewItem = System.Windows.Controls.ListViewItem;
2225
using MessageBox = System.Windows.MessageBox;
2326
using TextBox = System.Windows.Controls.TextBox;
2427
using ThemeManager = ModernWpf.ThemeManager;
@@ -44,6 +47,7 @@ public SettingWindow(IPublicAPI api, SettingWindowViewModel viewModel)
4447
}
4548

4649
#region General
50+
4751
private void OnLoaded(object sender, RoutedEventArgs e)
4852
{
4953
RefreshMaximizeRestoreButton();
@@ -247,6 +251,7 @@ private void OnPluginDirecotyClick(object sender, MouseButtonEventArgs e)
247251
PluginManager.API.OpenDirectory(directory);
248252
}
249253
}
254+
250255
#endregion
251256

252257
#region Proxy
@@ -307,7 +312,7 @@ private void OnPluginStoreRefreshClick(object sender, RoutedEventArgs e)
307312

308313
private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e)
309314
{
310-
if(sender is Button { DataContext: UserPlugin plugin })
315+
if (sender is Button { DataContext: UserPlugin plugin })
311316
{
312317
var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7");
313318
var actionKeyword = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0];
@@ -326,7 +331,7 @@ private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e)
326331
textBox.MoveFocus(tRequest);
327332
}
328333

329-
private void ColorSchemeSelectedIndexChanged(object sender, EventArgs e)
334+
private void ColorSchemeSelectedIndexChanged(object sender, EventArgs e)
330335
=> ThemeManager.Current.ApplicationTheme = settings.ColorScheme switch
331336
{
332337
Constant.Light => ApplicationTheme.Light,
@@ -370,5 +375,13 @@ private void Window_StateChanged(object sender, EventArgs e)
370375
RefreshMaximizeRestoreButton();
371376
}
372377

378+
private void SelectedPluginChanged(object sender, SelectionChangedEventArgs e)
379+
{
380+
Plugins.ScrollIntoView(Plugins.SelectedItem);
381+
}
382+
private void ItemSizeChanged(object sender, SizeChangedEventArgs e)
383+
{
384+
Plugins.ScrollIntoView(Plugins.SelectedItem);
385+
}
373386
}
374-
}
387+
}

0 commit comments

Comments
 (0)