Skip to content

Commit 6aca878

Browse files
authored
Merge branch 'dev' into improve_update
2 parents 3ef5238 + 38c0fae commit 6aca878

File tree

57 files changed

+499
-179
lines changed

Some content is hidden

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

57 files changed

+499
-179
lines changed

.github/workflows/default_plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: windows-latest
1111

1212
steps:
13-
- uses: actions/checkout@v5
13+
- uses: actions/checkout@v6
1414
- name: Setup .NET
1515
uses: actions/setup-dotnet@v5
1616
with:

.github/workflows/dotnet.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
NUGET_CERT_REVOCATION_MODE: offline
2121
BUILD_NUMBER: ${{ github.run_number }}
2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424
- name: Set Flow.Launcher.csproj version
2525
id: update
2626
uses: vers-one/[email protected]
@@ -54,36 +54,36 @@ jobs:
5454
shell: powershell
5555
run: .\Scripts\post_build.ps1
5656
- name: Upload Plugin Nupkg
57-
uses: actions/upload-artifact@v4
57+
uses: actions/upload-artifact@v5
5858
with:
5959
name: Plugin nupkg
6060
path: |
6161
Output\Release\Flow.Launcher.Plugin.*.nupkg
6262
compression-level: 0
6363
- name: Upload Setup
64-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@v5
6565
with:
6666
name: Flow Installer
6767
path: |
6868
Output\Packages\Flow-Launcher-*.exe
6969
compression-level: 0
7070
- name: Upload Portable Version
71-
uses: actions/upload-artifact@v4
71+
uses: actions/upload-artifact@v5
7272
with:
7373
name: Portable Version
7474
path: |
7575
Output\Packages\Flow-Launcher-Portable.zip
7676
compression-level: 0
7777
- name: Upload Full Nupkg
78-
uses: actions/upload-artifact@v4
78+
uses: actions/upload-artifact@v5
7979
with:
8080
name: Full nupkg
8181
path: |
8282
Output\Packages\FlowLauncher-*-full.nupkg
8383
8484
compression-level: 0
8585
- name: Upload Release Information
86-
uses: actions/upload-artifact@v4
86+
uses: actions/upload-artifact@v5
8787
with:
8888
name: RELEASES
8989
path: |

.github/workflows/release_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
update-pr:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1515

1616
- uses: actions/setup-python@v6
1717
with:

Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ public static class PluginsManifest
2626

