Skip to content

Commit

Permalink
Merge branch 'dev' into arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
taooceros authored Dec 2, 2024
2 parents 1d3f11b + 14f1a5a commit f8c49a6
Show file tree
Hide file tree
Showing 111 changed files with 3,143 additions and 3,044 deletions.
2 changes: 1 addition & 1 deletion .cm/gitstream.cm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ triggers:
branch:
- l10n_dev
- dev
- r/(?i)(Dependabot|Renovate)/
- r/([Dd]ependabot|[Rr]enovate)/


automations:
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher.Core/Flow.Launcher.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<ItemGroup>
<PackageReference Include="Droplex" Version="1.7.0" />
<PackageReference Include="FSharp.Core" Version="8.0.301" />
<PackageReference Include="FSharp.Core" Version="9.0.100" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
Expand Down
26 changes: 26 additions & 0 deletions Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Forms;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Plugin;
using CheckBox = System.Windows.Controls.CheckBox;
using ComboBox = System.Windows.Controls.ComboBox;
using Control = System.Windows.Controls.Control;
using Orientation = System.Windows.Controls.Orientation;
using TextBox = System.Windows.Controls.TextBox;
using UserControl = System.Windows.Controls.UserControl;

namespace Flow.Launcher.Core.Plugin
{
Expand Down Expand Up @@ -224,6 +231,7 @@ public Control CreateSettingPanel()
break;
}
case "inputWithFileBtn":
case "inputWithFolderBtn":
{
var textBox = new TextBox()
{
Expand All @@ -243,6 +251,24 @@ public Control CreateSettingPanel()
Margin = new Thickness(10, 0, 0, 0), Content = "Browse"
};

Btn.Click += (_, _) =>
{
using CommonDialog dialog = type switch
{
"inputWithFolderBtn" => new FolderBrowserDialog(),
_ => new OpenFileDialog(),
};
if (dialog.ShowDialog() != DialogResult.OK) return;

var path = dialog switch

Check warning on line 263 in Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs

View workflow job for this annotation

GitHub Actions / build

The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern '_' is not covered.
{
FolderBrowserDialog folderDialog => folderDialog.SelectedPath,
OpenFileDialog fileDialog => fileDialog.FileName,
};
textBox.Text = path;
Settings[attribute.Name] = path;
};

var dockPanel = new DockPanel() { Margin = settingControlMargin };

DockPanel.SetDock(Btn, Dock.Right);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MemoryPack" Version="1.21.1" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.10.48" />
<PackageReference Include="MemoryPack" Version="1.21.3" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher.Test/Flow.Launcher.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions Flow.Launcher/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<ResourceDictionary Source="pack://application:,,,/Resources/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Resources/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ui:ThemeResources.ThemeDictionaries>
</ui:ThemeResources>
<ui:XamlControlsResources />
Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher/Flow.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Fody" Version="6.5.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -103,7 +103,7 @@
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
<PackageReference Include="SemanticVersioning" Version="3.0.0-beta2" />
<PackageReference Include="VirtualizingWrapPanel" Version="2.0.10" />
<PackageReference Include="VirtualizingWrapPanel" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/Helper/WindowsMediaPlayerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ internal static class WindowsMediaPlayerHelper
internal static bool IsWindowsMediaPlayerInstalled()
{
using var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MediaPlayer");
return key.GetValue("Installation Directory") != null;
return key?.GetValue("Installation Directory") != null;
}
}
Loading

0 comments on commit f8c49a6

Please sign in to comment.