Skip to content

Commit 1c356d0

Browse files
authored
Merge pull request #2066 from Flow-Launcher/dev
Release 1.15.0 | Plugin 4.0.1
2 parents 3b478b5 + 803633f commit 1c356d0

File tree

148 files changed

+1763
-1170
lines changed

Some content is hidden

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

148 files changed

+1763
-1170
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ body:
1414
options:
1515
- label: >
1616
I have checked that this issue has not already been reported.
17-
17+
- label: >
18+
I am using the latest version of Flow Launcher.
19+
1820
- type: textarea
1921
attributes:
2022
label: Problem Description
@@ -54,7 +56,6 @@ body:
5456
validations:
5557
required: true
5658

57-
5859
- type: textarea
5960
id: logs
6061
attributes:

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ github
22
https
33
ssh
44
ubuntu
5+
runcount

.github/actions/spelling/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
crowdin
22
DWM
33
workflows
4+
Wpf
45
wpf
56
actionkeyword
67
stackoverflow

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
issues: write
1414
pull-requests: write
1515
steps:
16-
- uses: actions/stale@v7
16+
- uses: actions/stale@v8
1717
with:
1818
stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
1919
days-before-stale: 45

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";
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Globalization;
44
using System.Linq;
55
using System.Text;
6-
using System.Xml;
76
using Microsoft.Win32;
87

98
namespace Flow.Launcher.Infrastructure.Exception
@@ -63,7 +62,7 @@ private static string CreateExceptionReport(System.Exception ex)
6362
sb.AppendLine($"* Command Line: {Environment.CommandLine}");
6463
sb.AppendLine($"* Timestamp: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
6564
sb.AppendLine($"* Flow Launcher version: {Constant.Version}");
66-
sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}");
65+
sb.AppendLine($"* OS Version: {GetWindowsFullVersionFromRegistry()}");
6766
sb.AppendLine($"* IntPtr Length: {IntPtr.Size}");
6867
sb.AppendLine($"* x64: {Environment.Is64BitOperatingSystem}");
6968
sb.AppendLine($"* Python Path: {Constant.PythonPath}");
@@ -173,5 +172,35 @@ private static List<string> GetFrameworkVersionFromRegistry()
173172
}
174173

175174
}
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+
}
176205
}
177206
}

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public static void Initialize()
4040

4141
var usage = LoadStorageToConcurrentDictionary();
4242

43+
ImageCache.Initialize(usage.ToDictionary(x => x.Key, x => x.Value));
44+
4345
foreach (var icon in new[]
4446
{
4547
Constant.DefaultIcon, Constant.MissingImgIcon
@@ -269,7 +271,7 @@ public static async ValueTask<ImageSource> LoadAsync(string path, bool loadFullI
269271

270272
if (GuidToKey.TryGetValue(hash, out string key))
271273
{ // image already exists
272-
img = ImageCache[key, false] ?? img;
274+
img = ImageCache[key, loadFullImage] ?? img;
273275
}
274276
else
275277
{ // new guid

Flow.Launcher.Infrastructure/Logger/Log.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
using NLog.Config;
66
using NLog.Targets;
77
using Flow.Launcher.Infrastructure.UserSettings;
8-
using JetBrains.Annotations;
98
using NLog.Fluent;
109
using NLog.Targets.Wrappers;
1110
using System.Runtime.ExceptionServices;
12-
using System.Text;
1311

1412
namespace Flow.Launcher.Infrastructure.Logger
1513
{
@@ -76,7 +74,6 @@ private static bool FormatValid(string message)
7674
return valid;
7775
}
7876

79-
8077
public static void Exception(string className, string message, System.Exception exception, [CallerMemberName] string methodName = "")
8178
{
8279
exception = exception.Demystify();
@@ -115,8 +112,6 @@ private static void ExceptionInternal(string classAndMethod, string message, Sys
115112
{
116113
var logger = LogManager.GetLogger(classAndMethod);
117114

118-
var messageBuilder = new StringBuilder();
119-
120115
logger.Error(e, message);
121116
}
122117

@@ -136,7 +131,8 @@ private static void LogInternal(string message, LogLevel level)
136131
}
137132
}
138133

139-
/// <param name="message">example: "|prefix|unprefixed" </param>
134+
/// Example: "|ClassName.MethodName|Message"
135+
/// <param name="message">Example: "|ClassName.MethodName|Message" </param>
140136
/// <param name="e">Exception</param>
141137
public static void Exception(string message, System.Exception e)
142138
{
@@ -158,7 +154,7 @@ public static void Exception(string message, System.Exception e)
158154
#endif
159155
}
160156

161-
/// <param name="message">example: "|prefix|unprefixed" </param>
157+
/// Example: "|ClassName.MethodName|Message"
162158
public static void Error(string message)
163159
{
164160
LogInternal(message, LogLevel.Error);
@@ -183,7 +179,7 @@ public static void Debug(string className, string message, [CallerMemberName] st
183179
LogInternal(LogLevel.Debug, className, message, methodName);
184180
}
185181

186-
/// <param name="message">example: "|prefix|unprefixed" </param>
182+
/// Example: "|ClassName.MethodName|Message""
187183
public static void Debug(string message)
188184
{
189185
LogInternal(message, LogLevel.Debug);
@@ -194,7 +190,7 @@ public static void Info(string className, string message, [CallerMemberName] str
194190
LogInternal(LogLevel.Info, className, message, methodName);
195191
}
196192

197-
/// <param name="message">example: "|prefix|unprefixed" </param>
193+
/// Example: "|ClassName.MethodName|Message"
198194
public static void Info(string message)
199195
{
200196
LogInternal(message, LogLevel.Info);
@@ -205,7 +201,7 @@ public static void Warn(string className, string message, [CallerMemberName] str
205201
LogInternal(LogLevel.Warn, className, message, methodName);
206202
}
207203

208-
/// <param name="message">example: "|prefix|unprefixed" </param>
204+
/// Example: "|ClassName.MethodName|Message"
209205
public static void Warn(string message)
210206
{
211207
LogInternal(message, LogLevel.Warn);

0 commit comments

Comments
 (0)