2727
public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default)
2828
{
29+
bool lockAcquired = false;
2930
try
3031
{
3132
await manifestUpdateLock.WaitAsync(token).ConfigureAwait(false);
33+
lockAcquired = true;
3234

3335
if (UserPlugins == null || usePrimaryUrlOnly || DateTime.Now.Subtract(lastFetchedAt) >= fetchTimeout)
3436
{
@@ -54,13 +56,18 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
5456
return true;
5557
}
5658
}
59+
catch (OperationCanceledException)
60+
{
61+
// Ignored
62+
}
5763
catch (Exception e)
5864
{
5965
PublicApi.Instance.LogException(ClassName, "Http request failed", e);
6066
}
6167
finally
6268
{
63-
manifestUpdateLock.Release();
69+
// Only release the lock if it was acquired
70+
if (lockAcquired) manifestUpdateLock.Release();
6471
}
6572

6673
return false;

Flow.Launcher/Helper/ErrorReporting.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ private static void Report(Exception e, bool silent = false, [CallerMemberName]
1616
var logger = LogManager.GetLogger(methodName);
1717
logger.Fatal(ExceptionFormatter.FormatExcpetion(e));
1818
if (silent) return;
19+
20+
// Workaround for issue https://github.com/Flow-Launcher/Flow.Launcher/issues/4016
21+
// The crash occurs in PresentationFramework.dll, not necessarily when the Runner UI is visible, originating from this line:
22+
// https://github.com/dotnet/wpf/blob/3439f20fb8c685af6d9247e8fd2978cac42e74ac/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs#L1005
23+
// Many bug reports because users see the "Error report UI" after the crash with System.Runtime.InteropServices.COMException 0xD0000701 or 0x80263001.
24+
// However, displaying this "Error report UI" during WPF crashes, especially when DWM composition is changing, is not ideal; some users reported it hangs for up to a minute before the it appears.
25+
// This change modifies the behavior to log the exception instead of showing the "Error report UI".
26+
if (ExceptionHelper.IsRecoverableDwmCompositionException(e)) return;
27+
1928
var reportWindow = new ReportWindow(e);
2029
reportWindow.Show();
2130
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// This is a direct copy of the file at https://github.com/microsoft/PowerToys/blob/main/src/modules/launcher/PowerLauncher/Helper/ExceptionHelper.cs and adapted for flow.
2+
3+
using System;
4+
using System.Runtime.InteropServices;
5+
6+
namespace Flow.Launcher.Helper;
7+
8+
internal static class ExceptionHelper
9+
{
10+
private const string PresentationFrameworkExceptionSource = "PresentationFramework";
11+
12+
private const int DWM_E_COMPOSITIONDISABLED = unchecked((int)0x80263001);
13+
14+
// HRESULT for NT STATUS STATUS_MESSAGE_LOST (0xC0000701 | 0x10000000 == 0xD0000701)
15+
private const int STATUS_MESSAGE_LOST_HR = unchecked((int)0xD0000701);
16+
17+
/// <summary>
18+
/// Returns true if the exception is a recoverable DWM composition exception.
19+
/// </summary>
20+
internal static bool IsRecoverableDwmCompositionException(Exception exception)
21+
{
22+
if (exception is not COMException comException)
23+
{
24+
return false;
25+
}
26+
27+
if (comException.HResult is DWM_E_COMPOSITIONDISABLED)
28+
{
29+
return true;
30+
}
31+
32+
if (comException.HResult is STATUS_MESSAGE_LOST_HR && comException.Source == PresentationFrameworkExceptionSource)
33+
{
34+
return true;
35+
}
36+
37+
// Check for common DWM composition changed patterns in the stack trace
38+
var stackTrace = comException.StackTrace;
39+
return !string.IsNullOrEmpty(stackTrace) &&
40+
stackTrace.Contains("DwmCompositionChanged", StringComparison.OrdinalIgnoreCase);
41+
}
42+
}

Flow.Launcher/Languages/ar.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
<system:String x:Key="PositionReset">إعادة تعيين الموقع</system:String>
6565
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
6666
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>
67+
<system:String x:Key="pluginStillInitializing">{0}: This plugin is still initializing...</system:String>
68+
<system:String x:Key="pluginStillInitializingSubtitle">Select this result to requery</system:String>
69+
<system:String x:Key="pluginFailedToRespond">{0}: Failed to respond!</system:String>
70+
<system:String x:Key="pluginFailedToRespondSubtitle">Select this result for more info</system:String>
6771

6872
<!-- Setting General -->
6973
<system:String x:Key="flowlauncher_settings">الإعدادات</system:String>
@@ -171,6 +175,10 @@
171175
<system:String x:Key="homePageToolTip">Show home page results when query text is empty.</system:String>
172176
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
173177
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
178+
<system:String x:Key="historyStyle">History Style</system:String>
179+
<system:String x:Key="historyStyleTooltip">Choose the type of history to show in the History and Home Page</system:String>
180+
<system:String x:Key="queryHistory">Query history</system:String>
181+
<system:String x:Key="executedHistory">Last opened history</system:String>
174182
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
175183
<system:String x:Key="showAtTopmost">Show Search Window at Foremost</system:String>
176184
<system:String x:Key="showAtTopmostToolTip">Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.</system:String>
@@ -446,7 +454,7 @@
446454
<system:String x:Key="icons">الأيقونات</system:String>
447455
<system:String x:Key="about_activate_times">لقد قمت بتفعيل Flow Launcher {0} مرات</system:String>
448456
<system:String x:Key="checkUpdates">التحقق من التحديثات</system:String>
449-
<system:String x:Key="BecomeASponsor">كن راعيا</system:String>
457+
<system:String x:Key="BecomeASponsor">Become a Sponsor</system:String>
450458
<system:String x:Key="newVersionTips">الإصدار الجديد {0} متاح، هل ترغب في إعادة تشغيل Flow Launcher لاستخدام التحديث</system:String>
451459
<system:String x:Key="checkUpdatesFailed">فشل التحقق من التحديثات، يرجى التحقق من الاتصال وإعدادات البروكسي لـ api.github.com.</system:String>
452460
<system:String x:Key="downloadUpdatesFailed">

Flow.Launcher/Languages/cs.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
<system:String x:Key="PositionReset">Obnovit pozici</system:String>
6565
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
6666
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>
67+
<system:String x:Key="pluginStillInitializing">{0}: This plugin is still initializing...</system:String>
68+
<system:String x:Key="pluginStillInitializingSubtitle">Select this result to requery</system:String>
69+
<system:String x:Key="pluginFailedToRespond">{0}: Failed to respond!</system:String>
70+
<system:String x:Key="pluginFailedToRespondSubtitle">Select this result for more info</system:String>
6771

6872
<!-- Setting General -->
6973
<system:String x:Key="flowlauncher_settings">Nastavení</system:String>
@@ -171,6 +175,10 @@
171175
<system:String x:Key="homePageToolTip">Show home page results when query text is empty.</system:String>
172176
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
173177
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
178+
<system:String x:Key="historyStyle">History Style</system:String>
179+
<system:String x:Key="historyStyleTooltip">Choose the type of history to show in the History and Home Page</system:String>
180+
<system:String x:Key="queryHistory">Query history</system:String>
181+
<system:String x:Key="executedHistory">Last opened history</system:String>
174182
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
175183
<system:String x:Key="showAtTopmost">Show Search Window at Foremost</system:String>
176184
<system:String x:Key="showAtTopmostToolTip">Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.</system:String>
@@ -446,7 +454,7 @@
446454
<system:String x:Key="icons">Ikony</system:String>
447455
<system:String x:Key="about_activate_times">Flow Launcher byl aktivován {0} krát</system:String>
448456
<system:String x:Key="checkUpdates">Zkontrolovat Aktualizace</system:String>
449-
<system:String x:Key="BecomeASponsor">Staňte se sponzorem</system:String>
457+
<system:String x:Key="BecomeASponsor">Become a Sponsor</system:String>
450458
<system:String x:Key="newVersionTips">Je k dispozici nová verze {0}, chcete Flow Launcher restartovat, aby se mohl aktualizovat?</system:String>
451459
<system:String x:Key="checkUpdatesFailed">Hledání aktualizací se nezdařilo, zkontrolujte prosím své internetové připojení a nastavení proxy serveru k api.github.com.</system:String>
452460
<system:String x:Key="downloadUpdatesFailed">

Flow.Launcher/Languages/da.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
<system:String x:Key="PositionReset">Position Reset</system:String>
6565
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
6666
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>
67+
<system:String x:Key="pluginStillInitializing">{0}: This plugin is still initializing...</system:String>
68+
<system:String x:Key="pluginStillInitializingSubtitle">Select this result to requery</system:String>
69+
<system:String x:Key="pluginFailedToRespond">{0}: Failed to respond!</system:String>
70+
<system:String x:Key="pluginFailedToRespondSubtitle">Select this result for more info</system:String>
6771

6872
<!-- Setting General -->
6973
<system:String x:Key="flowlauncher_settings">Indstillinger</system:String>
@@ -171,6 +175,10 @@
171175
<system:String x:Key="homePageToolTip">Show home page results when query text is empty.</system:String>
172176
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
173177
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
178+
<system:String x:Key="historyStyle">History Style</system:String>
179+
<system:String x:Key="historyStyleTooltip">Choose the type of history to show in the History and Home Page</system:String>
180+
<system:String x:Key="queryHistory">Query history</system:String>
181+
<system:String x:Key="executedHistory">Last opened history</system:String>
174182
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
175183
<system:String x:Key="showAtTopmost">Show Search Window at Foremost</system:String>
176184
<system:String x:Key="showAtTopmostToolTip">Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.</system:String>
@@ -446,7 +454,7 @@
446454
<system:String x:Key="icons">Icons</system:String>
447455
<system:String x:Key="about_activate_times">Du har aktiveret Flow Launcher {0} gange</system:String>
448456
<system:String x:Key="checkUpdates">Tjek for opdateringer</system:String>
449-
<system:String x:Key="BecomeASponsor">Become A Sponsor</system:String>
457+
<system:String x:Key="BecomeASponsor">Become a Sponsor</system:String>
450458
<system:String x:Key="newVersionTips">Ny version {0} er tilgængelig, genstart venligst Flow Launcher</system:String>
451459
<system:String x:Key="checkUpdatesFailed">Check updates failed, please check your connection and proxy settings to api.github.com.</system:String>
452460
<system:String x:Key="downloadUpdatesFailed">

Flow.Launcher/Languages/de.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
<system:String x:Key="PositionReset">Zurücksetzen der Position</system:String>
6565
<system:String x:Key="PositionResetToolTip">Position des Suchfensters zurücksetzen</system:String>
6666
<system:String x:Key="queryTextBoxPlaceholder">Zum Suchen hier tippen</system:String>
67+
<system:String x:Key="pluginStillInitializing">{0}: This plugin is still initializing...</system:String>
68+
<system:String x:Key="pluginStillInitializingSubtitle">Select this result to requery</system:String>
69+
<system:String x:Key="pluginFailedToRespond">{0}: Failed to respond!</system:String>
70+
<system:String x:Key="pluginFailedToRespondSubtitle">Select this result for more info</system:String>
6771

6872
<!-- Setting General -->
6973
<system:String x:Key="flowlauncher_settings">Einstellungen</system:String>
@@ -171,6 +175,10 @@
171175
<system:String x:Key="homePageToolTip">Ergebnisse der Homepage zeigen, wenn Abfragetext leer ist.</system:String>
172176
<system:String x:Key="historyResultsForHomePage">Historie-Ergebnisse auf Homepage zeigen</system:String>
173177
<system:String x:Key="historyResultsCountForHomePage">Maximal gezeigte Historie-Ergebnisse auf Homepage</system:String>
178+
<system:String x:Key="historyStyle">History Style</system:String>
179+
<system:String x:Key="historyStyleTooltip">Choose the type of history to show in the History and Home Page</system:String>
180+
<system:String x:Key="queryHistory">Query history</system:String>
181+
<system:String x:Key="executedHistory">Last opened history</system:String>
174182
<system:String x:Key="homeToggleBoxToolTip">Dies kann nur bearbeitet werden, wenn das Plug-in das Home-Feature unterstützt und die Homepage aktiviert ist.</system:String>
175183
<system:String x:Key="showAtTopmost">Suchfenster an vorderster zeigen</system:String>
176184
<system:String x:Key="showAtTopmostToolTip">Setzt die Einstellung 'Immer im Vordergrund' anderer Programme außer Kraft und zeigt Flow in der vordersten Position an.</system:String>
@@ -446,7 +454,7 @@
446454
<system:String x:Key="icons">Icons</system:String>
447455
<system:String x:Key="about_activate_times">Sie haben Flow Launcher {0} mal aktiviert</system:String>
448456
<system:String x:Key="checkUpdates">Nach Updates suchen</system:String>
449-
<system:String x:Key="BecomeASponsor">Ein Sponsor werden</system:String>
457+
<system:String x:Key="BecomeASponsor">Become a Sponsor</system:String>
450458
<system:String x:Key="newVersionTips">Neue Version {0} ist verfügbar. Möchten Sie Flow Launcher neu starten, um das Update zu verwenden?</system:String>
451459
<system:String x:Key="checkUpdatesFailed">Überprüfung der Updates fehlgeschlagen. Bitte überprüfen Sie Ihre Verbindungs- und Proxy-Einstellungen zu api.github.com.</system:String>
452460
<system:String x:Key="downloadUpdatesFailed">

0 commit comments

Comments
 (0)