Skip to content

Commit 306ad79

Browse files
Merge branch 'dev' into RemoveUnusedNuget
2 parents df5e8ca + 803633f commit 306ad79

File tree

42 files changed

+123
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+123
-70
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ private static void DeletePythonBinding()
4848
}
4949
}
5050

51+
/// <summary>
52+
/// Save json and ISavable
53+
/// </summary>
5154
public static void Save()
5255
{
5356
foreach (var plugin in AllPlugins)

Flow.Launcher.Infrastructure/Constant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static class Constant
1919
public static readonly string RootDirectory = Directory.GetParent(ApplicationDirectory).ToString();
2020

2121
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
22-
public const string Issue = "https://github.com/Flow-Launcher/Flow.Launcher/issues/new/choose";
22+
public const string IssuesUrl = "https://github.com/Flow-Launcher/Flow.Launcher/issues";
2323
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
2424
public static readonly string Dev = "Dev";
2525
public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips";

Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static string CreateExceptionReport(System.Exception ex)
6262
sb.AppendLine($"* Command Line: {Environment.CommandLine}");
6363
sb.AppendLine($"* Timestamp: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
6464
sb.AppendLine($"* Flow Launcher version: {Constant.Version}");
65-
sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}");
65+
sb.AppendLine($"* OS Version: {GetWindowsFullVersionFromRegistry()}");
6666
sb.AppendLine($"* IntPtr Length: {IntPtr.Size}");
6767
sb.AppendLine($"* x64: {Environment.Is64BitOperatingSystem}");
6868
sb.AppendLine($"* Python Path: {Constant.PythonPath}");
@@ -172,5 +172,35 @@ private static List<string> GetFrameworkVersionFromRegistry()
172172
}
173173

174174
}
175+
176+
public static string GetWindowsFullVersionFromRegistry()
177+
{
178+
try
179+
{
180+
var buildRevision = GetWindowsRevisionFromRegistry();
181+
var currentBuild = Environment.OSVersion.Version.Build;
182+
return currentBuild.ToString() + "." + buildRevision;
183+
}
184+
catch
185+
{
186+
return Environment.OSVersion.VersionString;
187+
}
188+
}
189+
190+
public static string GetWindowsRevisionFromRegistry()
191+
{
192+
try
193+
{
194+
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\"))
195+
{
196+
var buildRevision = registryKey.GetValue("UBR").ToString();
197+
return buildRevision;
198+
}
199+
}
200+
catch
201+
{
202+
return "0";
203+
}
204+
}
175205
}
176206
}

Flow.Launcher.Infrastructure/Image/ImageCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class ImageCache
2828
private const int permissibleFactor = 2;
2929
private SemaphoreSlim semaphore = new(1, 1);
3030

31-
public void Initialization(Dictionary<(string, bool), int> usage)
31+
public void Initialize(Dictionary<(string, bool), int> usage)
3232
{
3333
foreach (var key in usage.Keys)
3434
{

Flow.Launcher.Infrastructure/Image/ImageLoader.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public static void Initialize()
3737

3838
var usage = LoadStorageToConcurrentDictionary();
3939

40+
ImageCache.Initialize(usage.ToDictionary(x => x.Key, x => x.Value));
41+
4042
foreach (var icon in new[]
4143
{
4244
Constant.DefaultIcon, Constant.MissingImgIcon

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public bool HideNotifyIcon
240240
public bool HideWhenDeactivated { get; set; } = true;
241241

242242
[JsonConverter(typeof(JsonStringEnumConverter))]
243-
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.RememberLastLaunchLocation;
243+
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
244244

245245
[JsonConverter(typeof(JsonStringEnumConverter))]
246246
public SearchWindowAligns SearchWindowAlign { get; set; } = SearchWindowAligns.Center;

Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
</PropertyGroup>
1515

1616
<PropertyGroup>
17-
<Version>4.0.0</Version>
18-
<PackageVersion>4.0.0</PackageVersion>
19-
<AssemblyVersion>4.0.0</AssemblyVersion>
20-
<FileVersion>4.0.0</FileVersion>
17+
<Version>4.0.1</Version>
18+
<PackageVersion>4.0.1</PackageVersion>
19+
<AssemblyVersion>4.0.1</AssemblyVersion>
20+
<FileVersion>4.0.1</FileVersion>
2121
<PackageId>Flow.Launcher.Plugin</PackageId>
2222
<Authors>Flow-Launcher</Authors>
2323
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public interface IPublicAPI
2020
/// </summary>
2121
/// <param name="query">query text</param>
2222
/// <param name="requery">
23-
/// force requery By default, Flow Launcher will not fire query if your query is same with existing one.
24-
/// Set this to true to force Flow Launcher requerying
23+
/// Force requery. By default, Flow Launcher will not fire query if your query is same with existing one.
24+
/// Set this to <see langword="true"/> to force Flow Launcher requerying
2525
/// </param>
2626
void ChangeQuery(string query, bool requery = false);
2727

Flow.Launcher.Test/Flow.Launcher.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
@@ -50,7 +50,7 @@
5050
<ItemGroup>
5151
<PackageReference Include="Moq" Version="4.18.4" />
5252
<PackageReference Include="nunit" Version="3.13.3" />
53-
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1">
53+
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2">
5454
<PrivateAssets>all</PrivateAssets>
5555
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5656
</PackageReference>

Flow.Launcher/Helper/ErrorReporting.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public static void DispatcherUnhandledException(object sender, DispatcherUnhandl
2929
//prevent application exist, so the user can copy prompted error info
3030
e.Handled = true;
3131
}
32-
32+
3333
public static string RuntimeInfo()
3434
{
3535
var info = $"\nFlow Launcher version: {Constant.Version}" +
36-
$"\nOS Version: {Environment.OSVersion.VersionString}" +
36+
$"\nOS Version: {ExceptionFormatter.GetWindowsFullVersionFromRegistry()}" +
3737
$"\nIntPtr Length: {IntPtr.Size}" +
3838
$"\nx64: {Environment.Is64BitOperatingSystem}";
3939
return info;

0 commit comments

Comments
 (0)