From fcbf97275406c9775149be25a8c68c606871f6e3 Mon Sep 17 00:00:00 2001
From: pc223 <10551242+pc223@users.noreply.github.com>
Date: Tue, 13 Jul 2021 03:44:28 +0700
Subject: [PATCH 0001/1442] Testing new search order: System.Search.Rank
---
.../Search/WindowsIndex/QueryConstructor.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
index 20e85bbb5..808f8e7e3 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
@@ -114,7 +114,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
///
public const string QueryWhereRestrictionsForAllFilesAndFoldersSearch = "scope='file:'";
- public const string QueryOrderByFileNameRestriction = " ORDER BY System.FileName";
+ public const string QueryOrderByFileNameRestriction = " ORDER BY System.Search.Rank";
///
From 5d3b0ba2c06ceeea0f9f6cae668068bef0e7763a Mon Sep 17 00:00:00 2001
From: pc223 <10551242+pc223@users.noreply.github.com>
Date: Tue, 13 Jul 2021 04:12:09 +0700
Subject: [PATCH 0002/1442] Should be DESC
---
.../Search/WindowsIndex/QueryConstructor.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
index 808f8e7e3..c42a60193 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs
@@ -114,7 +114,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
///
public const string QueryWhereRestrictionsForAllFilesAndFoldersSearch = "scope='file:'";
- public const string QueryOrderByFileNameRestriction = " ORDER BY System.Search.Rank";
+ public const string QueryOrderByFileNameRestriction = " ORDER BY System.Search.Rank DESC";
///
From bfee170d0fbeba908d9f228771af7a08351e7a10 Mon Sep 17 00:00:00 2001
From: Sparrkle
Date: Wed, 5 Oct 2022 16:20:41 +0900
Subject: [PATCH 0003/1442] Changed ProgressBar Storyboard (No Dispatcher)
---
Flow.Launcher/MainWindow.xaml | 1 -
Flow.Launcher/MainWindow.xaml.cs | 60 +++++++++++---------------------
2 files changed, 21 insertions(+), 40 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml
index dc3b3f145..7d8c195f3 100644
--- a/Flow.Launcher/MainWindow.xaml
+++ b/Flow.Launcher/MainWindow.xaml
@@ -250,7 +250,6 @@
Height="2"
HorizontalAlignment="Right"
StrokeThickness="1"
- Style="{DynamicResource PendingLineStyle}"
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
X1="-150"
X2="-50"
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 332e0f502..1dd9fe34d 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -28,9 +28,6 @@ namespace Flow.Launcher
public partial class MainWindow
{
#region Private Fields
-
- private readonly Storyboard _progressBarStoryboard = new Storyboard();
- private bool isProgressBarStoryboardPaused;
private Settings _settings;
private NotifyIcon _notifyIcon;
private ContextMenu contextMenu;
@@ -119,39 +116,9 @@ namespace Flow.Launcher
_viewModel.LastQuerySelected = true;
}
- if (_viewModel.ProgressBarVisibility == Visibility.Visible && isProgressBarStoryboardPaused)
- {
- _progressBarStoryboard.Begin(ProgressBar, true);
- isProgressBarStoryboardPaused = false;
- }
-
if(_settings.UseAnimation)
WindowAnimator();
}
- else if (!isProgressBarStoryboardPaused)
- {
- _progressBarStoryboard.Stop(ProgressBar);
- isProgressBarStoryboardPaused = true;
- }
-
- break;
- }
- case nameof(MainViewModel.ProgressBarVisibility):
- {
- Dispatcher.Invoke(() =>
- {
- if (_viewModel.ProgressBarVisibility == Visibility.Hidden && !isProgressBarStoryboardPaused)
- {
- _progressBarStoryboard.Stop(ProgressBar);
- isProgressBarStoryboardPaused = true;
- }
- else if (_viewModel.MainWindowVisibilityStatus &&
- isProgressBarStoryboardPaused)
- {
- _progressBarStoryboard.Begin(ProgressBar, true);
- isProgressBarStoryboardPaused = false;
- }
- });
break;
}
case nameof(MainViewModel.QueryTextCursorMovedToEnd):
@@ -291,17 +258,32 @@ namespace Flow.Launcher
}
private void InitProgressbarAnimation()
{
- var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
- new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
+ var progressBarStoryBoard = new Storyboard();
+
+ var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
- _progressBarStoryboard.Children.Add(da);
- _progressBarStoryboard.Children.Add(da1);
- _progressBarStoryboard.RepeatBehavior = RepeatBehavior.Forever;
+ progressBarStoryBoard.Children.Add(da);
+ progressBarStoryBoard.Children.Add(da1);
+ progressBarStoryBoard.RepeatBehavior = RepeatBehavior.Forever;
+
+ da.Freeze();
+ da1.Freeze();
+
+ var beginStoryboard = new BeginStoryboard();
+ beginStoryboard.Storyboard = progressBarStoryBoard;
+
+ var trigger = new Trigger { Property = System.Windows.Shapes.Line.VisibilityProperty, Value = Visibility.Visible };
+ trigger.EnterActions.Add(beginStoryboard);
+
+ var progressStyle = new Style(typeof(System.Windows.Shapes.Line));
+ progressStyle.BasedOn = FindResource("PendingLineStyle") as Style;
+ progressStyle.Triggers.Add(trigger);
+
+ ProgressBar.Style = progressStyle;
_viewModel.ProgressBarVisibility = Visibility.Hidden;
- isProgressBarStoryboardPaused = true;
}
public void WindowAnimator()
{
From 6f0c2549cea809b0a1e406951f734daf4fb8cc0d Mon Sep 17 00:00:00 2001
From: Hongtao Zhang
Date: Thu, 24 Nov 2022 14:01:32 -0600
Subject: [PATCH 0004/1442] also pause animation when exit visible
---
Flow.Launcher/MainWindow.xaml.cs | 151 ++++++++++++++++++-------------
1 file changed, 89 insertions(+), 62 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 245ab4d05..efa43000b 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -36,6 +36,7 @@ namespace Flow.Launcher
public partial class MainWindow
{
#region Private Fields
+
private Settings _settings;
private NotifyIcon _notifyIcon;
private ContextMenu contextMenu;
@@ -50,7 +51,7 @@ namespace Flow.Launcher
DataContext = mainVM;
_viewModel = mainVM;
_settings = settings;
-
+
InitializeComponent();
InitializePosition();
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
@@ -60,7 +61,7 @@ namespace Flow.Launcher
{
InitializeComponent();
}
-
+
private void OnCopy(object sender, ExecutedRoutedEventArgs e)
{
if (QueryTextBox.SelectionLength == 0)
@@ -108,29 +109,29 @@ namespace Flow.Launcher
switch (e.PropertyName)
{
case nameof(MainViewModel.MainWindowVisibilityStatus):
+ {
+ if (_viewModel.MainWindowVisibilityStatus)
{
- if (_viewModel.MainWindowVisibilityStatus)
+ if (_settings.UseSound)
{
- if (_settings.UseSound)
- {
- animationSound.Position = TimeSpan.Zero;
- animationSound.Play();
- }
- UpdatePosition();
- Activate();
- QueryTextBox.Focus();
- _settings.ActivateTimes++;
- if (!_viewModel.LastQuerySelected)
- {
- QueryTextBox.SelectAll();
- _viewModel.LastQuerySelected = true;
- }
-
- if(_settings.UseAnimation)
- WindowAnimator();
+ animationSound.Position = TimeSpan.Zero;
+ animationSound.Play();
}
- break;
+ UpdatePosition();
+ Activate();
+ QueryTextBox.Focus();
+ _settings.ActivateTimes++;
+ if (!_viewModel.LastQuerySelected)
+ {
+ QueryTextBox.SelectAll();
+ _viewModel.LastQuerySelected = true;
+ }
+
+ if (_settings.UseAnimation)
+ WindowAnimator();
}
+ break;
+ }
case nameof(MainViewModel.QueryTextCursorMovedToEnd):
if (_viewModel.QueryTextCursorMovedToEnd)
{
@@ -211,35 +212,45 @@ namespace Flow.Launcher
Visible = !_settings.HideNotifyIcon
};
contextMenu = new ContextMenu();
- var openIcon = new FontIcon { Glyph = "\ue71e" };
+ var openIcon = new FontIcon
+ {
+ Glyph = "\ue71e"
+ };
var open = new MenuItem
{
- Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")",
- Icon = openIcon
+ Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")", Icon = openIcon
+ };
+ var gamemodeIcon = new FontIcon
+ {
+ Glyph = "\ue7fc"
};
- var gamemodeIcon = new FontIcon { Glyph = "\ue7fc" };
var gamemode = new MenuItem
{
- Header = InternationalizationManager.Instance.GetTranslation("GameMode"),
- Icon = gamemodeIcon
+ Header = InternationalizationManager.Instance.GetTranslation("GameMode"), Icon = gamemodeIcon
+ };
+ var positionresetIcon = new FontIcon
+ {
+ Glyph = "\ue73f"
};
- var positionresetIcon = new FontIcon { Glyph = "\ue73f" };
var positionreset = new MenuItem
{
- Header = InternationalizationManager.Instance.GetTranslation("PositionReset"),
- Icon = positionresetIcon
+ Header = InternationalizationManager.Instance.GetTranslation("PositionReset"), Icon = positionresetIcon
+ };
+ var settingsIcon = new FontIcon
+ {
+ Glyph = "\ue713"
};
- var settingsIcon = new FontIcon { Glyph = "\ue713" };
var settings = new MenuItem
{
- Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"),
- Icon = settingsIcon
+ Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"), Icon = settingsIcon
+ };
+ var exitIcon = new FontIcon
+ {
+ Glyph = "\ue7e8"
};
- var exitIcon = new FontIcon { Glyph = "\ue7e8" };
var exit = new MenuItem
{
- Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"),
- Icon = exitIcon
+ Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"), Icon = exitIcon
};
open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
@@ -300,10 +311,10 @@ namespace Flow.Launcher
}
private async void PositionReset()
{
- _viewModel.Show();
- await Task.Delay(300); // If don't give a time, Positioning will be weird.
- Left = HorizonCenter();
- Top = VerticalCenter();
+ _viewModel.Show();
+ await Task.Delay(300); // If don't give a time, Positioning will be weird.
+ Left = HorizonCenter();
+ Top = VerticalCenter();
}
private void InitProgressbarAnimation()
{
@@ -320,14 +331,30 @@ namespace Flow.Launcher
da.Freeze();
da1.Freeze();
- var beginStoryboard = new BeginStoryboard();
- beginStoryboard.Storyboard = progressBarStoryBoard;
+ const string progressBarAnimationName = "ProgressBarAnimation";
+ var beginStoryboard = new BeginStoryboard
+ {
+ Name = progressBarAnimationName, Storyboard = progressBarStoryBoard
+ };
+
+ var stopStoryboard = new StopStoryboard()
+ {
+ BeginStoryboardName = progressBarAnimationName
+ };
- var trigger = new Trigger { Property = System.Windows.Shapes.Line.VisibilityProperty, Value = Visibility.Visible };
+ var trigger = new Trigger
+ {
+ Property = VisibilityProperty, Value = Visibility.Visible
+ };
trigger.EnterActions.Add(beginStoryboard);
+ trigger.ExitActions.Add(stopStoryboard);
- var progressStyle = new Style(typeof(System.Windows.Shapes.Line));
- progressStyle.BasedOn = FindResource("PendingLineStyle") as Style;
+
+ var progressStyle = new Style(typeof(System.Windows.Shapes.Line))
+ {
+ BasedOn = FindResource("PendingLineStyle") as Style
+ };
+ progressStyle.RegisterName(progressBarAnimationName, beginStoryboard);
progressStyle.Triggers.Add(trigger);
ProgressBar.Style = progressStyle;
@@ -343,7 +370,7 @@ namespace Flow.Launcher
UpdatePosition();
Storyboard sb = new Storyboard();
Storyboard iconsb = new Storyboard();
- CircleEase easing = new CircleEase(); // or whatever easing class you want
+ CircleEase easing = new CircleEase(); // or whatever easing class you want
easing.EasingMode = EasingMode.EaseInOut;
var da = new DoubleAnimation
{
@@ -360,14 +387,14 @@ namespace Flow.Launcher
Duration = TimeSpan.FromSeconds(0.25),
FillBehavior = FillBehavior.Stop
};
- var da3 = new DoubleAnimation
- {
- From = 12,
- To = 0,
- EasingFunction = easing,
- Duration = TimeSpan.FromSeconds(0.36),
- FillBehavior = FillBehavior.Stop
- };
+ var da3 = new DoubleAnimation
+ {
+ From = 12,
+ To = 0,
+ EasingFunction = easing,
+ Duration = TimeSpan.FromSeconds(0.36),
+ FillBehavior = FillBehavior.Stop
+ };
Storyboard.SetTarget(da, this);
Storyboard.SetTargetProperty(da, new PropertyPath(Window.OpacityProperty));
Storyboard.SetTargetProperty(da2, new PropertyPath(Window.TopProperty));
@@ -395,10 +422,10 @@ namespace Flow.Launcher
private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs e)
{
_viewModel.Hide();
-
- if(_settings.UseAnimation)
+
+ if (_settings.UseAnimation)
await Task.Delay(100);
-
+
App.API.OpenSettingDialog();
}
@@ -416,7 +443,7 @@ namespace Flow.Launcher
// and always after Settings window is closed.
if (_settings.UseAnimation)
await Task.Delay(100);
-
+
if (_settings.HideWhenDeactive)
{
_viewModel.Hide();
@@ -454,7 +481,7 @@ namespace Flow.Launcher
_viewModel.Show();
}
}
-
+
public double HorizonCenter()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
@@ -536,9 +563,9 @@ namespace Flow.Launcher
&& QueryTextBox.Text.Length > 0
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length)
{
- var queryWithoutActionKeyword =
+ var queryWithoutActionKeyword =
QueryBuilder.Build(QueryTextBox.Text.Trim(), PluginManager.NonGlobalPlugins).Search;
-
+
if (FilesFolders.IsLocationPathString(queryWithoutActionKeyword))
{
_viewModel.BackspaceCommand.Execute(null);
@@ -574,7 +601,7 @@ namespace Flow.Launcher
private void QueryTextBox_KeyUp(object sender, KeyEventArgs e)
{
- if(_viewModel.QueryText != QueryTextBox.Text)
+ if (_viewModel.QueryText != QueryTextBox.Text)
{
BindingExpression be = QueryTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty);
be.UpdateSource();
From 1b31e9c9685abd0d1d556d260425fac4b5aff165 Mon Sep 17 00:00:00 2001
From: Odotocodot <48138990+Odotocodot@users.noreply.github.com>
Date: Thu, 30 Nov 2023 14:37:05 +0000
Subject: [PATCH 0005/1442] Create Flow Launcher Theme Selector plugin
---
...w.Launcher.Plugin.FlowThemeSelector.csproj | 37 +++++++
.../Main.cs | 91 ++++++++++++++++++
.../icon.png | Bin 0 -> 6625 bytes
.../plugin.json | 12 +++
4 files changed, 140 insertions(+)
create mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
create mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs
create mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/icon.png
create mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
new file mode 100644
index 000000000..ba0ddd6ab
--- /dev/null
+++ b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
@@ -0,0 +1,37 @@
+
+
+
+
+ Library
+ net7.0-windows
+ true
+ false
+
+
+
+ ..\..\Output\Debug\Plugins\Flow.Launcher.Plugin.FlowThemeSelector
+
+
+
+ ..\..\Output\Release\Plugins\Flow.Launcher.Plugin.FlowThemeSelector
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+ PreserveNewest
+
+
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs
new file mode 100644
index 000000000..6fd6472db
--- /dev/null
+++ b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Flow.Launcher.Core.Resource;
+
+namespace Flow.Launcher.Plugin.FlowThemeSelector
+{
+ public class FlowThemeSelector : IPlugin, IReloadable, IDisposable
+ {
+ private PluginInitContext context;
+ private IEnumerable themes;
+
+ public void Init(PluginInitContext context)
+ {
+ this.context = context;
+ context.API.VisibilityChanged += OnVisibilityChanged;
+ }
+
+ public List Query(Query query)
+ {
+ if (query.IsReQuery)
+ {
+ LoadThemes();
+ }
+
+ if (string.IsNullOrWhiteSpace(query.Search))
+ {
+ return themes.Select(CreateThemeResult)
+ .OrderBy(x => x.Title)
+ .ToList();
+ }
+
+ return themes.Select(theme => (theme, matchResult: context.API.FuzzySearch(query.Search, theme)))
+ .Where(x => x.matchResult.IsSearchPrecisionScoreMet())
+ .Select(x => CreateThemeResult(x.theme, x.matchResult.Score, x.matchResult.MatchData))
+ .OrderBy(x => x.Title)
+ .ToList();
+ }
+
+ private void OnVisibilityChanged(object sender, VisibilityChangedEventArgs args)
+ {
+ if (args.IsVisible && !context.CurrentPluginMetadata.Disabled)
+ {
+ LoadThemes();
+ }
+ }
+
+ public void LoadThemes() => themes = ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension);
+
+ public static Result CreateThemeResult(string theme) => CreateThemeResult(theme, 0, null);
+
+ public static Result CreateThemeResult(string theme, int score, IList highlightData)
+ {
+ string title;
+ if (theme == ThemeManager.Instance.Settings.Theme)
+ {
+ title = $"{theme} ★";
+ score = 2000;
+ }
+ else
+ {
+ title = theme;
+ }
+
+ return new Result
+ {
+ Title = title,
+ TitleHighlightData = highlightData,
+ Glyph = new GlyphInfo("/Resources/#Segoe Fluent Icons", "\ue790"),
+ Score = score,
+ Action = c =>
+ {
+ ThemeManager.Instance.ChangeTheme(theme);
+ return true;
+ }
+ };
+ }
+
+ public void ReloadData() => LoadThemes();
+
+ public void Dispose()
+ {
+ if (context != null && context.API != null)
+ {
+ context.API.VisibilityChanged -= OnVisibilityChanged;
+ }
+ }
+
+ }
+}
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/icon.png b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..704e9474eb29ffa1fcaeff9e24c60ee35155afd5
GIT binary patch
literal 6625
zcmV<786M_|P)?L~#_W&dT5+Df~tR%E=9kt)zb>9h)AYqsw`j&HD=X&5T
zo_x;9xxe?h&+}kl&}CiLWnI=~UDjn?)@5DRWnK1+nBx`2yKb4XkC_>=6)stFZLT1&5Y;r?b&_2|)x3Z7H-nk27~+~O4{^jFQ6z?V_@jHd8Y)Ztgd
zAyMTCRj|KUDX@>PUTc*idEMZjU{-l}$t_2|z%@sHoj|YmPJvGYPzAgAO4!Cpg|=~(
zvkidf4E|TmHCH~yHAlgAV>N=;8~pSZ;3sQ`UmpOwI1+?P*v3lIY~n?I4E~qQ?ULNw
zEvGJug70wnwavnJY!iGbb?az}+$Kgk!{Avr$18Zzja9eDm8E#l;qdDN&>Z}v7U0L%
z!&e5tCPwAa5?Duz_dK&D$u;Z0rtYk|EH_pi9v8l6t`J_Of!JC7CBBv~#whgirZXG4yg=vvTth_=(NKS1&!y!Y3XnCP6rBumjH<
zJoN@V@0P3h#XYwU?Sh}J8GvbdsW|e$3ju#E!;$+-;r-_#?5&&M5P+59iC82Yi`iu(
zF@zP}Dtw1F!j0o8{&s@M9l^Z(R>RQUyPpxCoY^qE8K;
zMjMhMdEK3*h|?85GgF3n>=W3nn1>&JUx0moETpC9JHY_6V;
zbKXJ(eqW=4zeG3=^UFuk>>pn|6vNqrF*xr-IK+#!YJI1WDhxjQCx#rqPp|Gi
zaxj0Yg!67;V*u9PhQ*4ju<|R?4*x<0EQp5)S9dmhgQ-Dy!HrcHqA&PNqU}?pSSp->
zRpLolEtyQq4Y`s<*Gn`Wi-lt`pFavSN{3@o$%h!l@x+IBJm7w7C>-KN6ns!ztik@-CqO74-zt
z2VqdYE1a)Rhkcv~4i}}Gax+c}hhr6R*(U|_=W4kAQUm7CRdCrSq1o^7RVi$@7GdCq
z0$6^217=Gv;r)e~=>PQ%ScO&8*L_%qs>2sjHwzMM?==4Ith&_{ewzazZ+(|b0+1}l
zh-*HyzRxQsK8ix0Q#JxKONV1BZx|+&e2CE;CH%n!Zg9EHfL;0zu#c;NJqduC+_a4q
z!{LW=IDIFC^Ij1cdqr^GBZAX+0yyj{gWZ?KH2dqzPyfX%^qrrMK1(xTbwSVopJsnZ
z1uW{}2h#w^tb#hBgUY-tW4N;v_gaEKI=2MJZ)`;2EnC#xcoTJ3-bMk-3CFTFV`NrI
z^8v`Hr2%kBW@A$ESWMv#qrk~^GWR12eoWB^7{MNb4+}joINue_+YH!W8wA_feAvfU
zz@8`_^<8dM1?+Z|&^k|m*Sq}=9_+Ri!-l|Lmj}yL*Ol4-Nf!FdNkOmKiLg9h-Yk4`
zC486#3efLd`NAg(-y=izANSlkUQ6(|T|0r_xo_ZM(erp%@B;q2^)LK&^(8#WeHjn3
zUV$vN8#bk#YPQG2NU4N#f*5WYAsAis0mc-0(o!>uGlVX-9~BOQXMsCB@|a-UV!-}}
z6KoRB!7fSwyI7H?)+hQtN(k%CcjzKZN{!Mv^mprx1vK*sd~>hM=(i{vedndYbVeeK
zr^Uk}xD1vdLM8l=Ch&s<=uZQ{Pk*8TaAVa)wgi9ce
zqxY;Nm`sU>@qz?c1eL+!yg)1b{^$7Ucc%RB_k+s&JsJ3y>gKdqcCw35m;V+X7QUc#
zlKr>;g}<)9hzFNn!h@Wb@gU%+zJpEFE!aht!!}w7yBHBIKN`E-7%>fiD6NSRhsqvm$1<9(<~MIWb~RE52Fdu=)E}`<}?8OM)<)^;1fT~N8dB0t2!J$
zGh6nKd#*yFb-~S+coZFE(a>_A9ub{wnS#{~Px%zJ_}-ufs2H3z=rn
zY%Ql$!-;IFE{fq0Cxm@;Iqaj#U>C`QT?Fw`*hZAm%x{D*eYCG1BY|~<00RPf=%EvOx4
zRxJuI+2OBiFVc*sPJX`f5*}Q7xiR}wU&Z~z*KjZHb=-@31GgfXwCp@`sFGX_rvwQc
zFN)wm7S~t->|>N}7cEfMd{TDQ;m2zps*wJUb%YQDLd#&`ork^)(rKnsl`}7mF1DoP
z^qQUklgY6#8Xtw8W5Up9_hp!$<-#nmtX25$pDst=)8(}tx-)jqQFyrLDE@9qYBJNS
zpY`(8g4pR~<;Xu9#WRn#yqFSG*
z9kSq(n%_`%wDk3@BP%d4jE?~!r7-*H7EI?P(?ym*C*{VNfG1f$HUd4zN1)HQmtc0L
z1ZHP>Fb^u%gdf-hKFNL(fKz2KJ;k%@umHHR>QYFB~YE8?BDzv3s35Nut^DEol*N+loV3+^{E|kM6mP9P5Mgx$a
z>WKSkuPW<&y%X?c(M@UsKm1MH4S5Te(DZ+qIJ_ejGgJm!e
zmgkCLd6ol2C}ox2y_qVOvNjqzb@K3#0dH=sQ;Jk3oqw0fvQ`#J(xhLqD?F4<@it#3}D
z6EBCk3Vc)e{Z#PZZw7wv6Q$_&YiYLL1K^gUNNj6^jg%lpvKSlVkK=Ci8%p5h8uf+}
zeE6HV8>%cjcZ1%-f6x5~Yr_NJ7%!sVfVRTdHb&C0=xV@kp|5|T0+t~HJ4P
zY!k(Es;sf}sNkCt|CO7sSNJYD^8Ri)^1s{K-E_&Q0V7okMv@pCV~(Rbyr(kTX~wI-
z2fu|s1K&pFITNf6I}XRV3gw0?sZysIo_536?CZC>(Q1^NP2krD;8z|@j`Pa&8UR<8
z!n<9qWztTd-vS93i6RV(y9wWjjktN9iJG9Es1EFjn}M!46tW3Jqi-sAxfjK7Ops8y
z*=G3hEx>PBbekNex7gQjEBtb;@J$1F=oP@N*6%4-jzZS%zCPK}rYcL3bD{`N@d7x-
z@!=F#4#(Jf=fg3+g2E@Y-zm9DPXkn~!`Ir^4;H}g6d&{Ulwj-n0_^_mI=)_f32Rs8
zV)D)#unOR*DV`?qezm%=Hz
zQmyQC&LAG~ufPVB}v?q?Z7=
z=g3F41b;+=2;RG6knyQEIOBJsaO`#@&-)4cc7RJf6SLCAGH;wBQ}Hk@fRrmXajDK+>8~zSseo3Ru{S1
z+=
ze6$3HM@o|Q6aYnbbMV*t=Rz=kCxtH+N9)8+~hiqVZ30v2|WDRXL>8)H_*px6e+*wpsB?_|qb=e#!-`nHYps
z<43Xew?+)NpM{yH3Gqqb7$#7XAY!>=ztMIWvM
z`-3$o9I_e(gI3|&Z9&RKSC0=%42+h94UCWuv56PGMtne|$kQrZ9PtQzEn2@}qjk0n
z@1Npg`I2M``pa1fD!)j7-#RlEo2N%Nz+XEl2%k?lgB4?c!^~NMF!mz>D560i@C^?a
z!{~6yXq^M#mZ@0WT#F%f?vJ$At9w2Cl3@gXWA@(}{5kRmtwi*cui>Q8VyJ1m)^Bd3
z6(#vX+kIPxi?_6<^)*_{BmgJ57`Hi#)^`GX^NeVE-84Olg5Nkb4C^O{(7I3Ik2?vk
zF##C5Iu=HLg)lx+1fwI30qEg-r?<`laLrPD|40DRs!%XyD}~J+u5t=~BZ}4FlkC4U
zjDm&7iy19~dnOYwg}GLn|U%n&Hvt>ywu9ZzZtw%g34-;n*-Wi~`><
zg?K0hzjjhER!=;KRpXVJPvCzt{y6&laves#g)kynuYzyrTcps-V@%9!d6fzJUGk6v9Jys&meK~SHS1a2M+D67Nwtb^T%1&$dZXPE3
zK?uoZ)Hc>-Rm$MV|l;+`eI9&Ez0jW=OWLnHWeHTLOONxKmg@_5{2}AIFkWN8zwF
z1xAPRVd%$hgzs03o`*QmI>T25;D*LVD}(fQDv>aAFN%h)qrj;Ttp~prY)=CJb0z#i
zO8B?jmLYP&PGz$#u~KKPZ`FqJKl8B4H(G+|WF68Y8`0*;-Bz!Rx04Tpqec1zioi3VzPuRamqyo(@krs7A&0*w^2p
z75;g_Hk}St0=O_eRtyvWBA6UuD>qtXq4gus$(5}vJ5Avq;-H&1+g5J@aLJTcKhoKx
zqk_tBf%C-*c!m_>n~kRsF>xny2d$(YHhw$4TK^k7g6_aRny(xaC)rQtciN-%qg&qP
zT833b4hR!{K-L7}W+9@XH1nI&`mK$TXzA;l_?N)MzgW4^I#R5m^&8;R0C3RVhjU49
z@KpgQYqqUSTFRt{pD3n>Dh{!HI7FAjA-WXyQN+odX1Q{7upWMbD*HR|P{l&qM(c6m
zAJc5Gslzu^!B=KK2R#mQ(ER{=iCzQ1%#`J6?dzwKv2iI40-0nWXS!r?)*)8u%9{T;
z@TD!nZ&Pboi`LgR!=r>>+79@|8t~sc$U%<-oVs`RbM*U+7&BAGYVkchq^n7e5fdeF
zB-0GU8|F5}4K@FX_Vt5W(E8fotFpi8p-KaMwH}YU+-!hPvfrohJH5hJ2B7w0n_q%N
zjuexslp8J5TF`lbN}?zD&Cl>O51-c#_(cuyd-xQ}jepF0NACe(WXO(o+)I$8YVak0
z4~&wWCi>nswDxVs2;sl2BZLkEBE;Vf2p7paYKBJxen1oW{!QRFqj;3?*+lt#rFZx=
z0O_(V9r+R@8=~`LBm$cliHEj(u#OVjuBI86I``+;+g{pu0D_=B=N3Z+A!l
zm>D%=JMtw+)-e*ceORSoYxiLlA?#&&p+eCy15|2@ZhPS$V56H)p_f5NnOkP1VY9D&
z)W=JZqNT;QkyS=*y%)<1!d)#Ms&tUtY^wDe;M3AmnBC#;3}U3!6l;6u=HtEuiIg3y
z2w|`G+=pebz`nDzesl12>_zIP$ZU`O5)
zdb=+0oO5b*kzQtaqNI;~P+<`yaBU5~wudG3qxI|Ivn&6zujt9XXWBWXda1EMqbhAlw5uDv9*4*^rS9op??V9)+|VH_i-PV
z&{^wK_-wrEeP^3NXPHxKt-V8H^?%zYH#J%e2X%qpFQ}rMS+JnEGqpbPclQ_i8g#Zf
zBvwtdPpG=zCaoVW`P({LvQwA8XB8xQy?>D4a@*x*^AAgCQ#^)k(E2L)Ay3Ua;T#jI
z7dQ1X*TeTxQAIF|Bv=O7~KI{
z|E$5`D>^6AGil~Q{Led6>v!MJ)=4-#^VUB|kfc@dXninRclg~76yELb&0cKqPq%*O
z_}nM1^}X4`?)y2+&i?FAh4nwn|F14uzrFCg9Vm?G{!2-Z&i>p_jrBWMF6l6>uLi&S
z0d`F{pTfDF{du1{>vx8Ku0yrH5Bu-#KJ1`(4;S?8?9cjCTK_YAm-kPX{jDGPk7#{X
zPjB|1&i;%~z4bX=ept_1pVjkV;bWae{3ESj4Cm$Er^=#qg6~^&|Gh&+XL|UsT{`>o
zJewAT7y6vw?d*Mm_eWc`eow!mKYRKXNA&PzFEBpZ0mD-NL^J-i+^AOocZ11sZgQ^x
z9^d#F_nz@FuFU9YNr{nv@g>6}C8rIK6s>*Fk3G1XPu@S{|37wFmvvc}by=5nS(kNL
fmvx!JvuOVh5a5F)ThAaT00000NkvXXu0mjfwnX-y
literal 0
HcmV?d00001
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
new file mode 100644
index 000000000..f275d129c
--- /dev/null
+++ b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
@@ -0,0 +1,12 @@
+{
+ "ID": "4DFA743E1086414BAB0AA3071D561D75",
+ "ActionKeyword": "flowtheme",
+ "Name": "Flow Launcher Theme Selector",
+ "Description": "Quickly switch your Flow Launcher theme.",
+ "Author": "Odotocodot",
+ "Version": "1.0.0",
+ "Language": "csharp",
+ "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
+ "IcoPath": "icon.png",
+ "ExecuteFileName": "Flow.Launcher.Plugin.FlowThemeSelector.dll"
+}
\ No newline at end of file
From 3abd05f6b3a687e73fc9e6ab0f09ec2af2f6c06a Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 18 Nov 2023 14:58:16 +0800
Subject: [PATCH 0006/1442] Implement double pinyin
---
.../DoublePinAlphabet.cs | 193 ++++++++++++++++++
.../UserSettings/Settings.cs | 2 +
2 files changed, 195 insertions(+)
create mode 100644 Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
new file mode 100644
index 000000000..607582097
--- /dev/null
+++ b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
@@ -0,0 +1,193 @@
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Text;
+using Flow.Launcher.Infrastructure.UserSettings;
+using ToolGood.Words.Pinyin;
+
+namespace Flow.Launcher.Infrastructure
+{
+ public class DoublePinAlphabet : IAlphabet
+ {
+ private ConcurrentDictionary _doublePinCache =
+ new ConcurrentDictionary();
+
+ private Settings _settings;
+
+ public void Initialize([NotNull] Settings settings)
+ {
+ _settings = settings ?? throw new ArgumentNullException(nameof(settings));
+ }
+
+ public bool CanBeTranslated(string stringToTranslate)
+ {
+ return WordsHelper.HasChinese(stringToTranslate);
+ }
+
+ public (string translation, TranslationMapping map) Translate(string content)
+ {
+ if (_settings.ShouldUseDoublePin)
+ {
+ if (!_doublePinCache.ContainsKey(content))
+ {
+ return BuildCacheFromContent(content);
+ }
+ else
+ {
+ return _doublePinCache[content];
+ }
+ }
+ return (content, null);
+ }
+
+ private (string translation, TranslationMapping map) BuildCacheFromContent(string content)
+ {
+ if (WordsHelper.HasChinese(content))
+ {
+ var resultList = WordsHelper.GetPinyinList(content).Select(ToDoublePin).ToArray();
+ StringBuilder resultBuilder = new StringBuilder();
+ TranslationMapping map = new TranslationMapping();
+
+ bool pre = false;
+
+ for (int i = 0; i < resultList.Length; i++)
+ {
+ if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
+ {
+ map.AddNewIndex(i, resultBuilder.Length, resultList[i].Length + 1);
+ resultBuilder.Append(' ');
+ resultBuilder.Append(resultList[i]);
+ pre = true;
+ }
+ else
+ {
+ if (pre)
+ {
+ pre = false;
+ resultBuilder.Append(' ');
+ }
+
+ resultBuilder.Append(resultList[i]);
+ }
+ }
+
+ map.endConstruct();
+
+ var key = resultBuilder.ToString();
+ map.setKey(key);
+
+ return _doublePinCache[content] = (key, map);
+ }
+ else
+ {
+ return (content, null);
+ }
+ }
+
+ private static readonly ReadOnlyDictionary special = new(new Dictionary(){
+ {"a", "aa"},
+ {"ai", "ai"},
+ {"an", "an"},
+ {"ang", "ah"},
+ {"ao", "ao"},
+ {"e", "ee"},
+ {"ei", "ei"},
+ {"en", "en"},
+ {"er", "er"},
+ {"o", "oo"},
+ {"ou", "ou"}
+ });
+
+
+ private static readonly ReadOnlyDictionary first = new(new Dictionary(){
+ {"ch", "i"},
+ {"sh", "u"},
+ {"zh", "v"}
+ });
+
+
+ private static readonly ReadOnlyDictionary second = new(new Dictionary()
+ {
+ {"ua", "x"},
+ {"ei", "w"},
+ {"e", "e"},
+ {"ou", "z"},
+ {"iu", "q"},
+ {"ve", "t"},
+ {"ue", "t"},
+ {"u", "u"},
+ {"i", "i"},
+ {"o", "o"},
+ {"uo", "o"},
+ {"ie", "p"},
+ {"a", "a"},
+ {"ong", "s"},
+ {"iong", "s"},
+ {"ai", "d"},
+ {"ing", "k"},
+ {"uai", "k"},
+ {"ang", "h"},
+ {"uan", "r"},
+ {"an", "j"},
+ {"en", "f"},
+ {"ia", "x"},
+ {"iang", "l"},
+ {"uang", "l"},
+ {"eng", "g"},
+ {"in", "b"},
+ {"ao", "c"},
+ {"v", "v"},
+ {"ui", "v"},
+ {"un", "y"},
+ {"iao", "n"},
+ {"ian", "m"}
+ });
+
+ private static string ToDoublePin(string fullPinyin)
+ {
+ // Assuming s is valid
+ StringBuilder doublePin = new StringBuilder();
+
+ if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
+ {
+ if (special.ContainsKey(fullPinyin))
+ {
+ return special[fullPinyin];
+ }
+ }
+
+ // zh, ch, sh
+ if (fullPinyin.Length >= 2 && first.ContainsKey(fullPinyin[..2]))
+ {
+ doublePin.Append(first[fullPinyin[..2]]);
+
+ if (second.TryGetValue(fullPinyin[2..], out string tmp))
+ {
+ doublePin.Append(tmp);
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[2..]);
+ }
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[0]);
+
+ if (second.TryGetValue(fullPinyin[1..], out string tmp))
+ {
+ doublePin.Append(tmp);
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[1..]);
+ }
+ }
+
+ return doublePin.ToString();
+ }
+ }
+}
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 458846665..8d94cdba5 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -185,6 +185,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// when false Alphabet static service will always return empty results
///
public bool ShouldUsePinyin { get; set; } = false;
+
+ public bool ShouldUseDoublePin { get; set; } = false;
public bool AlwaysPreview { get; set; } = false;
public bool AlwaysStartEn { get; set; } = false;
From fb6635344b8e5ecae06aadd31a3b112471b48ae2 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 18 Nov 2023 14:58:23 +0800
Subject: [PATCH 0007/1442] Test double pinyin
---
Flow.Launcher/App.xaml.cs | 2 +-
Flow.Launcher/PublicAPIInstance.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 765a1a559..d74ea62fb 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -30,7 +30,7 @@ namespace Flow.Launcher
private SettingWindowViewModel _settingsVM;
private readonly Updater _updater = new Updater(Flow.Launcher.Properties.Settings.Default.GithubRepo);
private readonly Portable _portable = new Portable();
- private readonly PinyinAlphabet _alphabet = new PinyinAlphabet();
+ private readonly DoublePinAlphabet _alphabet = new DoublePinAlphabet();
private StringMatcher _stringMatcher;
[STAThread]
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index b49bf39d3..952ce0edb 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -32,11 +32,11 @@ namespace Flow.Launcher
{
private readonly SettingWindowViewModel _settingsVM;
private readonly MainViewModel _mainVM;
- private readonly PinyinAlphabet _alphabet;
+ private readonly DoublePinAlphabet _alphabet;
#region Constructor
- public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, PinyinAlphabet alphabet)
+ public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, DoublePinAlphabet alphabet)
{
_settingsVM = settingsVM;
_mainVM = mainVM;
From f6ae71a99f838b2237c14c62c6daff5e97e6eec0 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 18 Nov 2023 20:24:13 +0800
Subject: [PATCH 0008/1442] Only convert to double pinyin when meeting Chinese
---
Flow.Launcher.Infrastructure/DoublePinAlphabet.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
index 607582097..e09046410 100644
--- a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
@@ -47,7 +47,7 @@ namespace Flow.Launcher.Infrastructure
{
if (WordsHelper.HasChinese(content))
{
- var resultList = WordsHelper.GetPinyinList(content).Select(ToDoublePin).ToArray();
+ var resultList = WordsHelper.GetPinyinList(content);
StringBuilder resultBuilder = new StringBuilder();
TranslationMapping map = new TranslationMapping();
@@ -57,9 +57,10 @@ namespace Flow.Launcher.Infrastructure
{
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
{
- map.AddNewIndex(i, resultBuilder.Length, resultList[i].Length + 1);
+ string dp = ToDoublePin(resultList[i].ToLower());
+ map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
resultBuilder.Append(' ');
- resultBuilder.Append(resultList[i]);
+ resultBuilder.Append(dp);
pre = true;
}
else
From e5285b19921ae2cc49b6f55ebe5772a77f05cd54 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 19 Nov 2023 12:30:17 +0800
Subject: [PATCH 0009/1442] Temp: compatibility with full pinyin option
---
Flow.Launcher.Infrastructure/DoublePinAlphabet.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
index e09046410..e6930ad93 100644
--- a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
@@ -29,7 +29,7 @@ namespace Flow.Launcher.Infrastructure
public (string translation, TranslationMapping map) Translate(string content)
{
- if (_settings.ShouldUseDoublePin)
+ if (_settings.ShouldUsePinyin)
{
if (!_doublePinCache.ContainsKey(content))
{
@@ -57,7 +57,7 @@ namespace Flow.Launcher.Infrastructure
{
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
{
- string dp = ToDoublePin(resultList[i].ToLower());
+ string dp = _settings.ShouldUseDoublePin ? resultList[i] : ToDoublePin(resultList[i].ToLower());
map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
resultBuilder.Append(' ');
resultBuilder.Append(dp);
From 99ff3b2ec5c9a4d8b4f136735a866f52914c246e Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Mon, 20 Nov 2023 22:49:39 +0800
Subject: [PATCH 0010/1442] Fix wrong condition
---
Flow.Launcher.Infrastructure/DoublePinAlphabet.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
index e6930ad93..a1eb788d7 100644
--- a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
@@ -57,7 +57,7 @@ namespace Flow.Launcher.Infrastructure
{
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
{
- string dp = _settings.ShouldUseDoublePin ? resultList[i] : ToDoublePin(resultList[i].ToLower());
+ string dp = _settings.ShouldUseDoublePin ? ToDoublePin(resultList[i].ToLower()) : resultList[i];
map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
resultBuilder.Append(' ');
resultBuilder.Append(dp);
From 46d49d8fdf373e020481b111cbd23bf8ee09538d Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sat, 25 May 2024 15:02:37 +0800
Subject: [PATCH 0011/1442] Only translate when string is double pinyin
---
Flow.Launcher.Infrastructure/DoublePinAlphabet.cs | 4 ++--
Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 4 ++--
Flow.Launcher.Infrastructure/StringMatcher.cs | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
index a1eb788d7..945f47a56 100644
--- a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
@@ -22,9 +22,9 @@ namespace Flow.Launcher.Infrastructure
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
}
- public bool CanBeTranslated(string stringToTranslate)
+ public bool ShouldTranslate(string stringToTranslate)
{
- return WordsHelper.HasChinese(stringToTranslate);
+ return stringToTranslate.Length % 2 == 0 && !WordsHelper.HasChinese(stringToTranslate);
}
public (string translation, TranslationMapping map) Translate(string content)
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index 7d7235968..961af1d32 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -119,7 +119,7 @@ namespace Flow.Launcher.Infrastructure
///
/// String to translate.
///
- public bool CanBeTranslated(string stringToTranslate);
+ public bool ShouldTranslate(string stringToTranslate);
}
public class PinyinAlphabet : IAlphabet
@@ -134,7 +134,7 @@ namespace Flow.Launcher.Infrastructure
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
}
- public bool CanBeTranslated(string stringToTranslate)
+ public bool ShouldTranslate(string stringToTranslate)
{
return WordsHelper.HasChinese(stringToTranslate);
}
diff --git a/Flow.Launcher.Infrastructure/StringMatcher.cs b/Flow.Launcher.Infrastructure/StringMatcher.cs
index bd5dbdda9..4929e4cd2 100644
--- a/Flow.Launcher.Infrastructure/StringMatcher.cs
+++ b/Flow.Launcher.Infrastructure/StringMatcher.cs
@@ -61,7 +61,7 @@ namespace Flow.Launcher.Infrastructure
query = query.Trim();
TranslationMapping translationMapping = null;
- if (_alphabet is not null && !_alphabet.CanBeTranslated(query))
+ if (_alphabet is not null && _alphabet.ShouldTranslate(query))
{
// We assume that if a query can be translated (containing characters of a language, like Chinese)
// it actually means user doesn't want it to be translated to English letters.
From b1cb852673005e955b1d4bd0bb2ed692e44308c9 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 14:18:57 +0800
Subject: [PATCH 0012/1442] Extract classes
---
Flow.Launcher.Infrastructure/IAlphabet.cs | 22 ++++
.../PinyinAlphabet.cs | 113 ------------------
.../TranslationMapping.cs | 99 +++++++++++++++
3 files changed, 121 insertions(+), 113 deletions(-)
create mode 100644 Flow.Launcher.Infrastructure/IAlphabet.cs
create mode 100644 Flow.Launcher.Infrastructure/TranslationMapping.cs
diff --git a/Flow.Launcher.Infrastructure/IAlphabet.cs b/Flow.Launcher.Infrastructure/IAlphabet.cs
new file mode 100644
index 000000000..e79ec0c6d
--- /dev/null
+++ b/Flow.Launcher.Infrastructure/IAlphabet.cs
@@ -0,0 +1,22 @@
+namespace Flow.Launcher.Infrastructure
+{
+ ///
+ /// Translate a language to English letters using a given rule.
+ ///
+ public interface IAlphabet
+ {
+ ///
+ /// Translate a string to English letters, using a given rule.
+ ///
+ /// String to translate.
+ ///
+ public (string translation, TranslationMapping map) Translate(string stringToTranslate);
+
+ ///
+ /// Determine if a string can be translated to English letter with this Alphabet.
+ ///
+ /// String to translate.
+ ///
+ public bool ShouldTranslate(string stringToTranslate);
+ }
+}
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index 961af1d32..d98d823d7 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -9,119 +9,6 @@ using ToolGood.Words.Pinyin;
namespace Flow.Launcher.Infrastructure
{
- public class TranslationMapping
- {
- private bool constructed;
-
- private List originalIndexs = new List();
- private List translatedIndexs = new List();
- private int translatedLength = 0;
-
- public string key { get; private set; }
-
- public void setKey(string key)
- {
- this.key = key;
- }
-
- public void AddNewIndex(int originalIndex, int translatedIndex, int length)
- {
- if (constructed)
- throw new InvalidOperationException("Mapping shouldn't be changed after constructed");
-
- originalIndexs.Add(originalIndex);
- translatedIndexs.Add(translatedIndex);
- translatedIndexs.Add(translatedIndex + length);
- translatedLength += length - 1;
- }
-
- public int MapToOriginalIndex(int translatedIndex)
- {
- if (translatedIndex > translatedIndexs.Last())
- return translatedIndex - translatedLength - 1;
-
- int lowerBound = 0;
- int upperBound = originalIndexs.Count - 1;
-
- int count = 0;
-
- // Corner case handle
- if (translatedIndex < translatedIndexs[0])
- return translatedIndex;
- if (translatedIndex > translatedIndexs.Last())
- {
- int indexDef = 0;
- for (int k = 0; k < originalIndexs.Count; k++)
- {
- indexDef += translatedIndexs[k * 2 + 1] - translatedIndexs[k * 2];
- }
-
- return translatedIndex - indexDef - 1;
- }
-
- // Binary Search with Range
- for (int i = originalIndexs.Count / 2;; count++)
- {
- if (translatedIndex < translatedIndexs[i * 2])
- {
- // move to lower middle
- upperBound = i;
- i = (i + lowerBound) / 2;
- }
- else if (translatedIndex > translatedIndexs[i * 2 + 1] - 1)
- {
- lowerBound = i;
- // move to upper middle
- // due to floor of integer division, move one up on corner case
- i = (i + upperBound + 1) / 2;
- }
- else
- return originalIndexs[i];
-
- if (upperBound - lowerBound <= 1 &&
- translatedIndex > translatedIndexs[lowerBound * 2 + 1] &&
- translatedIndex < translatedIndexs[upperBound * 2])
- {
- int indexDef = 0;
-
- for (int j = 0; j < upperBound; j++)
- {
- indexDef += translatedIndexs[j * 2 + 1] - translatedIndexs[j * 2];
- }
-
- return translatedIndex - indexDef - 1;
- }
- }
- }
-
- public void endConstruct()
- {
- if (constructed)
- throw new InvalidOperationException("Mapping has already been constructed");
- constructed = true;
- }
- }
-
- ///
- /// Translate a language to English letters using a given rule.
- ///
- public interface IAlphabet
- {
- ///
- /// Translate a string to English letters, using a given rule.
- ///
- /// String to translate.
- ///
- public (string translation, TranslationMapping map) Translate(string stringToTranslate);
-
- ///
- /// Determine if a string can be translated to English letter with this Alphabet.
- ///
- /// String to translate.
- ///
- public bool ShouldTranslate(string stringToTranslate);
- }
-
public class PinyinAlphabet : IAlphabet
{
private ConcurrentDictionary _pinyinCache =
diff --git a/Flow.Launcher.Infrastructure/TranslationMapping.cs b/Flow.Launcher.Infrastructure/TranslationMapping.cs
new file mode 100644
index 000000000..f288c816a
--- /dev/null
+++ b/Flow.Launcher.Infrastructure/TranslationMapping.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Flow.Launcher.Infrastructure
+{
+ public class TranslationMapping
+ {
+ private bool constructed;
+
+ private List originalIndexs = new List();
+ private List translatedIndexs = new List();
+ private int translatedLength = 0;
+
+ public string key { get; private set; }
+
+ public void setKey(string key)
+ {
+ this.key = key;
+ }
+
+ public void AddNewIndex(int originalIndex, int translatedIndex, int length)
+ {
+ if (constructed)
+ throw new InvalidOperationException("Mapping shouldn't be changed after constructed");
+
+ originalIndexs.Add(originalIndex);
+ translatedIndexs.Add(translatedIndex);
+ translatedIndexs.Add(translatedIndex + length);
+ translatedLength += length - 1;
+ }
+
+ public int MapToOriginalIndex(int translatedIndex)
+ {
+ if (translatedIndex > translatedIndexs.Last())
+ return translatedIndex - translatedLength - 1;
+
+ int lowerBound = 0;
+ int upperBound = originalIndexs.Count - 1;
+
+ int count = 0;
+
+ // Corner case handle
+ if (translatedIndex < translatedIndexs[0])
+ return translatedIndex;
+ if (translatedIndex > translatedIndexs.Last())
+ {
+ int indexDef = 0;
+ for (int k = 0; k < originalIndexs.Count; k++)
+ {
+ indexDef += translatedIndexs[k * 2 + 1] - translatedIndexs[k * 2];
+ }
+
+ return translatedIndex - indexDef - 1;
+ }
+
+ // Binary Search with Range
+ for (int i = originalIndexs.Count / 2;; count++)
+ {
+ if (translatedIndex < translatedIndexs[i * 2])
+ {
+ // move to lower middle
+ upperBound = i;
+ i = (i + lowerBound) / 2;
+ }
+ else if (translatedIndex > translatedIndexs[i * 2 + 1] - 1)
+ {
+ lowerBound = i;
+ // move to upper middle
+ // due to floor of integer division, move one up on corner case
+ i = (i + upperBound + 1) / 2;
+ }
+ else
+ return originalIndexs[i];
+
+ if (upperBound - lowerBound <= 1 &&
+ translatedIndex > translatedIndexs[lowerBound * 2 + 1] &&
+ translatedIndex < translatedIndexs[upperBound * 2])
+ {
+ int indexDef = 0;
+
+ for (int j = 0; j < upperBound; j++)
+ {
+ indexDef += translatedIndexs[j * 2 + 1] - translatedIndexs[j * 2];
+ }
+
+ return translatedIndex - indexDef - 1;
+ }
+ }
+ }
+
+ public void endConstruct()
+ {
+ if (constructed)
+ throw new InvalidOperationException("Mapping has already been constructed");
+ constructed = true;
+ }
+ }
+}
From 6807afbe6d753eed6984e1b1ab6019e2864767cd Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 14:03:00 +0800
Subject: [PATCH 0013/1442] Remove unused alphabet arg in PublicAPIInstance
---
Flow.Launcher/App.xaml.cs | 2 +-
Flow.Launcher/PublicAPIInstance.cs | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index d74ea62fb..560bb052b 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -74,7 +74,7 @@ namespace Flow.Launcher
PluginManager.LoadPlugins(_settings.PluginSettings);
_mainVM = new MainViewModel(_settings);
- API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet);
+ API = new PublicAPIInstance(_settingsVM, _mainVM);
Http.API = API;
Http.Proxy = _settings.Proxy;
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 952ce0edb..e14d692cd 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -32,15 +32,13 @@ namespace Flow.Launcher
{
private readonly SettingWindowViewModel _settingsVM;
private readonly MainViewModel _mainVM;
- private readonly DoublePinAlphabet _alphabet;
#region Constructor
- public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, DoublePinAlphabet alphabet)
+ public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM)
{
_settingsVM = settingsVM;
_mainVM = mainVM;
- _alphabet = alphabet;
GlobalHotkey.hookedKeyboardCallback = KListener_hookedKeyboardCallback;
WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
}
From a2efa11699fed4b3aac21bdff26555ce57b274aa Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 14:19:27 +0800
Subject: [PATCH 0014/1442] Merge DoublePinAlphabet logic
---
.../DoublePinAlphabet.cs | 194 ------------------
.../PinyinAlphabet.cs | 127 +++++++++++-
.../UserSettings/Settings.cs | 3 +-
Flow.Launcher/App.xaml.cs | 2 +-
4 files changed, 121 insertions(+), 205 deletions(-)
delete mode 100644 Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
diff --git a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs b/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
deleted file mode 100644
index 945f47a56..000000000
--- a/Flow.Launcher.Infrastructure/DoublePinAlphabet.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using System.Text;
-using Flow.Launcher.Infrastructure.UserSettings;
-using ToolGood.Words.Pinyin;
-
-namespace Flow.Launcher.Infrastructure
-{
- public class DoublePinAlphabet : IAlphabet
- {
- private ConcurrentDictionary _doublePinCache =
- new ConcurrentDictionary();
-
- private Settings _settings;
-
- public void Initialize([NotNull] Settings settings)
- {
- _settings = settings ?? throw new ArgumentNullException(nameof(settings));
- }
-
- public bool ShouldTranslate(string stringToTranslate)
- {
- return stringToTranslate.Length % 2 == 0 && !WordsHelper.HasChinese(stringToTranslate);
- }
-
- public (string translation, TranslationMapping map) Translate(string content)
- {
- if (_settings.ShouldUsePinyin)
- {
- if (!_doublePinCache.ContainsKey(content))
- {
- return BuildCacheFromContent(content);
- }
- else
- {
- return _doublePinCache[content];
- }
- }
- return (content, null);
- }
-
- private (string translation, TranslationMapping map) BuildCacheFromContent(string content)
- {
- if (WordsHelper.HasChinese(content))
- {
- var resultList = WordsHelper.GetPinyinList(content);
- StringBuilder resultBuilder = new StringBuilder();
- TranslationMapping map = new TranslationMapping();
-
- bool pre = false;
-
- for (int i = 0; i < resultList.Length; i++)
- {
- if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
- {
- string dp = _settings.ShouldUseDoublePin ? ToDoublePin(resultList[i].ToLower()) : resultList[i];
- map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
- resultBuilder.Append(' ');
- resultBuilder.Append(dp);
- pre = true;
- }
- else
- {
- if (pre)
- {
- pre = false;
- resultBuilder.Append(' ');
- }
-
- resultBuilder.Append(resultList[i]);
- }
- }
-
- map.endConstruct();
-
- var key = resultBuilder.ToString();
- map.setKey(key);
-
- return _doublePinCache[content] = (key, map);
- }
- else
- {
- return (content, null);
- }
- }
-
- private static readonly ReadOnlyDictionary special = new(new Dictionary(){
- {"a", "aa"},
- {"ai", "ai"},
- {"an", "an"},
- {"ang", "ah"},
- {"ao", "ao"},
- {"e", "ee"},
- {"ei", "ei"},
- {"en", "en"},
- {"er", "er"},
- {"o", "oo"},
- {"ou", "ou"}
- });
-
-
- private static readonly ReadOnlyDictionary first = new(new Dictionary(){
- {"ch", "i"},
- {"sh", "u"},
- {"zh", "v"}
- });
-
-
- private static readonly ReadOnlyDictionary second = new(new Dictionary()
- {
- {"ua", "x"},
- {"ei", "w"},
- {"e", "e"},
- {"ou", "z"},
- {"iu", "q"},
- {"ve", "t"},
- {"ue", "t"},
- {"u", "u"},
- {"i", "i"},
- {"o", "o"},
- {"uo", "o"},
- {"ie", "p"},
- {"a", "a"},
- {"ong", "s"},
- {"iong", "s"},
- {"ai", "d"},
- {"ing", "k"},
- {"uai", "k"},
- {"ang", "h"},
- {"uan", "r"},
- {"an", "j"},
- {"en", "f"},
- {"ia", "x"},
- {"iang", "l"},
- {"uang", "l"},
- {"eng", "g"},
- {"in", "b"},
- {"ao", "c"},
- {"v", "v"},
- {"ui", "v"},
- {"un", "y"},
- {"iao", "n"},
- {"ian", "m"}
- });
-
- private static string ToDoublePin(string fullPinyin)
- {
- // Assuming s is valid
- StringBuilder doublePin = new StringBuilder();
-
- if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
- {
- if (special.ContainsKey(fullPinyin))
- {
- return special[fullPinyin];
- }
- }
-
- // zh, ch, sh
- if (fullPinyin.Length >= 2 && first.ContainsKey(fullPinyin[..2]))
- {
- doublePin.Append(first[fullPinyin[..2]]);
-
- if (second.TryGetValue(fullPinyin[2..], out string tmp))
- {
- doublePin.Append(tmp);
- }
- else
- {
- doublePin.Append(fullPinyin[2..]);
- }
- }
- else
- {
- doublePin.Append(fullPinyin[0]);
-
- if (second.TryGetValue(fullPinyin[1..], out string tmp))
- {
- doublePin.Append(tmp);
- }
- else
- {
- doublePin.Append(fullPinyin[1..]);
- }
- }
-
- return doublePin.ToString();
- }
- }
-}
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index d98d823d7..37e4f93d2 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -1,18 +1,18 @@
using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
using System.Text;
using JetBrains.Annotations;
using Flow.Launcher.Infrastructure.UserSettings;
using ToolGood.Words.Pinyin;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
namespace Flow.Launcher.Infrastructure
{
public class PinyinAlphabet : IAlphabet
{
- private ConcurrentDictionary _pinyinCache =
- new ConcurrentDictionary();
+ private readonly ConcurrentDictionary _pinyinCache =
+ new();
private Settings _settings;
@@ -23,20 +23,22 @@ namespace Flow.Launcher.Infrastructure
public bool ShouldTranslate(string stringToTranslate)
{
- return WordsHelper.HasChinese(stringToTranslate);
+ return _settings.UseDoublePinyin ?
+ (WordsHelper.HasChinese(stringToTranslate) && stringToTranslate.Length % 2 == 0) :
+ WordsHelper.HasChinese(stringToTranslate);
}
public (string translation, TranslationMapping map) Translate(string content)
{
if (_settings.ShouldUsePinyin)
{
- if (!_pinyinCache.ContainsKey(content))
+ if (!_pinyinCache.TryGetValue(content, out var value))
{
return BuildCacheFromContent(content);
}
else
{
- return _pinyinCache[content];
+ return value;
}
}
return (content, null);
@@ -57,9 +59,10 @@ namespace Flow.Launcher.Infrastructure
{
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
{
- map.AddNewIndex(i, resultBuilder.Length, resultList[i].Length + 1);
+ string dp = _settings.UseDoublePinyin ? ToDoublePin(resultList[i].ToLower()) : resultList[i];
+ map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
resultBuilder.Append(' ');
- resultBuilder.Append(resultList[i]);
+ resultBuilder.Append(dp);
pre = true;
}
else
@@ -86,5 +89,111 @@ namespace Flow.Launcher.Infrastructure
return (content, null);
}
}
+
+ #region Double Pinyin
+
+ private static readonly ReadOnlyDictionary special = new(new Dictionary(){
+ {"a", "aa"},
+ {"ai", "ai"},
+ {"an", "an"},
+ {"ang", "ah"},
+ {"ao", "ao"},
+ {"e", "ee"},
+ {"ei", "ei"},
+ {"en", "en"},
+ {"er", "er"},
+ {"o", "oo"},
+ {"ou", "ou"}
+ });
+
+
+ private static readonly ReadOnlyDictionary first = new(new Dictionary(){
+ {"ch", "i"},
+ {"sh", "u"},
+ {"zh", "v"}
+ });
+
+
+ private static readonly ReadOnlyDictionary second = new(new Dictionary()
+ {
+ {"ua", "x"},
+ {"ei", "w"},
+ {"e", "e"},
+ {"ou", "z"},
+ {"iu", "q"},
+ {"ve", "t"},
+ {"ue", "t"},
+ {"u", "u"},
+ {"i", "i"},
+ {"o", "o"},
+ {"uo", "o"},
+ {"ie", "p"},
+ {"a", "a"},
+ {"ong", "s"},
+ {"iong", "s"},
+ {"ai", "d"},
+ {"ing", "k"},
+ {"uai", "k"},
+ {"ang", "h"},
+ {"uan", "r"},
+ {"an", "j"},
+ {"en", "f"},
+ {"ia", "x"},
+ {"iang", "l"},
+ {"uang", "l"},
+ {"eng", "g"},
+ {"in", "b"},
+ {"ao", "c"},
+ {"v", "v"},
+ {"ui", "v"},
+ {"un", "y"},
+ {"iao", "n"},
+ {"ian", "m"}
+ });
+
+ private static string ToDoublePin(string fullPinyin)
+ {
+ // Assuming s is valid
+ StringBuilder doublePin = new StringBuilder();
+
+ if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
+ {
+ if (special.TryGetValue(fullPinyin, out var value))
+ {
+ return value;
+ }
+ }
+
+ // zh, ch, sh
+ if (fullPinyin.Length >= 2 && first.ContainsKey(fullPinyin[..2]))
+ {
+ doublePin.Append(first[fullPinyin[..2]]);
+
+ if (second.TryGetValue(fullPinyin[2..], out string tmp))
+ {
+ doublePin.Append(tmp);
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[2..]);
+ }
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[0]);
+
+ if (second.TryGetValue(fullPinyin[1..], out string tmp))
+ {
+ doublePin.Append(tmp);
+ }
+ else
+ {
+ doublePin.Append(fullPinyin[1..]);
+ }
+ }
+
+ return doublePin.ToString();
+ }
+ #endregion
}
}
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 8d94cdba5..e79c3f52d 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -186,7 +186,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
///
public bool ShouldUsePinyin { get; set; } = false;
- public bool ShouldUseDoublePin { get; set; } = false;
+ public bool UseDoublePinyin { get; set; } = false;
+
public bool AlwaysPreview { get; set; } = false;
public bool AlwaysStartEn { get; set; } = false;
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 560bb052b..83870837a 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -30,7 +30,7 @@ namespace Flow.Launcher
private SettingWindowViewModel _settingsVM;
private readonly Updater _updater = new Updater(Flow.Launcher.Properties.Settings.Default.GithubRepo);
private readonly Portable _portable = new Portable();
- private readonly DoublePinAlphabet _alphabet = new DoublePinAlphabet();
+ private readonly PinyinAlphabet _alphabet = new PinyinAlphabet();
private StringMatcher _stringMatcher;
[STAThread]
From 12c4e37a95df44fc968a6459e7a3cbf6de4063e6 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 14:33:49 +0800
Subject: [PATCH 0015/1442] Developing
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index e79c3f52d..30e3b77be 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -186,7 +186,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
///
public bool ShouldUsePinyin { get; set; } = false;
- public bool UseDoublePinyin { get; set; } = false;
+ public bool UseDoublePinyin { get; set; } = true; //For developing
public bool AlwaysPreview { get; set; } = false;
public bool AlwaysStartEn { get; set; } = false;
From f673000d67e4ff1180e6d2856bf85f1640433a7c Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 14:37:15 +0800
Subject: [PATCH 0016/1442] Fix ShouldTranslate()
---
Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index 37e4f93d2..b48a61090 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -23,9 +23,9 @@ namespace Flow.Launcher.Infrastructure
public bool ShouldTranslate(string stringToTranslate)
{
- return _settings.UseDoublePinyin ?
- (WordsHelper.HasChinese(stringToTranslate) && stringToTranslate.Length % 2 == 0) :
- WordsHelper.HasChinese(stringToTranslate);
+ return _settings.UseDoublePinyin ?
+ (!WordsHelper.HasChinese(stringToTranslate) && stringToTranslate.Length % 2 == 0) :
+ !WordsHelper.HasChinese(stringToTranslate);
}
public (string translation, TranslationMapping map) Translate(string content)
From b10a6e19df5afcbd13ca612f6e6952f19a3b9dde Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 15:18:24 +0800
Subject: [PATCH 0017/1442] Capitalize first letter
---
.../PinyinAlphabet.cs | 104 +++++++++---------
1 file changed, 51 insertions(+), 53 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index b48a61090..cbec7feae 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -46,71 +46,69 @@ namespace Flow.Launcher.Infrastructure
private (string translation, TranslationMapping map) BuildCacheFromContent(string content)
{
- if (WordsHelper.HasChinese(content))
- {
- var resultList = WordsHelper.GetPinyinList(content);
-
- StringBuilder resultBuilder = new StringBuilder();
- TranslationMapping map = new TranslationMapping();
-
- bool pre = false;
-
- for (int i = 0; i < resultList.Length; i++)
- {
- if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
- {
- string dp = _settings.UseDoublePinyin ? ToDoublePin(resultList[i].ToLower()) : resultList[i];
- map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
- resultBuilder.Append(' ');
- resultBuilder.Append(dp);
- pre = true;
- }
- else
- {
- if (pre)
- {
- pre = false;
- resultBuilder.Append(' ');
- }
-
- resultBuilder.Append(resultList[i]);
- }
- }
-
- map.endConstruct();
-
- var key = resultBuilder.ToString();
- map.setKey(key);
-
- return _pinyinCache[content] = (key, map);
- }
- else
+ if (!WordsHelper.HasChinese(content))
{
return (content, null);
}
+
+ var resultList = WordsHelper.GetPinyinList(content);
+
+ StringBuilder resultBuilder = new StringBuilder();
+ TranslationMapping map = new TranslationMapping();
+
+ bool pre = false;
+
+ for (int i = 0; i < resultList.Length; i++)
+ {
+ if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
+ {
+ string dp = _settings.UseDoublePinyin ? ToDoublePin(resultList[i]) : resultList[i];
+ map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
+ resultBuilder.Append(' ');
+ resultBuilder.Append(dp);
+ pre = true;
+ }
+ else
+ {
+ if (pre)
+ {
+ pre = false;
+ resultBuilder.Append(' ');
+ }
+
+ resultBuilder.Append(resultList[i]);
+ }
+ }
+
+ map.endConstruct();
+
+ var key = resultBuilder.ToString();
+ map.setKey(key);
+
+ return _pinyinCache[content] = (key, map);
}
#region Double Pinyin
private static readonly ReadOnlyDictionary special = new(new Dictionary(){
- {"a", "aa"},
- {"ai", "ai"},
- {"an", "an"},
- {"ang", "ah"},
- {"ao", "ao"},
- {"e", "ee"},
- {"ei", "ei"},
- {"en", "en"},
- {"er", "er"},
- {"o", "oo"},
- {"ou", "ou"}
+ {"A", "aa"},
+ {"Ai", "ai"},
+ {"An", "an"},
+ {"Ang", "ah"},
+ {"Ao", "ao"},
+ {"E", "ee"},
+ {"Ei", "ei"},
+ {"En", "en"},
+ {"Er", "er"},
+ {"O", "oo"},
+ {"Ou", "ou"}
});
private static readonly ReadOnlyDictionary first = new(new Dictionary(){
- {"ch", "i"},
- {"sh", "u"},
- {"zh", "v"}
+ {"Ch", "i"},
+ {"Sh", "u"},
+ {"Zh", "v"}
});
From b816d1b866aa93b6d8f2da9f5cef334bda64748b Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 2 Jun 2024 15:21:04 +0800
Subject: [PATCH 0018/1442] Remove unused key in pinyin alphabet
---
Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 1 -
Flow.Launcher.Infrastructure/TranslationMapping.cs | 7 -------
2 files changed, 8 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index cbec7feae..10799c676 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -83,7 +83,6 @@ namespace Flow.Launcher.Infrastructure
map.endConstruct();
var key = resultBuilder.ToString();
- map.setKey(key);
return _pinyinCache[content] = (key, map);
}
diff --git a/Flow.Launcher.Infrastructure/TranslationMapping.cs b/Flow.Launcher.Infrastructure/TranslationMapping.cs
index f288c816a..c976fc522 100644
--- a/Flow.Launcher.Infrastructure/TranslationMapping.cs
+++ b/Flow.Launcher.Infrastructure/TranslationMapping.cs
@@ -12,13 +12,6 @@ namespace Flow.Launcher.Infrastructure
private List translatedIndexs = new List();
private int translatedLength = 0;
- public string key { get; private set; }
-
- public void setKey(string key)
- {
- this.key = key;
- }
-
public void AddNewIndex(int originalIndex, int translatedIndex, int length)
{
if (constructed)
From 49a71d7d53a3c66a3feac30f743f625f47059f83 Mon Sep 17 00:00:00 2001
From: Odotocodot <48138990+Odotocodot@users.noreply.github.com>
Date: Sat, 15 Jun 2024 12:16:36 +0100
Subject: [PATCH 0019/1442] Move Theme Selector into Sys plugin
---
...w.Launcher.Plugin.FlowThemeSelector.csproj | 37 ------------------
.../plugin.json | 12 ------
.../Flow.Launcher.Plugin.Sys.csproj | 1 +
.../Images/theme_selector.png} | Bin
.../Languages/en.xaml | 4 +-
Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 29 +++++++++++++-
.../ThemeSelector.cs} | 24 +++++++-----
7 files changed, 45 insertions(+), 62 deletions(-)
delete mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
delete mode 100644 Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
rename Plugins/{Flow.Launcher.Plugin.FlowThemeSelector/icon.png => Flow.Launcher.Plugin.Sys/Images/theme_selector.png} (100%)
rename Plugins/{Flow.Launcher.Plugin.FlowThemeSelector/Main.cs => Flow.Launcher.Plugin.Sys/ThemeSelector.cs} (72%)
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
deleted file mode 100644
index ba0ddd6ab..000000000
--- a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Flow.Launcher.Plugin.FlowThemeSelector.csproj
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- Library
- net7.0-windows
- true
- false
-
-
-
- ..\..\Output\Debug\Plugins\Flow.Launcher.Plugin.FlowThemeSelector
-
-
-
- ..\..\Output\Release\Plugins\Flow.Launcher.Plugin.FlowThemeSelector
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
- PreserveNewest
-
-
-
-
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json b/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
deleted file mode 100644
index f275d129c..000000000
--- a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/plugin.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "ID": "4DFA743E1086414BAB0AA3071D561D75",
- "ActionKeyword": "flowtheme",
- "Name": "Flow Launcher Theme Selector",
- "Description": "Quickly switch your Flow Launcher theme.",
- "Author": "Odotocodot",
- "Version": "1.0.0",
- "Language": "csharp",
- "Website": "https://github.com/Flow-Launcher/Flow.Launcher",
- "IcoPath": "icon.png",
- "ExecuteFileName": "Flow.Launcher.Plugin.FlowThemeSelector.dll"
-}
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
index c7a722189..bba466384 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
@@ -38,6 +38,7 @@
+
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/icon.png b/Plugins/Flow.Launcher.Plugin.Sys/Images/theme_selector.png
similarity index 100%
rename from Plugins/Flow.Launcher.Plugin.FlowThemeSelector/icon.png
rename to Plugins/Flow.Launcher.Plugin.Sys/Images/theme_selector.png
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml
index 91f32a844..2a266f8f6 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml
@@ -27,6 +27,7 @@
Flow Launcher TipsFlow Launcher UserData FolderToggle Game Mode
+ Set the Flow Launcher ThemeShutdown Computer
@@ -49,8 +50,9 @@
Visit Flow Launcher's documentation for more help and how to use tipsOpen the location where Flow Launcher's settings are storedToggle Game Mode
+ Quickly change the Flow Launcher theme
-
+
SuccessAll Flow Launcher settings savedReloaded all applicable plugin data
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
index 1ec07915d..0dbb46be9 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
@@ -18,9 +18,10 @@ using MessageBox = System.Windows.MessageBox;
namespace Flow.Launcher.Plugin.Sys
{
- public class Main : IPlugin, ISettingProvider, IPluginI18n
+ public class Main : IPlugin, ISettingProvider, IPluginI18n, IDisposable
{
private PluginInitContext context;
+ private ThemeSelector themeSelector;
private Dictionary KeywordTitleMappings = new Dictionary();
#region DllImport
@@ -58,6 +59,11 @@ namespace Flow.Launcher.Plugin.Sys
public List Query(Query query)
{
+ if(query.Search.StartsWith(ThemeSelector.Keyword))
+ {
+ return themeSelector.Query(query);
+ }
+
var commands = Commands();
var results = new List();
foreach (var c in commands)
@@ -106,6 +112,7 @@ namespace Flow.Launcher.Plugin.Sys
public void Init(PluginInitContext context)
{
this.context = context;
+ themeSelector = new ThemeSelector(context);
KeywordTitleMappings = new Dictionary{
{"Shutdown", "flowlauncher_plugin_sys_shutdown_computer_cmd"},
{"Restart", "flowlauncher_plugin_sys_restart_computer_cmd"},
@@ -126,7 +133,8 @@ namespace Flow.Launcher.Plugin.Sys
{"Open Log Location", "flowlauncher_plugin_sys_open_log_location_cmd"},
{"Flow Launcher Tips", "flowlauncher_plugin_sys_open_docs_tips_cmd"},
{"Flow Launcher UserData Folder", "flowlauncher_plugin_sys_open_userdata_location_cmd"},
- {"Toggle Game Mode", "flowlauncher_plugin_sys_toggle_game_mode_cmd"}
+ {"Toggle Game Mode", "flowlauncher_plugin_sys_toggle_game_mode_cmd"},
+ {"Set Flow Launcher Theme", "flowlauncher_plugin_sys_theme_selector_cmd"}
};
}
@@ -426,6 +434,18 @@ namespace Flow.Launcher.Plugin.Sys
context.API.ToggleGameMode();
return true;
}
+ },
+ new Result
+ {
+ Title = "Set Flow Launcher Theme",
+ SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_theme_selector"),
+ IcoPath = "Images\\theme_selector.png",
+ Glyph = new GlyphInfo("/Resources/#Segoe Fluent Icons", "\ue790"),
+ Action = c =>
+ {
+ context.API.ChangeQuery($"{ThemeSelector.Keyword} ");
+ return false;
+ }
}
});
@@ -441,5 +461,10 @@ namespace Flow.Launcher.Plugin.Sys
{
return context.API.GetTranslation("flowlauncher_plugin_sys_plugin_description");
}
+
+ public void Dispose()
+ {
+ themeSelector.Dispose();
+ }
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
similarity index 72%
rename from Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs
rename to Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 6fd6472db..24d17486e 100644
--- a/Plugins/Flow.Launcher.Plugin.FlowThemeSelector/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -4,14 +4,16 @@ using System.IO;
using System.Linq;
using Flow.Launcher.Core.Resource;
-namespace Flow.Launcher.Plugin.FlowThemeSelector
+namespace Flow.Launcher.Plugin.Sys
{
- public class FlowThemeSelector : IPlugin, IReloadable, IDisposable
+ public class ThemeSelector : IReloadable, IDisposable
{
- private PluginInitContext context;
+ public const string Keyword = "fltheme";
+
+ private readonly PluginInitContext context;
private IEnumerable themes;
- public void Init(PluginInitContext context)
+ public ThemeSelector(PluginInitContext context)
{
this.context = context;
context.API.VisibilityChanged += OnVisibilityChanged;
@@ -24,14 +26,16 @@ namespace Flow.Launcher.Plugin.FlowThemeSelector
LoadThemes();
}
- if (string.IsNullOrWhiteSpace(query.Search))
+ string search = query.Search[(query.Search.IndexOf(Keyword, StringComparison.Ordinal) + Keyword.Length + 1)..];
+
+ if (string.IsNullOrWhiteSpace(search))
{
return themes.Select(CreateThemeResult)
.OrderBy(x => x.Title)
.ToList();
}
- return themes.Select(theme => (theme, matchResult: context.API.FuzzySearch(query.Search, theme)))
+ return themes.Select(theme => (theme, matchResult: context.API.FuzzySearch(search, theme)))
.Where(x => x.matchResult.IsSearchPrecisionScoreMet())
.Select(x => CreateThemeResult(x.theme, x.matchResult.Score, x.matchResult.MatchData))
.OrderBy(x => x.Title)
@@ -46,11 +50,12 @@ namespace Flow.Launcher.Plugin.FlowThemeSelector
}
}
- public void LoadThemes() => themes = ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension);
+ private void LoadThemes()
+ => themes = ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension);
- public static Result CreateThemeResult(string theme) => CreateThemeResult(theme, 0, null);
+ private static Result CreateThemeResult(string theme) => CreateThemeResult(theme, 0, null);
- public static Result CreateThemeResult(string theme, int score, IList highlightData)
+ private static Result CreateThemeResult(string theme, int score, IList highlightData)
{
string title;
if (theme == ThemeManager.Instance.Settings.Theme)
@@ -86,6 +91,5 @@ namespace Flow.Launcher.Plugin.FlowThemeSelector
context.API.VisibilityChanged -= OnVisibilityChanged;
}
}
-
}
}
From 7a0be2c6103939312eeead86c3a1e01a3d618a3f Mon Sep 17 00:00:00 2001
From: Odotocodot <48138990+Odotocodot@users.noreply.github.com>
Date: Mon, 17 Jun 2024 16:50:00 +0100
Subject: [PATCH 0020/1442] Remove Reloadable from theme selector
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 24d17486e..758250421 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -6,7 +6,7 @@ using Flow.Launcher.Core.Resource;
namespace Flow.Launcher.Plugin.Sys
{
- public class ThemeSelector : IReloadable, IDisposable
+ public class ThemeSelector : IDisposable
{
public const string Keyword = "fltheme";
@@ -82,8 +82,6 @@ namespace Flow.Launcher.Plugin.Sys
};
}
- public void ReloadData() => LoadThemes();
-
public void Dispose()
{
if (context != null && context.API != null)
From dd29b4ad4419aad72c58f0dac10f4f4a2e7e530b Mon Sep 17 00:00:00 2001
From: Hongtao Zhang
Date: Sat, 22 Jun 2024 19:31:47 -0500
Subject: [PATCH 0021/1442] velopack prepare
---
Flow.Launcher.Core/Flow.Launcher.Core.csproj | 1 +
Flow.Launcher.Core/Updater.cs | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj
index fe2cb7e58..a141243b7 100644
--- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj
+++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj
@@ -57,6 +57,7 @@
+
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index 3f64b273e..df2b2dae7 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -45,8 +45,8 @@ namespace Flow.Launcher.Core
// UpdateApp CheckForUpdate will return value only if the app is squirrel installed
var newUpdateInfo = await updateManager.CheckForUpdate().NonNull().ConfigureAwait(false);
- var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString());
- var currentVersion = Version.Parse(Constant.Version);
+ var newReleaseVersion = SemanticVersioning.Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString());
+ var currentVersion = SemanticVersioning.Version.Parse(Constant.Version);
Log.Info($"|Updater.UpdateApp|Future Release <{newUpdateInfo.FutureReleaseEntry.Formatted()}>");
@@ -127,7 +127,7 @@ namespace Flow.Launcher.Core
await using var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false);
var releases = await System.Text.Json.JsonSerializer.DeserializeAsync>(jsonStream).ConfigureAwait(false);
- var latest = releases.Where(r => !r.Prerelease).OrderByDescending(r => r.PublishedAt).First();
+ var latest = releases.OrderByDescending(r => r.PublishedAt).First();
var latestUrl = latest.HtmlUrl.Replace("/tag/", "/download/");
var client = new WebClient
From b2532fc88e09977b2c62d4eec3b8ec1ec0dd43d6 Mon Sep 17 00:00:00 2001
From: "pp.stabrawa"
Date: Fri, 27 Dec 2024 12:43:43 +0100
Subject: [PATCH 0022/1442] Order search result by window title
---
.../Main.cs | 30 ++++++++-----
.../ProcessHelper.cs | 44 ++++++++++++++++++-
2 files changed, 61 insertions(+), 13 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
index be2a2dd66..03b563c9b 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using Flow.Launcher.Infrastructure;
@@ -60,30 +60,33 @@ namespace Flow.Launcher.Plugin.ProcessKiller
return menuOptions;
}
+ private record RunningProcessInfo(string ProcessName, string MainWindowTitle);
+
private List CreateResultsFromQuery(Query query)
{
string termToSearch = query.Search;
- var processlist = processHelper.GetMatchingProcesses(termToSearch);
-
- if (!processlist.Any())
+ var processList = processHelper.GetMatchingProcesses(termToSearch);
+ var processWithNonEmptyMainWindowTitleList = processHelper.GetProcessesWithNonEmptyWindowTitle();
+
+ if (!processList.Any())
{
return null;
}
var results = new List();
- foreach (var pr in processlist)
+ foreach (var pr in processList)
{
var p = pr.Process;
var path = processHelper.TryGetProcessFilename(p);
results.Add(new Result()
{
IcoPath = path,
- Title = p.ProcessName + " - " + p.Id,
+ Title = processWithNonEmptyMainWindowTitleList.TryGetValue(p.Id, out var mainWindowTitle) ? mainWindowTitle : p.ProcessName + " - " + p.Id,
SubTitle = path,
TitleHighlightData = StringMatcher.FuzzySearch(termToSearch, p.ProcessName).MatchData,
Score = pr.Score,
- ContextData = p.ProcessName,
+ ContextData = new RunningProcessInfo(p.ProcessName, mainWindowTitle),
AutoCompleteText = $"{_context.CurrentPluginMetadata.ActionKeyword}{Plugin.Query.TermSeparator}{p.ProcessName}",
Action = (c) =>
{
@@ -95,22 +98,25 @@ namespace Flow.Launcher.Plugin.ProcessKiller
});
}
- var sortedResults = results.OrderBy(x => x.Title).ToList();
+ var sortedResults = results
+ .OrderBy(x => string.IsNullOrEmpty(((RunningProcessInfo)x.ContextData).MainWindowTitle))
+ .ThenBy(x => x.Title)
+ .ToList();
// When there are multiple results AND all of them are instances of the same executable
// add a quick option to kill them all at the top of the results.
var firstResult = sortedResults.FirstOrDefault(x => !string.IsNullOrEmpty(x.SubTitle));
- if (processlist.Count > 1 && !string.IsNullOrEmpty(termToSearch) && sortedResults.All(r => r.SubTitle == firstResult?.SubTitle))
+ if (processList.Count > 1 && !string.IsNullOrEmpty(termToSearch) && sortedResults.All(r => r.SubTitle == firstResult?.SubTitle))
{
sortedResults.Insert(1, new Result()
{
IcoPath = firstResult?.IcoPath,
- Title = string.Format(_context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_all"), firstResult?.ContextData),
- SubTitle = string.Format(_context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_all_count"), processlist.Count),
+ Title = string.Format(_context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_all"), ((RunningProcessInfo)firstResult?.ContextData).ProcessName),
+ SubTitle = string.Format(_context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_all_count"), processList.Count),
Score = 200,
Action = (c) =>
{
- foreach (var p in processlist)
+ foreach (var p in processList)
{
processHelper.TryKill(p.Process);
}
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
index 0acc39fbb..5cc94dfdf 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
@@ -1,4 +1,4 @@
-using Flow.Launcher.Infrastructure;
+using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using System;
using System.Collections.Generic;
@@ -11,6 +11,20 @@ namespace Flow.Launcher.Plugin.ProcessKiller
{
internal class ProcessHelper
{
+ [DllImport("user32.dll")]
+ private static extern bool EnumWindows(EnumWindowsProc enumProc, IntPtr lParam);
+
+ private delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
+
+ [DllImport("user32.dll", CharSet = CharSet.Unicode)]
+ private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+
+ [DllImport("user32.dll")]
+ private static extern bool IsWindowVisible(IntPtr hWnd);
+
+ [DllImport("user32.dll")]
+ private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
+
private readonly HashSet _systemProcessList = new HashSet()
{
"conhost",
@@ -60,6 +74,34 @@ namespace Flow.Launcher.Plugin.ProcessKiller
return processlist;
}
+ ///
+ /// Returns a dictionary of process IDs and their window titles for processes that have a visible main window with a non-empty title.
+ ///
+ public Dictionary GetProcessesWithNonEmptyWindowTitle()
+ {
+ var processDict = new Dictionary();
+ EnumWindows((hWnd, lParam) =>
+ {
+ StringBuilder windowTitle = new StringBuilder();
+ GetWindowText(hWnd, windowTitle, windowTitle.Capacity);
+
+ if (!string.IsNullOrWhiteSpace(windowTitle.ToString()) && IsWindowVisible(hWnd))
+ {
+ GetWindowThreadProcessId(hWnd, out var processId);
+ var process = Process.GetProcessById((int)processId);
+
+ if (!processDict.ContainsKey((int)processId))
+ {
+ processDict.Add((int)processId, windowTitle.ToString());
+ }
+ }
+
+ return true;
+ }, IntPtr.Zero);
+
+ return processDict;
+ }
+
///
/// Returns all non-system processes whose file path matches the given processPath
///
From 874a785be40cf57755fd0ebadfb554f6517ac8e8 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sat, 18 Jan 2025 21:06:11 +1100
Subject: [PATCH 0023/1442] cache keywordIndex
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 758250421..d48583f26 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -26,20 +26,21 @@ namespace Flow.Launcher.Plugin.Sys
LoadThemes();
}
- string search = query.Search[(query.Search.IndexOf(Keyword, StringComparison.Ordinal) + Keyword.Length + 1)..];
+ int keywordIndex = query.Search.IndexOf(Keyword, StringComparison.Ordinal);
+ string search = query.Search[(keywordIndex + Keyword.Length + 1)..];
if (string.IsNullOrWhiteSpace(search))
{
return themes.Select(CreateThemeResult)
- .OrderBy(x => x.Title)
- .ToList();
+ .OrderBy(x => x.Title)
+ .ToList();
}
return themes.Select(theme => (theme, matchResult: context.API.FuzzySearch(search, theme)))
- .Where(x => x.matchResult.IsSearchPrecisionScoreMet())
- .Select(x => CreateThemeResult(x.theme, x.matchResult.Score, x.matchResult.MatchData))
- .OrderBy(x => x.Title)
- .ToList();
+ .Where(x => x.matchResult.IsSearchPrecisionScoreMet())
+ .Select(x => CreateThemeResult(x.theme, x.matchResult.Score, x.matchResult.MatchData))
+ .OrderBy(x => x.Title)
+ .ToList();
}
private void OnVisibilityChanged(object sender, VisibilityChangedEventArgs args)
From 40050545005adcfaa2acec8f046deeaea79d3049 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sat, 18 Jan 2025 21:16:04 +1100
Subject: [PATCH 0024/1442] implement the complete IDisposable pattern
---
.../Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 27 ++++++++++++++++---
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index d48583f26..ca19bd33d 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -83,12 +83,31 @@ namespace Flow.Launcher.Plugin.Sys
};
}
+ private bool disposed;
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposed)
+ {
+ if (disposing)
+ {
+ // Dispose managed resources
+ if (context?.API != null)
+ {
+ context.API.VisibilityChanged -= OnVisibilityChanged;
+ }
+ }
+ // Free unmanaged resources
+ disposed = true;
+ }
+ }
+ ~ThemeSelector()
+ {
+ Dispose(false);
+ }
public void Dispose()
{
- if (context != null && context.API != null)
- {
- context.API.VisibilityChanged -= OnVisibilityChanged;
- }
+ Dispose(true);
+ GC.SuppressFinalize(this);
}
}
}
From fce3b3ae3d7ebb59747e3a94fb4011acce325141 Mon Sep 17 00:00:00 2001
From: Odotocodot <48138990+Odotocodot@users.noreply.github.com>
Date: Sat, 18 Jan 2025 13:18:48 +0000
Subject: [PATCH 0025/1442] Fix crash on theme search
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index ca19bd33d..3ea90197d 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -26,8 +26,7 @@ namespace Flow.Launcher.Plugin.Sys
LoadThemes();
}
- int keywordIndex = query.Search.IndexOf(Keyword, StringComparison.Ordinal);
- string search = query.Search[(keywordIndex + Keyword.Length + 1)..];
+ string search = query.SecondToEndSearch;
if (string.IsNullOrWhiteSpace(search))
{
@@ -52,7 +51,7 @@ namespace Flow.Launcher.Plugin.Sys
}
private void LoadThemes()
- => themes = ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension);
+ => themes = ThemeManager.Instance.LoadAvailableThemes().Select(x => x.FileNameWithoutExtension);
private static Result CreateThemeResult(string theme) => CreateThemeResult(theme, 0, null);
From 9880c362fd7196b2fc7792f82b533fc80a945eed Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 19 Feb 2025 23:31:26 +0800
Subject: [PATCH 0026/1442] Remove useless settings control & project reference
---
.../Flow.Launcher.Plugin.Url.csproj | 1 -
Plugins/Flow.Launcher.Plugin.Url/Main.cs | 10 +---------
.../SettingsControl.xaml | 17 -----------------
.../SettingsControl.xaml.cs | 18 ------------------
4 files changed, 1 insertion(+), 45 deletions(-)
delete mode 100644 Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
delete mode 100644 Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
diff --git a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj
index 3db0cd0cb..6d338733e 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj
@@ -42,7 +42,6 @@
-
diff --git a/Plugins/Flow.Launcher.Plugin.Url/Main.cs b/Plugins/Flow.Launcher.Plugin.Url/Main.cs
index 80425a8ff..03516636d 100644
--- a/Plugins/Flow.Launcher.Plugin.Url/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Url/Main.cs
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
-using System.Windows.Controls;
namespace Flow.Launcher.Plugin.Url
{
- public class Main : ISettingProvider,IPlugin, IPluginI18n
+ public class Main : IPlugin, IPluginI18n
{
//based on https://gist.github.com/dperini/729294
private const string urlPattern = "^" +
@@ -43,7 +42,6 @@ namespace Flow.Launcher.Plugin.Url
Regex reg = new Regex(urlPattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
private PluginInitContext context;
private Settings _settings;
-
public List Query(Query query)
{
@@ -82,12 +80,6 @@ namespace Flow.Launcher.Plugin.Url
return new List(0);
}
-
- public Control CreateSettingPanel()
- {
- return new SettingsControl(context.API,_settings);
- }
-
public bool IsURL(string raw)
{
raw = raw.ToLower();
diff --git a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
deleted file mode 100644
index 8ff7b5ab5..000000000
--- a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
deleted file mode 100644
index f68d1bb2d..000000000
--- a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Windows.Controls;
-
-namespace Flow.Launcher.Plugin.Url
-{
- public partial class SettingsControl : UserControl
- {
- private Settings _settings;
- private IPublicAPI _flowlauncherAPI;
-
- public SettingsControl(IPublicAPI flowlauncherAPI,Settings settings)
- {
- InitializeComponent();
- _settings = settings;
- _flowlauncherAPI = flowlauncherAPI;
-
- }
- }
-}
From 6e84326f57c45cc44e6ab6a756244d277c9ef884 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 19 Feb 2025 23:43:17 +0800
Subject: [PATCH 0027/1442] Reassign margins
---
.../Resources/Controls/InstalledPluginDisplayKeyword.xaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml
index ff2f14c4b..a88b1a731 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml
@@ -18,9 +18,9 @@
CornerRadius="0"
Style="{DynamicResource SettingGroupBox}"
Visibility="{Binding ActionKeywordsVisibility}">
-
+
@@ -34,7 +34,6 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
new file mode 100644
index 000000000..5889a1280
--- /dev/null
+++ b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
@@ -0,0 +1,55 @@
+using System.Linq;
+using System.Windows;
+using Flow.Launcher.Plugin;
+using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
+using static Flow.Launcher.SettingPages.ViewModels.SettingsPaneGeneralViewModel;
+
+namespace Flow.Launcher;
+
+public partial class SearchDelaySpeedWindow : Window
+{
+ private readonly PluginViewModel _pluginViewModel;
+
+ public SearchDelaySpeedWindow(PluginViewModel pluginViewModel)
+ {
+ InitializeComponent();
+ _pluginViewModel = pluginViewModel;
+ }
+
+ private void SearchDelaySpeed_OnLoaded(object sender, RoutedEventArgs e)
+ {
+ tbOldSearchDelaySpeed.Text = _pluginViewModel.SearchDelaySpeedText;
+ var searchDelaySpeeds = DropdownDataGeneric.GetValues("SearchDelaySpeed");
+ SearchDelaySpeedData selected = null;
+ // Because default value is SearchDelaySpeeds.Slow, we need to get selected value before adding default value
+ if (_pluginViewModel.PluginSearchDelay != null)
+ {
+ selected = searchDelaySpeeds.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelay);
+ }
+ // Add default value to the beginning of the list
+ // This value should be null
+ searchDelaySpeeds.Insert(0, new SearchDelaySpeedData { Display = App.API.GetTranslation(PluginViewModel.DefaultLocalizationKey), LocalizationKey = PluginViewModel.DefaultLocalizationKey });
+ selected ??= searchDelaySpeeds.FirstOrDefault();
+ tbDelay.ItemsSource = searchDelaySpeeds;
+ tbDelay.SelectedItem = selected;
+ tbDelay.Focus();
+ }
+
+ private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ private void btnDone_OnClick(object sender, RoutedEventArgs _)
+ {
+ // Update search delay speed
+ var selected = tbDelay.SelectedItem as SearchDelaySpeedData;
+ SearchDelaySpeeds? changedValue = selected?.LocalizationKey != PluginViewModel.DefaultLocalizationKey ? selected.Value : null;
+ _pluginViewModel.PluginSearchDelay = changedValue;
+
+ // Update search delay speed text and close window
+ _pluginViewModel.OnSearchDelaySpeedChanged();
+ Close();
+ }
+}
diff --git a/Flow.Launcher/SettingPages/ViewModels/DropdownDataGeneric.cs b/Flow.Launcher/SettingPages/ViewModels/DropdownDataGeneric.cs
index 15a814436..c8c119e94 100644
--- a/Flow.Launcher/SettingPages/ViewModels/DropdownDataGeneric.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/DropdownDataGeneric.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.SettingPages.ViewModels;
@@ -9,7 +8,7 @@ public class DropdownDataGeneric : BaseModel where TValue : Enum
{
public string Display { get; set; }
public TValue Value { get; private init; }
- private string LocalizationKey { get; init; }
+ public string LocalizationKey { get; set; }
public static List
GetValues
(string keyPrefix) where TR : DropdownDataGeneric, new()
{
@@ -19,7 +18,7 @@ public class DropdownDataGeneric : BaseModel where TValue : Enum
foreach (var value in enumValues)
{
var key = keyPrefix + value;
- var display = InternationalizationManager.Instance.GetTranslation(key);
+ var display = App.API.GetTranslation(key);
data.Add(new TR { Display = display, Value = value, LocalizationKey = key });
}
@@ -30,7 +29,7 @@ public class DropdownDataGeneric : BaseModel where TValue : Enum
{
foreach (var item in options)
{
- item.Display = InternationalizationManager.Instance.GetTranslation(item.LocalizationKey);
+ item.Display = App.API.GetTranslation(item.LocalizationKey);
}
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 4a729b578..909011579 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -150,7 +150,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public SearchDelaySpeedData SearchDelaySpeed
{
get => SearchDelaySpeeds.FirstOrDefault(x => x.Value == Settings.SearchDelaySpeed) ??
- SearchDelaySpeeds.FirstOrDefault(x => x.Value == Flow.Launcher.Plugin.SearchDelaySpeeds.Medium) ??
+ SearchDelaySpeeds.FirstOrDefault(x => x.Value == Plugin.SearchDelaySpeeds.Medium) ??
SearchDelaySpeeds.FirstOrDefault();
set
{
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index e63336235..7ca776512 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -13,6 +13,8 @@ namespace Flow.Launcher.ViewModel
{
public partial class PluginViewModel : BaseModel
{
+ public const string DefaultLocalizationKey = "default";
+
private readonly PluginPair _pluginPair;
public PluginPair PluginPair
{
@@ -127,7 +129,7 @@ namespace Flow.Launcher.ViewModel
PluginPair.Metadata.AvgQueryTime + "ms";
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
public int Priority => PluginPair.Metadata.Priority;
- public string SearchDelaySpeedText => PluginPair.Metadata.SearchDelaySpeed == null ? App.API.GetTranslation("default") : App.API.GetTranslation($"SearchDelaySpeed{PluginPair.Metadata.SearchDelaySpeed}");
+ public string SearchDelaySpeedText => PluginPair.Metadata.SearchDelaySpeed == null ? App.API.GetTranslation(DefaultLocalizationKey) : App.API.GetTranslation($"SearchDelaySpeed{PluginPair.Metadata.SearchDelaySpeed}");
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
public void OnActionKeywordsChanged()
@@ -135,6 +137,11 @@ namespace Flow.Launcher.ViewModel
OnPropertyChanged(nameof(ActionKeywordsText));
}
+ public void OnSearchDelaySpeedChanged()
+ {
+ OnPropertyChanged(nameof(SearchDelaySpeedText));
+ }
+
public void ChangePriority(int newPriority)
{
PluginPair.Metadata.Priority = newPriority;
@@ -180,8 +187,8 @@ namespace Flow.Launcher.ViewModel
[RelayCommand]
private void SetSearchDelaySpeed()
{
- /*var searchDelaySpeedWindow = new SearchDelaySpeedWindow(this);
- searchDelaySpeedWindow.ShowDialog();*/
+ var searchDelaySpeedWindow = new SearchDelaySpeedWindow(this);
+ searchDelaySpeedWindow.ShowDialog();
}
}
}
From e9c1cffd3304867f24d2cd2f2c609998c75755d3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 12:58:27 +0800
Subject: [PATCH 0493/1442] Code quality
---
.../UserSettings/Settings.cs | 24 +++----------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index ab0a364d2..fed4b667b 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -320,28 +320,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactivated { get; set; } = true;
- bool _searchQueryResultsWithDelay { get; set; }
- public bool SearchQueryResultsWithDelay
- {
- get => _searchQueryResultsWithDelay;
- set
- {
- _searchQueryResultsWithDelay = value;
- OnPropertyChanged();
- }
- }
-
- SearchDelaySpeeds searchDelaySpeed { get; set; } = SearchDelaySpeeds.Medium;
+ public bool SearchQueryResultsWithDelay { get; set; }
+
[JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelaySpeeds SearchDelaySpeed
- {
- get => searchDelaySpeed;
- set
- {
- searchDelaySpeed = value;
- OnPropertyChanged();
- }
- }
+ public SearchDelaySpeeds SearchDelaySpeed { get; set; } = SearchDelaySpeeds.Medium;
[JsonConverter(typeof(JsonStringEnumConverter))]
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
From dec1e77b0ce7dd31aab99661b7505d3cf8bf2a7c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:04:41 +0800
Subject: [PATCH 0494/1442] Improve code comments
---
Flow.Launcher/SearchDelaySpeedWindow.xaml.cs | 2 +-
Flow.Launcher/ViewModel/MainViewModel.cs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
index 5889a1280..cfbde8be2 100644
--- a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
+++ b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
@@ -28,7 +28,7 @@ public partial class SearchDelaySpeedWindow : Window
selected = searchDelaySpeeds.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelay);
}
// Add default value to the beginning of the list
- // This value should be null
+ // When _pluginViewModel.PluginSearchDelay equals null, we will select this
searchDelaySpeeds.Insert(0, new SearchDelaySpeedData { Display = App.API.GetTranslation(PluginViewModel.DefaultLocalizationKey), LocalizationKey = PluginViewModel.DefaultLocalizationKey });
selected ??= searchDelaySpeeds.FirstOrDefault();
tbDelay.ItemsSource = searchDelaySpeeds;
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 309cd67bb..f43931192 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -298,7 +298,7 @@ namespace Flow.Launcher.ViewModel
{
if (QueryResultsSelected())
{
- // When we are requiring, we should not delay the query
+ // When we are re-querying, we should not delay the query
_ = QueryResultsAsync(false, isReQuery: true);
}
}
@@ -306,7 +306,7 @@ namespace Flow.Launcher.ViewModel
public void ReQuery(bool reselect)
{
BackToQueryResults();
- // When we are requiring, we should not delay the query
+ // When we are re-querying, we should not delay the query
_ = QueryResultsAsync(false, isReQuery: true, reSelect: reselect);
}
@@ -660,7 +660,7 @@ namespace Flow.Launcher.ViewModel
}
else if (isReQuery)
{
- // When we are requiring, we should not delay the query
+ // When we are re-querying, we should not delay the query
await QueryAsync(false, isReQuery: true);
}
From c4cd51c3126db130864d40ce05898962526a6d70 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:26:09 +0800
Subject: [PATCH 0495/1442] Change to search delay time
---
.../UserSettings/PluginSettings.cs | 12 +++----
.../UserSettings/Settings.cs | 2 +-
Flow.Launcher.Plugin/PluginMetadata.cs | 4 +--
Flow.Launcher.Plugin/SearchDelaySpeeds.cs | 32 -----------------
Flow.Launcher.Plugin/SearchDelayTime.cs | 32 +++++++++++++++++
Flow.Launcher/Languages/en.xaml | 26 +++++++-------
.../Controls/InstalledPluginSearchDelay.xaml | 8 ++---
Flow.Launcher/SearchDelaySpeedWindow.xaml | 16 ++++-----
Flow.Launcher/SearchDelaySpeedWindow.xaml.cs | 36 +++++++++----------
.../SettingsPaneGeneralViewModel.cs | 20 +++++------
.../Views/SettingsPaneGeneral.xaml | 8 ++---
Flow.Launcher/ViewModel/MainViewModel.cs | 13 ++++---
Flow.Launcher/ViewModel/PluginViewModel.cs | 22 ++++++------
.../plugin.json | 2 +-
14 files changed, 115 insertions(+), 118 deletions(-)
delete mode 100644 Flow.Launcher.Plugin/SearchDelaySpeeds.cs
create mode 100644 Flow.Launcher.Plugin/SearchDelayTime.cs
diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
index d1c047495..da92a3583 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
@@ -51,7 +51,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
settings.Version = metadata.Version;
}
settings.DefaultActionKeywords = metadata.ActionKeywords; // metadata provides default values
- settings.DefaultSearchDelaySpeed = metadata.SearchDelaySpeed; // metadata provides default values
+ settings.DefaultSearchDelayTime = metadata.SearchDelayTime; // metadata provides default values
// update metadata values with settings
if (settings.ActionKeywords?.Count > 0)
@@ -66,7 +66,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
metadata.Disabled = settings.Disabled;
metadata.Priority = settings.Priority;
- metadata.SearchDelaySpeed = settings.SearchDelaySpeed;
+ metadata.SearchDelayTime = settings.SearchDelayTime;
}
else
{
@@ -80,8 +80,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
ActionKeywords = metadata.ActionKeywords, // use default value
Disabled = metadata.Disabled,
Priority = metadata.Priority,
- DefaultSearchDelaySpeed = metadata.SearchDelaySpeed, // metadata provides default values
- SearchDelaySpeed = metadata.SearchDelaySpeed, // use default value
+ DefaultSearchDelayTime = metadata.SearchDelayTime, // metadata provides default values
+ SearchDelayTime = metadata.SearchDelayTime, // use default value
};
}
}
@@ -120,10 +120,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public int Priority { get; set; }
[JsonIgnore]
- public SearchDelaySpeeds? DefaultSearchDelaySpeed { get; set; }
+ public SearchDelayTime? DefaultSearchDelayTime { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelaySpeeds? SearchDelaySpeed { get; set; }
+ public SearchDelayTime? SearchDelayTime { get; set; }
///
/// Used only to save the state of the plugin in settings
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index fed4b667b..fcfbe8ca0 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -323,7 +323,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool SearchQueryResultsWithDelay { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelaySpeeds SearchDelaySpeed { get; set; } = SearchDelaySpeeds.Medium;
+ public SearchDelayTime SearchDelayTime { get; set; } = SearchDelayTime.Medium;
[JsonConverter(typeof(JsonStringEnumConverter))]
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs
index 42b623717..1496765ce 100644
--- a/Flow.Launcher.Plugin/PluginMetadata.cs
+++ b/Flow.Launcher.Plugin/PluginMetadata.cs
@@ -99,10 +99,10 @@ namespace Flow.Launcher.Plugin
public bool HideActionKeywordPanel { get; set; }
///
- /// Plugin search delay speed. Null means use default search delay.
+ /// Plugin search delay time. Null means use default search delay time.
///
[JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelaySpeeds? SearchDelaySpeed { get; set; } = null;
+ public SearchDelayTime? SearchDelayTime { get; set; } = null;
///
/// Plugin icon path.
diff --git a/Flow.Launcher.Plugin/SearchDelaySpeeds.cs b/Flow.Launcher.Plugin/SearchDelaySpeeds.cs
deleted file mode 100644
index 543f8b3f6..000000000
--- a/Flow.Launcher.Plugin/SearchDelaySpeeds.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-namespace Flow.Launcher.Plugin;
-
-///
-/// Enum for search delay speeds
-///
-public enum SearchDelaySpeeds
-{
- ///
- /// Slow search delay speed. 50ms.
- ///
- Slow,
-
- ///
- /// Moderately slow search delay speed. 100ms.
- ///
- ModeratelySlow,
-
- ///
- /// Medium search delay speed. 150ms. Default value.
- ///
- Medium,
-
- ///
- /// Moderately fast search delay speed. 200ms.
- ///
- ModeratelyFast,
-
- ///
- /// Fast search delay speed. 250ms.
- ///
- Fast
-}
diff --git a/Flow.Launcher.Plugin/SearchDelayTime.cs b/Flow.Launcher.Plugin/SearchDelayTime.cs
new file mode 100644
index 000000000..8dae5997e
--- /dev/null
+++ b/Flow.Launcher.Plugin/SearchDelayTime.cs
@@ -0,0 +1,32 @@
+namespace Flow.Launcher.Plugin;
+
+///
+/// Enum for search delay time
+///
+public enum SearchDelayTime
+{
+ ///
+ /// Long search delay time. 250ms.
+ ///
+ Long,
+
+ ///
+ /// Moderately long search delay time. 200ms.
+ ///
+ ModeratelyLong,
+
+ ///
+ /// Medium search delay time. 150ms. Default value.
+ ///
+ Medium,
+
+ ///
+ /// Moderately short search delay time. 100ms.
+ ///
+ ModeratelyShort,
+
+ ///
+ /// Short search delay time. 50ms.
+ ///
+ Short
+}
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index ae930db70..e6a764d48 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -104,13 +104,13 @@
Shadow effect is not allowed while current theme has blur effect enabledSearch DelayDelay for a while to search when typing. This reduces interface jumpiness and result load.
- Default Search Delay Speed
- Plugins default delay time after which search results appear when typing is stopped. Default is medium.
- Slow
- Moderately slow
- Medium
- Moderately fast
- Fast
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped. Default is "Medium".
+ Long
+ Moderately long
+ Medium
+ Moderately short
+ ShortSearch Plugin
@@ -127,8 +127,8 @@
Current action keywordNew action keywordChange Action Keywords
- Plugin seach delay speed
- Change Plugin Seach Delay Speed
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeCurrent PriorityNew PriorityPriority
@@ -366,10 +366,10 @@
Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
- Search Delay Speed Setting
- Select the search delay speed you like to use for the plugin. Select Default if you don't want to specify any, and the plugin will use default search delay speed.
- Current search delay speed
- New search delay speed
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeCustom Query Hotkey
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
index bd2f9a7c9..0fd98bfac 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
@@ -32,18 +32,18 @@
VerticalAlignment="Center"
DockPanel.Dock="Left"
Style="{DynamicResource SettingTitleLabel}"
- Text="{DynamicResource pluginSearchDelaySpeed}" />
+ Text="{DynamicResource pluginSearchDelayTime}" />
+ ToolTip="{DynamicResource pluginSearchDelayTimeTooltip}" />
diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml b/Flow.Launcher/SearchDelaySpeedWindow.xaml
index 1813ff6ab..21ecd39c0 100644
--- a/Flow.Launcher/SearchDelaySpeedWindow.xaml
+++ b/Flow.Launcher/SearchDelaySpeedWindow.xaml
@@ -1,13 +1,13 @@
@@ -60,13 +60,13 @@
Margin="0 0 0 0"
FontSize="20"
FontWeight="SemiBold"
- Text="{DynamicResource searchDelaySpeedTitle}"
+ Text="{DynamicResource searchDelayTimeTitle}"
TextAlignment="Left" />
@@ -78,9 +78,9 @@
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
- Text="{DynamicResource currentSearchDelaySpeed}" />
+ Text="{DynamicResource currentSearchDelayTime}" />
+ Text="{DynamicResource newSearchDelayTime}" />
.GetValues("SearchDelaySpeed");
- SearchDelaySpeedData selected = null;
- // Because default value is SearchDelaySpeeds.Slow, we need to get selected value before adding default value
- if (_pluginViewModel.PluginSearchDelay != null)
+ tbOldSearchDelayTime.Text = _pluginViewModel.SearchDelayTimeText;
+ var searchDelayTimes = DropdownDataGeneric.GetValues("SearchDelayTime");
+ SearchDelayTimeData selected = null;
+ // Because default value is SearchDelayTime.Slow, we need to get selected value before adding default value
+ if (_pluginViewModel.PluginSearchDelayTime != null)
{
- selected = searchDelaySpeeds.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelay);
+ selected = searchDelayTimes.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelayTime);
}
// Add default value to the beginning of the list
// When _pluginViewModel.PluginSearchDelay equals null, we will select this
- searchDelaySpeeds.Insert(0, new SearchDelaySpeedData { Display = App.API.GetTranslation(PluginViewModel.DefaultLocalizationKey), LocalizationKey = PluginViewModel.DefaultLocalizationKey });
- selected ??= searchDelaySpeeds.FirstOrDefault();
- tbDelay.ItemsSource = searchDelaySpeeds;
+ searchDelayTimes.Insert(0, new SearchDelayTimeData { Display = App.API.GetTranslation("default"), LocalizationKey = "default" });
+ selected ??= searchDelayTimes.FirstOrDefault();
+ tbDelay.ItemsSource = searchDelayTimes;
tbDelay.SelectedItem = selected;
tbDelay.Focus();
}
@@ -43,13 +43,13 @@ public partial class SearchDelaySpeedWindow : Window
private void btnDone_OnClick(object sender, RoutedEventArgs _)
{
- // Update search delay speed
- var selected = tbDelay.SelectedItem as SearchDelaySpeedData;
- SearchDelaySpeeds? changedValue = selected?.LocalizationKey != PluginViewModel.DefaultLocalizationKey ? selected.Value : null;
- _pluginViewModel.PluginSearchDelay = changedValue;
+ // Update search delay time
+ var selected = tbDelay.SelectedItem as SearchDelayTimeData;
+ SearchDelayTime? changedValue = selected?.LocalizationKey != "default" ? selected.Value : null;
+ _pluginViewModel.PluginSearchDelayTime = changedValue;
- // Update search delay speed text and close window
- _pluginViewModel.OnSearchDelaySpeedChanged();
+ // Update search delay time text and close window
+ _pluginViewModel.OnSearchDelayTimeChanged();
Close();
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 909011579..3262ad208 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -31,7 +31,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public class SearchWindowAlignData : DropdownDataGeneric { }
public class SearchPrecisionData : DropdownDataGeneric { }
public class LastQueryModeData : DropdownDataGeneric { }
- public class SearchDelaySpeedData : DropdownDataGeneric { }
+ public class SearchDelayTimeData : DropdownDataGeneric { }
public bool StartFlowLauncherOnSystemStartup
{
@@ -144,22 +144,22 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public List LastQueryModes { get; } =
DropdownDataGeneric.GetValues("LastQuery");
- public List SearchDelaySpeeds { get; } =
- DropdownDataGeneric.GetValues("SearchDelaySpeed");
+ public List SearchDelayTimes { get; } =
+ DropdownDataGeneric.GetValues("SearchDelayTime");
- public SearchDelaySpeedData SearchDelaySpeed
+ public SearchDelayTimeData SearchDelayTime
{
- get => SearchDelaySpeeds.FirstOrDefault(x => x.Value == Settings.SearchDelaySpeed) ??
- SearchDelaySpeeds.FirstOrDefault(x => x.Value == Plugin.SearchDelaySpeeds.Medium) ??
- SearchDelaySpeeds.FirstOrDefault();
+ get => SearchDelayTimes.FirstOrDefault(x => x.Value == Settings.SearchDelayTime) ??
+ SearchDelayTimes.FirstOrDefault(x => x.Value == Plugin.SearchDelayTime.Medium) ??
+ SearchDelayTimes.FirstOrDefault();
set
{
if (value == null)
return;
- if (Settings.SearchDelaySpeed != value.Value)
+ if (Settings.SearchDelayTime != value.Value)
{
- Settings.SearchDelaySpeed = value.Value;
+ Settings.SearchDelayTime = value.Value;
}
}
}
@@ -170,7 +170,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
DropdownDataGeneric.UpdateLabels(SearchWindowAligns);
DropdownDataGeneric.UpdateLabels(SearchPrecisionScores);
DropdownDataGeneric.UpdateLabels(LastQueryModes);
- DropdownDataGeneric.UpdateLabels(SearchDelaySpeeds);
+ DropdownDataGeneric.UpdateLabels(SearchDelayTimes);
}
public string Language
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 372fdccd7..2b198474b 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -184,14 +184,14 @@
+ Sub="{DynamicResource searchDelayTimeToolTip}">
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index f43931192..283e26b95 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1271,14 +1271,13 @@ namespace Flow.Launcher.ViewModel
{
if (searchDelay)
{
- var searchDelaySpeed = plugin.Metadata.SearchDelaySpeed ?? Settings.SearchDelaySpeed;
- var searchDelayTime = searchDelaySpeed switch
+ var searchDelayTime = (plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime) switch
{
- SearchDelaySpeeds.Slow => 250,
- SearchDelaySpeeds.ModeratelySlow => 200,
- SearchDelaySpeeds.Medium => 150,
- SearchDelaySpeeds.ModeratelyFast => 100,
- SearchDelaySpeeds.Fast => 50,
+ SearchDelayTime.Long => 250,
+ SearchDelayTime.ModeratelyLong => 200,
+ SearchDelayTime.Medium => 150,
+ SearchDelayTime.ModeratelyShort => 100,
+ SearchDelayTime.Short => 50,
_ => 150
};
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 7ca776512..76e212c1d 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -13,8 +13,6 @@ namespace Flow.Launcher.ViewModel
{
public partial class PluginViewModel : BaseModel
{
- public const string DefaultLocalizationKey = "default";
-
private readonly PluginPair _pluginPair;
public PluginPair PluginPair
{
@@ -85,13 +83,13 @@ namespace Flow.Launcher.ViewModel
}
}
- public SearchDelaySpeeds? PluginSearchDelay
+ public SearchDelayTime? PluginSearchDelayTime
{
- get => PluginPair.Metadata.SearchDelaySpeed;
+ get => PluginPair.Metadata.SearchDelayTime;
set
{
- PluginPair.Metadata.SearchDelaySpeed = value;
- PluginSettingsObject.SearchDelaySpeed = value;
+ PluginPair.Metadata.SearchDelayTime = value;
+ PluginSettingsObject.SearchDelayTime = value;
}
}
@@ -129,7 +127,7 @@ namespace Flow.Launcher.ViewModel
PluginPair.Metadata.AvgQueryTime + "ms";
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
public int Priority => PluginPair.Metadata.Priority;
- public string SearchDelaySpeedText => PluginPair.Metadata.SearchDelaySpeed == null ? App.API.GetTranslation(DefaultLocalizationKey) : App.API.GetTranslation($"SearchDelaySpeed{PluginPair.Metadata.SearchDelaySpeed}");
+ public string SearchDelayTimeText => PluginPair.Metadata.SearchDelayTime == null ? App.API.GetTranslation("default") : App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
public void OnActionKeywordsChanged()
@@ -137,9 +135,9 @@ namespace Flow.Launcher.ViewModel
OnPropertyChanged(nameof(ActionKeywordsText));
}
- public void OnSearchDelaySpeedChanged()
+ public void OnSearchDelayTimeChanged()
{
- OnPropertyChanged(nameof(SearchDelaySpeedText));
+ OnPropertyChanged(nameof(SearchDelayTimeText));
}
public void ChangePriority(int newPriority)
@@ -185,10 +183,10 @@ namespace Flow.Launcher.ViewModel
}
[RelayCommand]
- private void SetSearchDelaySpeed()
+ private void SetSearchDelayTime()
{
- var searchDelaySpeedWindow = new SearchDelaySpeedWindow(this);
- searchDelaySpeedWindow.ShowDialog();
+ var searchDelayTimeWindow = new SearchDelayTimeWindow(this);
+ searchDelayTimeWindow.ShowDialog();
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
index f81590092..e27426133 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
@@ -32,5 +32,5 @@
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
"IcoPath": "Images\\web_search.png",
- "SearchDelaySpeed": "Slow"
+ "SearchDelayTime": "Long"
}
From 72a59ba6c50ab740866204cd780e88a676f37b0f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:27:21 +0800
Subject: [PATCH 0496/1442] Change file names
---
.../{SearchDelaySpeedWindow.xaml => SearchDelayTimeWindow.xaml} | 0
...archDelaySpeedWindow.xaml.cs => SearchDelayTimeWindow.xaml.cs} | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename Flow.Launcher/{SearchDelaySpeedWindow.xaml => SearchDelayTimeWindow.xaml} (100%)
rename Flow.Launcher/{SearchDelaySpeedWindow.xaml.cs => SearchDelayTimeWindow.xaml.cs} (100%)
diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml b/Flow.Launcher/SearchDelayTimeWindow.xaml
similarity index 100%
rename from Flow.Launcher/SearchDelaySpeedWindow.xaml
rename to Flow.Launcher/SearchDelayTimeWindow.xaml
diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
similarity index 100%
rename from Flow.Launcher/SearchDelaySpeedWindow.xaml.cs
rename to Flow.Launcher/SearchDelayTimeWindow.xaml.cs
From 5243d74eaf3152e4bb44938428ec22ea25a266d5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:31:16 +0800
Subject: [PATCH 0497/1442] Improve code comments
---
Flow.Launcher/SearchDelayTimeWindow.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
index 8bde5eb33..1372e0993 100644
--- a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
+++ b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
@@ -28,7 +28,7 @@ public partial class SearchDelayTimeWindow : Window
selected = searchDelayTimes.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelayTime);
}
// Add default value to the beginning of the list
- // When _pluginViewModel.PluginSearchDelay equals null, we will select this
+ // When _pluginViewModel.PluginSearchDelayTime equals null, we will select this
searchDelayTimes.Insert(0, new SearchDelayTimeData { Display = App.API.GetTranslation("default"), LocalizationKey = "default" });
selected ??= searchDelayTimes.FirstOrDefault();
tbDelay.ItemsSource = searchDelayTimes;
From b860bb2edddcf5aa5db585435a34da3dc8b5dbf8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:31:56 +0800
Subject: [PATCH 0498/1442] Code quality
---
Flow.Launcher/ViewModel/PluginViewModel.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 76e212c1d..807fd6e85 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -105,7 +105,8 @@ namespace Flow.Launcher.ViewModel
private Control _bottomPart3;
public Control BottomPart3 => IsExpanded ? _bottomPart3 ??= new InstalledPluginDisplayBottomData() : null;
- public bool HasSettingControl => PluginPair.Plugin is ISettingProvider && (PluginPair.Plugin is not JsonRPCPluginBase jsonRPCPluginBase || jsonRPCPluginBase.NeedCreateSettingPanel());
+ public bool HasSettingControl => PluginPair.Plugin is ISettingProvider &&
+ (PluginPair.Plugin is not JsonRPCPluginBase jsonRPCPluginBase || jsonRPCPluginBase.NeedCreateSettingPanel());
public Control SettingControl
=> IsExpanded
? _settingControl
@@ -127,7 +128,9 @@ namespace Flow.Launcher.ViewModel
PluginPair.Metadata.AvgQueryTime + "ms";
public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
public int Priority => PluginPair.Metadata.Priority;
- public string SearchDelayTimeText => PluginPair.Metadata.SearchDelayTime == null ? App.API.GetTranslation("default") : App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
+ public string SearchDelayTimeText => PluginPair.Metadata.SearchDelayTime == null ?
+ App.API.GetTranslation("default") :
+ App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
public void OnActionKeywordsChanged()
From d42279bd8f754651c82bb80afe78725ed3bc2e26 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 13:41:14 +0800
Subject: [PATCH 0499/1442] Fix typo & Fix tip issue
---
Flow.Launcher/SearchDelayTimeWindow.xaml | 4 ++--
Flow.Launcher/SearchDelayTimeWindow.xaml.cs | 10 ++++++----
Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/SearchDelayTimeWindow.xaml b/Flow.Launcher/SearchDelayTimeWindow.xaml
index 21ecd39c0..1c7ca58d0 100644
--- a/Flow.Launcher/SearchDelayTimeWindow.xaml
+++ b/Flow.Launcher/SearchDelayTimeWindow.xaml
@@ -65,8 +65,8 @@
@@ -99,7 +99,7 @@
FontSize="14"
Text="{DynamicResource newSearchDelayTime}" />
.GetValues("SearchDelayTime");
SearchDelayTimeData selected = null;
@@ -31,9 +33,9 @@ public partial class SearchDelayTimeWindow : Window
// When _pluginViewModel.PluginSearchDelayTime equals null, we will select this
searchDelayTimes.Insert(0, new SearchDelayTimeData { Display = App.API.GetTranslation("default"), LocalizationKey = "default" });
selected ??= searchDelayTimes.FirstOrDefault();
- tbDelay.ItemsSource = searchDelayTimes;
- tbDelay.SelectedItem = selected;
- tbDelay.Focus();
+ cbDelay.ItemsSource = searchDelayTimes;
+ cbDelay.SelectedItem = selected;
+ cbDelay.Focus();
}
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
@@ -44,7 +46,7 @@ public partial class SearchDelayTimeWindow : Window
private void btnDone_OnClick(object sender, RoutedEventArgs _)
{
// Update search delay time
- var selected = tbDelay.SelectedItem as SearchDelayTimeData;
+ var selected = cbDelay.SelectedItem as SearchDelayTimeData;
SearchDelayTime? changedValue = selected?.LocalizationKey != "default" ? selected.Value : null;
_pluginViewModel.PluginSearchDelayTime = changedValue;
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 807fd6e85..e91badb38 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -118,7 +118,7 @@ namespace Flow.Launcher.ViewModel
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.HideActionKeywordPanel ?
Visibility.Collapsed : Visibility.Visible;
- public string InitilizaTime => PluginPair.Metadata.InitTime + "ms";
+ public string InitializeTime => PluginPair.Metadata.InitTime + "ms";
public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms";
public string Version => App.API.GetTranslation("plugin_query_version") + " " + PluginPair.Metadata.Version;
public string InitAndQueryTime =>
From 6b6aaa14f4302567b1bf2a858e96aaef69df4588 Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 31 Mar 2025 17:08:26 +0900
Subject: [PATCH 0500/1442] Add subtext indicating whether backdrop is not
available
---
Flow.Launcher/Languages/en.xaml | 1 +
.../SettingPages/ViewModels/SettingsPaneThemeViewModel.cs | 1 +
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 7c96fe88d..44b82b372 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -196,6 +196,7 @@
ClockDateBackdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMica
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index 53d70e8d5..6e2488fe1 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -21,6 +21,7 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneThemeViewModel : BaseModel
{
private const string DefaultFont = "Segoe UI";
+ public string BackdropSubText => !Win32Helper.IsBackdropSupported() ? App.API.GetTranslation("BackdropTypeDisabledToolTip") : "";
public Settings Settings { get; }
private readonly Theme _theme = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index e63567ce5..49306cd2d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -468,7 +468,8 @@
+ Icon=""
+ Sub="{Binding BackdropSubText}">
-
From 39f41e49cea401bab95527b2c4b6247187b2042e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 17:05:23 +0800
Subject: [PATCH 0501/1442] Improve string resources
---
.../UserSettings/Settings.cs | 2 +-
Flow.Launcher.Plugin/SearchDelayTime.cs | 24 +++++++++----------
Flow.Launcher/Languages/en.xaml | 8 +++----
Flow.Launcher/SearchDelayTimeWindow.xaml.cs | 2 +-
.../SettingsPaneGeneralViewModel.cs | 2 +-
Flow.Launcher/ViewModel/MainViewModel.cs | 10 ++++----
.../plugin.json | 2 +-
7 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index fcfbe8ca0..6cb20d12f 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -323,7 +323,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool SearchQueryResultsWithDelay { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelayTime SearchDelayTime { get; set; } = SearchDelayTime.Medium;
+ public SearchDelayTime SearchDelayTime { get; set; } = SearchDelayTime.Normal;
[JsonConverter(typeof(JsonStringEnumConverter))]
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
diff --git a/Flow.Launcher.Plugin/SearchDelayTime.cs b/Flow.Launcher.Plugin/SearchDelayTime.cs
index 8dae5997e..ae1daabe0 100644
--- a/Flow.Launcher.Plugin/SearchDelayTime.cs
+++ b/Flow.Launcher.Plugin/SearchDelayTime.cs
@@ -6,27 +6,27 @@
public enum SearchDelayTime
{
///
- /// Long search delay time. 250ms.
+ /// Very long search delay time. 250ms.
+ ///
+ VeryLong,
+
+ ///
+ /// Long search delay time. 200ms.
///
Long,
///
- /// Moderately long search delay time. 200ms.
+ /// Normal search delay time. 150ms. Default value.
///
- ModeratelyLong,
+ Normal,
///
- /// Medium search delay time. 150ms. Default value.
+ /// Short search delay time. 100ms.
///
- Medium,
+ Short,
///
- /// Moderately short search delay time. 100ms.
+ /// Very short search delay time. 50ms.
///
- ModeratelyShort,
-
- ///
- /// Short search delay time. 50ms.
- ///
- Short
+ VeryShort
}
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index e6a764d48..364be4009 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -105,12 +105,12 @@
Search DelayDelay for a while to search when typing. This reduces interface jumpiness and result load.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped. Default is "Medium".
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very longLong
- Moderately long
- Medium
- Moderately short
+ NormalShort
+ Very shortSearch Plugin
diff --git a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
index cfd8c5b7e..4a3c9f5a7 100644
--- a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
+++ b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
@@ -24,7 +24,7 @@ public partial class SearchDelayTimeWindow : Window
tbOldSearchDelayTime.Text = _pluginViewModel.SearchDelayTimeText;
var searchDelayTimes = DropdownDataGeneric.GetValues("SearchDelayTime");
SearchDelayTimeData selected = null;
- // Because default value is SearchDelayTime.Slow, we need to get selected value before adding default value
+ // Because default value is SearchDelayTime.VeryShort, we need to get selected value before adding default value
if (_pluginViewModel.PluginSearchDelayTime != null)
{
selected = searchDelayTimes.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelayTime);
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 3262ad208..cec8c318c 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -150,7 +150,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public SearchDelayTimeData SearchDelayTime
{
get => SearchDelayTimes.FirstOrDefault(x => x.Value == Settings.SearchDelayTime) ??
- SearchDelayTimes.FirstOrDefault(x => x.Value == Plugin.SearchDelayTime.Medium) ??
+ SearchDelayTimes.FirstOrDefault(x => x.Value == Plugin.SearchDelayTime.Normal) ??
SearchDelayTimes.FirstOrDefault();
set
{
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 283e26b95..2fc4eaf7c 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1273,11 +1273,11 @@ namespace Flow.Launcher.ViewModel
{
var searchDelayTime = (plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime) switch
{
- SearchDelayTime.Long => 250,
- SearchDelayTime.ModeratelyLong => 200,
- SearchDelayTime.Medium => 150,
- SearchDelayTime.ModeratelyShort => 100,
- SearchDelayTime.Short => 50,
+ SearchDelayTime.VeryLong => 250,
+ SearchDelayTime.Long => 200,
+ SearchDelayTime.Normal => 150,
+ SearchDelayTime.Short => 100,
+ SearchDelayTime.VeryShort => 50,
_ => 150
};
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
index e27426133..64681f803 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
@@ -32,5 +32,5 @@
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
"IcoPath": "Images\\web_search.png",
- "SearchDelayTime": "Long"
+ "SearchDelayTime": "VeryLong"
}
From 63b27ae84437f2d38938b74f69ea72b93e389ef6 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 18:04:46 +0800
Subject: [PATCH 0502/1442] Remove debug codes
---
Flow.Launcher/ViewModel/MainViewModel.cs | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 24890a363..caedb44c0 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1150,9 +1150,6 @@ namespace Flow.Launcher.ViewModel
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)
{
- // TODO: Remove debug codes.
- System.Diagnostics.Debug.WriteLine("!!!QueryResults");
-
_updateSource?.Cancel();
var query = ConstructQuery(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
@@ -1233,8 +1230,6 @@ namespace Flow.Launcher.ViewModel
true => Task.CompletedTask
}).ToArray();
- // TODO: Remove debug codes.
- System.Diagnostics.Debug.Write($"!!!Querying {query.RawQuery}: search delay {searchDelay}");
foreach (var plugin in plugins)
{
if (!plugin.Metadata.Disabled)
@@ -1281,14 +1276,8 @@ namespace Flow.Launcher.ViewModel
_ => 150
};
- // TODO: Remove debug codes.
- System.Diagnostics.Debug.WriteLine($"!!!{plugin.Metadata.Name} Waiting {searchDelayTime} ms");
-
await Task.Delay(searchDelayTime, token);
- // TODO: Remove debug codes.
- System.Diagnostics.Debug.WriteLine($"!!!{plugin.Metadata.Name} Waited {searchDelayTime} ms");
-
if (token.IsCancellationRequested)
return;
}
@@ -1297,8 +1286,6 @@ namespace Flow.Launcher.ViewModel
// Task.Yield will force it to run in ThreadPool
await Task.Yield();
- // TODO: Remove debug codes.
- System.Diagnostics.Debug.WriteLine($"!!!{query.RawQuery} Querying {plugin.Metadata.Name}");
IReadOnlyList results =
await PluginManager.QueryForPluginAsync(plugin, query, token);
From 0963a6c46783c5ba8152606986399afbc1a651b9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 18:07:02 +0800
Subject: [PATCH 0503/1442] Remove debug codes
---
Flow.Launcher/ViewModel/MainViewModel.cs | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index caedb44c0..17e4b55b7 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1230,15 +1230,6 @@ namespace Flow.Launcher.ViewModel
true => Task.CompletedTask
}).ToArray();
- foreach (var plugin in plugins)
- {
- if (!plugin.Metadata.Disabled)
- {
- System.Diagnostics.Debug.Write($"{plugin.Metadata.Name}, ");
- }
- }
- System.Diagnostics.Debug.Write("\n");
-
try
{
// Check the code, WhenAll will translate all type of IEnumerable or Collection to Array, so make an array at first
From ce93e24c7e490ab136abfa0797a0b85dabdb8fe7 Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 31 Mar 2025 20:30:29 +0900
Subject: [PATCH 0504/1442] Ungroup Item in general page
---
.../Views/SettingsPaneGeneral.xaml | 57 ++++++-------------
1 file changed, 16 insertions(+), 41 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index edb2c1441..3f8272dda 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -28,16 +28,16 @@
Style="{StaticResource PageTitle}"
Text="{DynamicResource general}"
TextAlignment="left" />
-
-
-
-
+
+
-
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
Date: Mon, 31 Mar 2025 21:19:49 +0900
Subject: [PATCH 0505/1442] Add Control in PluginDisplay
---
.../Controls/InstalledPluginDisplay.xaml | 42 ++++++++++++++++---
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index b19c668e0..74edd2dea 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -48,7 +48,7 @@
Grid.Column="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
-
-
+ -->
+
+
-
-
+ -->
+
+
+
+
+
+
+
+
+
+ OnContent="{DynamicResource enable}"
+ Visibility="Collapsed" />
From eeb9ea78fdc39014f806263145ca5eb64b8d4651 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 21:27:59 +0800
Subject: [PATCH 0506/1442] Code quality
---
.../Environments/AbstractPluginEnvironment.cs | 50 +++++++++----------
1 file changed, 24 insertions(+), 26 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
index 7e9cc9a48..f80e573f9 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
@@ -1,15 +1,14 @@
-using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin;
-using Flow.Launcher.Plugin.SharedCommands;
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Forms;
-using Flow.Launcher.Core.Resource;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -43,8 +42,11 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal IEnumerable Setup()
{
+ // If no plugin is using the language, return empty list
if (!PluginMetadataList.Any(o => o.Language.Equals(Language, StringComparison.OrdinalIgnoreCase)))
+ {
return new List();
+ }
if (!string.IsNullOrEmpty(PluginsSettingsFilePath) && FilesFolders.FileExists(PluginsSettingsFilePath))
{
@@ -56,24 +58,21 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
}
var noRuntimeMessage = string.Format(
- InternationalizationManager.Instance.GetTranslation("runtimePluginInstalledChooseRuntimePrompt"),
+ API.GetTranslation("runtimePluginInstalledChooseRuntimePrompt"),
Language,
EnvName,
Environment.NewLine
);
if (API.ShowMsgBox(noRuntimeMessage, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
{
- var msg = string.Format(InternationalizationManager.Instance.GetTranslation("runtimePluginChooseRuntimeExecutable"), EnvName);
- string selectedFile;
+ var msg = string.Format(API.GetTranslation("runtimePluginChooseRuntimeExecutable"), EnvName);
- selectedFile = GetFileFromDialog(msg, FileDialogFilter);
+ var selectedFile = GetFileFromDialog(msg, FileDialogFilter);
- if (!string.IsNullOrEmpty(selectedFile))
- PluginsSettingsFilePath = selectedFile;
+ if (!string.IsNullOrEmpty(selectedFile)) PluginsSettingsFilePath = selectedFile;
// Nothing selected because user pressed cancel from the file dialog window
- if (string.IsNullOrEmpty(selectedFile))
- InstallEnvironment();
+ if (string.IsNullOrEmpty(selectedFile)) InstallEnvironment();
}
else
{
@@ -86,7 +85,7 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
}
else
{
- API.ShowMsgBox(string.Format(InternationalizationManager.Instance.GetTranslation("runtimePluginUnableToSetExecutablePath"), Language));
+ API.ShowMsgBox(string.Format(API.GetTranslation("runtimePluginUnableToSetExecutablePath"), Language));
Log.Error("PluginsLoader",
$"Not able to successfully set {EnvName} path, setting's plugin executable path variable is still an empty string.",
$"{Language}Environment");
@@ -99,13 +98,11 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
private void EnsureLatestInstalled(string expectedPath, string currentPath, string installedDirPath)
{
- if (expectedPath == currentPath)
- return;
+ if (expectedPath == currentPath) return;
FilesFolders.RemoveFolderIfExists(installedDirPath, (s) => API.ShowMsgBox(s));
InstallEnvironment();
-
}
internal abstract PluginPair CreatePluginPair(string filePath, PluginMetadata metadata);
@@ -126,7 +123,7 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
return pluginPairs;
}
- private string GetFileFromDialog(string title, string filter = "")
+ private static string GetFileFromDialog(string title, string filter = "")
{
var dlg = new OpenFileDialog
{
@@ -140,7 +137,6 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
var result = dlg.ShowDialog();
return result == DialogResult.OK ? dlg.FileName : string.Empty;
-
}
///
@@ -183,31 +179,33 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
else
{
if (IsUsingPortablePath(settings.PluginSettings.PythonExecutablePath, DataLocation.PythonEnvironmentName))
+ {
settings.PluginSettings.PythonExecutablePath
= GetUpdatedEnvironmentPath(settings.PluginSettings.PythonExecutablePath);
+ }
if (IsUsingPortablePath(settings.PluginSettings.NodeExecutablePath, DataLocation.NodeEnvironmentName))
+ {
settings.PluginSettings.NodeExecutablePath
= GetUpdatedEnvironmentPath(settings.PluginSettings.NodeExecutablePath);
+ }
}
}
private static bool IsUsingPortablePath(string filePath, string pluginEnvironmentName)
{
- if (string.IsNullOrEmpty(filePath))
- return false;
+ if (string.IsNullOrEmpty(filePath)) return false;
// DataLocation.PortableDataPath returns the current portable path, this determines if an out
// of date path is also a portable path.
- var portableAppEnvLocation = $"UserData\\{DataLocation.PluginEnvironments}\\{pluginEnvironmentName}";
+ var portableAppEnvLocation = Path.Combine("UserData", DataLocation.PluginEnvironments, pluginEnvironmentName);
return filePath.Contains(portableAppEnvLocation);
}
private static bool IsUsingRoamingPath(string filePath)
{
- if (string.IsNullOrEmpty(filePath))
- return false;
+ if (string.IsNullOrEmpty(filePath)) return false;
return filePath.StartsWith(DataLocation.RoamingDataPath);
}
@@ -217,7 +215,7 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
var index = filePath.IndexOf(DataLocation.PluginEnvironments);
// get the substring after "Environments" because we can not determine it dynamically
- var ExecutablePathSubstring = filePath.Substring(index + DataLocation.PluginEnvironments.Count());
+ var ExecutablePathSubstring = filePath[(index + DataLocation.PluginEnvironments.Length)..];
return $"{DataLocation.PluginEnvironmentsPath}{ExecutablePathSubstring}";
}
}
From 5fa244c806c430d35325ae30aa1dc22c5c6c4d40 Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 31 Mar 2025 22:44:34 +0900
Subject: [PATCH 0507/1442] Add setting filter
---
.../Converters/StringEqualityToVisibilityConverter.cs | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
diff --git a/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs b/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
new file mode 100644
index 000000000..4757681bc
--- /dev/null
+++ b/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
@@ -0,0 +1,6 @@
+namespace Flow.Launcher.Converters;
+
+public class StringEqualityToVisibilityConverter
+{
+
+}
From 0136c570faf3d8cdf4e7094054a1ed0cd62103c5 Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 31 Mar 2025 22:44:46 +0900
Subject: [PATCH 0508/1442] Add Setting Filter
---
.../StringEqualityToVisibilityConverter.cs | 23 ++++-
.../Controls/InstalledPluginDisplay.xaml | 34 +++++--
.../SettingsPanePluginsViewModel.cs | 69 +++++++++++++++
.../Views/SettingsPanePlugins.xaml | 88 ++++++++++---------
Flow.Launcher/ViewModel/PluginViewModel.cs | 14 ++-
5 files changed, 172 insertions(+), 56 deletions(-)
diff --git a/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs b/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
index 4757681bc..4e4453636 100644
--- a/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
+++ b/Flow.Launcher/Converters/StringEqualityToVisibilityConverter.cs
@@ -1,6 +1,23 @@
-namespace Flow.Launcher.Converters;
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
-public class StringEqualityToVisibilityConverter
+namespace Flow.Launcher.Converters
{
-
+ public class StringEqualityToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value == null || parameter == null)
+ return Visibility.Collapsed;
+
+ return value.ToString() == parameter.ToString() ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
}
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 74edd2dea..ca9f673d8 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -7,10 +7,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:viewModel="clr-namespace:Flow.Launcher.ViewModel"
+ xmlns:converters="clr-namespace:Flow.Launcher.Converters"
d:DataContext="{d:DesignInstance viewModel:PluginViewModel}"
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
+
+
+
+ Visibility="{Binding DataContext.CurrentDisplayMode,
+ RelativeSource={RelativeSource AncestorType=ListBox},
+ Converter={StaticResource StringEqualityToVisibilityConverter},
+ ConverterParameter=Priority}">
+ Margin="0 0 8 0"
+ VerticalAlignment="Center"
+ FontSize="13"
+ Foreground="{DynamicResource Color08B}"
+ Text="{DynamicResource priority}" />
+
+ Visibility="{Binding DataContext.CurrentDisplayMode,
+ RelativeSource={RelativeSource AncestorType=ListBox},
+ Converter={StaticResource StringEqualityToVisibilityConverter},
+ ConverterParameter=SearchDelay}">
+
-
+ Visibility="{Binding DataContext.CurrentDisplayMode,
+ RelativeSource={RelativeSource AncestorType=ListBox},
+ Converter={StaticResource StringEqualityToVisibilityConverter},
+ ConverterParameter=OnOff}" />
+
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 3c1aba400..5cd14ba7e 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -14,6 +14,75 @@ public class SettingsPanePluginsViewModel : BaseModel
{
private readonly Settings _settings;
+ private bool _isOnOffSelected = true;
+ public bool IsOnOffSelected
+ {
+ get => _isOnOffSelected;
+ set
+ {
+ if (_isOnOffSelected != value)
+ {
+ _isOnOffSelected = value;
+ OnPropertyChanged(nameof(IsOnOffSelected));
+ UpdateDisplayMode();
+ }
+ }
+ }
+
+ private bool _isPrioritySelected;
+ public bool IsPrioritySelected
+ {
+ get => _isPrioritySelected;
+ set
+ {
+ if (_isPrioritySelected != value)
+ {
+ _isPrioritySelected = value;
+ OnPropertyChanged(nameof(IsPrioritySelected));
+ UpdateDisplayMode();
+ }
+ }
+ }
+
+ private bool _isSearchDelaySelected;
+ public bool IsSearchDelaySelected
+ {
+ get => _isSearchDelaySelected;
+ set
+ {
+ if (_isSearchDelaySelected != value)
+ {
+ _isSearchDelaySelected = value;
+ OnPropertyChanged(nameof(IsSearchDelaySelected));
+ UpdateDisplayMode();
+ }
+ }
+ }
+
+ private string _currentDisplayMode = "OnOff";
+ public string CurrentDisplayMode
+ {
+ get => _currentDisplayMode;
+ set
+ {
+ if (_currentDisplayMode != value)
+ {
+ _currentDisplayMode = value;
+ OnPropertyChanged(nameof(CurrentDisplayMode));
+ }
+ }
+ }
+
+ private void UpdateDisplayMode()
+ {
+ if (IsOnOffSelected)
+ CurrentDisplayMode = "OnOff";
+ else if (IsPrioritySelected)
+ CurrentDisplayMode = "Priority";
+ else if (IsSearchDelaySelected)
+ CurrentDisplayMode = "SearchDelay";
+ }
+
public SettingsPanePluginsViewModel(Settings settings)
{
_settings = settings;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index 37079a46f..7580a5591 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -6,6 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
+ xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
Title="Plugins"
@@ -17,6 +18,7 @@
mc:Ignorable="d">
+
@@ -31,51 +33,51 @@
Style="{StaticResource PageTitle}"
Text="{DynamicResource plugins}"
TextAlignment="Left" />
-
-
-
-
-
+ Orientation="Horizontal"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Center">
+
+
+
+
+
+
+
string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords);
- public int Priority => PluginPair.Metadata.Priority;
+ //public int Priority => PluginPair.Metadata.Priority;
+ private int _priority;
+ public int Priority
+ {
+ get => PluginPair.Metadata.Priority;
+ set
+ {
+ if (PluginPair.Metadata.Priority != value)
+ {
+ ChangePriority(value);
+ }
+ }
+ }
public string SearchDelayTimeText => PluginPair.Metadata.SearchDelayTime == null ?
App.API.GetTranslation("default") :
App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
From cc1e6dd7eeb40218e1c89b6399530d6db9c5a8e7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 31 Mar 2025 21:53:33 +0800
Subject: [PATCH 0509/1442] Fix theme select initialization issue
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 4467b94fb..31faeba52 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -9,9 +9,13 @@ namespace Flow.Launcher.Plugin.Sys
{
public const string Keyword = "fltheme";
- private readonly Theme _theme;
private readonly PluginInitContext _context;
+ // Do not initialize it in the constructor, because it will cause null reference in
+ // var dicts = Application.Current.Resources.MergedDictionaries; line of Theme
+ private Theme theme = null;
+ private Theme Theme => theme ??= Ioc.Default.GetRequiredService();
+
#region Theme Selection
// Theme select codes simplified from SettingsPaneThemeViewModel.cs
@@ -19,24 +23,23 @@ namespace Flow.Launcher.Plugin.Sys
private Theme.ThemeData _selectedTheme;
public Theme.ThemeData SelectedTheme
{
- get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == _theme.GetCurrentTheme());
+ get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == Theme.GetCurrentTheme());
set
{
_selectedTheme = value;
- _theme.ChangeTheme(value.FileNameWithoutExtension);
+ Theme.ChangeTheme(value.FileNameWithoutExtension);
- _ = _theme.RefreshFrameAsync();
+ _ = Theme.RefreshFrameAsync();
}
}
- private List Themes => _theme.LoadAvailableThemes();
+ private List Themes => Theme.LoadAvailableThemes();
#endregion
public ThemeSelector(PluginInitContext context)
{
_context = context;
- _theme = Ioc.Default.GetRequiredService();
}
public List Query(Query query)
From fb50e6d08f6a31e4e43983867bfff3384acad300 Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 1 Apr 2025 05:03:49 +0900
Subject: [PATCH 0510/1442] Add search delay control
---
Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index ca9f673d8..009644fd6 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -120,9 +120,7 @@
RelativeSource={RelativeSource AncestorType=ListBox},
Converter={StaticResource StringEqualityToVisibilityConverter},
ConverterParameter=SearchDelay}">
-
From d77400d39bbe1dbc7ae476326dfce66e3748f93f Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 1 Apr 2025 05:36:24 +0900
Subject: [PATCH 0511/1442] Add customcontrol for searchdelay
---
.../Controls/InstalledPluginDisplay.xaml | 5 +-
.../InstalledPluginSearchDelayCombobox.xaml | 39 +++++++++
...InstalledPluginSearchDelayCombobox.xaml.cs | 84 +++++++++++++++++++
3 files changed, 126 insertions(+), 2 deletions(-)
create mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
create mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 009644fd6..cb1d8dbc4 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -92,7 +92,7 @@
-
-
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
new file mode 100644
index 000000000..b379b875f
--- /dev/null
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
new file mode 100644
index 000000000..649913872
--- /dev/null
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
@@ -0,0 +1,84 @@
+using System.Collections.Generic;
+using System.Windows.Controls;
+using Flow.Launcher.Plugin;
+
+namespace Flow.Launcher.Resources.Controls
+{
+ public partial class InstalledPluginSearchDelayCombobox
+ {
+ public InstalledPluginSearchDelayCombobox()
+ {
+ InitializeComponent();
+ LoadDelayOptions();
+ Loaded += InstalledPluginSearchDelayCombobox_Loaded;
+ }
+
+ private void InstalledPluginSearchDelayCombobox_Loaded(object sender, System.Windows.RoutedEventArgs e)
+ {
+ if (DataContext is ViewModel.PluginViewModel viewModel)
+ {
+ // 초기 값 설정
+ int currentDelayMs = GetCurrentDelayMs(viewModel);
+ foreach (DelayOption option in cbDelay.Items)
+ {
+ if (option.Value == currentDelayMs)
+ {
+ cbDelay.SelectedItem = option;
+ break;
+ }
+ }
+ }
+ }
+
+ private int GetCurrentDelayMs(ViewModel.PluginViewModel viewModel)
+ {
+ // SearchDelayTime enum 값을 int로 변환
+ SearchDelayTime? delayTime = viewModel.PluginPair.Metadata.SearchDelayTime;
+ if (delayTime.HasValue)
+ {
+ return (int)delayTime.Value;
+ }
+ return 0; // 기본값
+ }
+
+ private void LoadDelayOptions()
+ {
+ // 검색 지연 시간 옵션들 (SearchDelayTime enum 값에 맞춰야 함)
+ var delayOptions = new List
+ {
+ new DelayOption { Display = "0 ms", Value = 0 },
+ new DelayOption { Display = "50 ms", Value = 50 },
+ new DelayOption { Display = "100 ms", Value = 100 },
+ new DelayOption { Display = "150 ms", Value = 150 },
+ new DelayOption { Display = "200 ms", Value = 200 },
+ new DelayOption { Display = "250 ms", Value = 250 },
+ new DelayOption { Display = "300 ms", Value = 300 },
+ new DelayOption { Display = "350 ms", Value = 350 },
+ new DelayOption { Display = "400 ms", Value = 400 },
+ new DelayOption { Display = "450 ms", Value = 450 },
+ new DelayOption { Display = "500 ms", Value = 500 },
+ };
+
+ cbDelay.ItemsSource = delayOptions;
+ }
+
+ private void CbDelay_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (DataContext is ViewModel.PluginViewModel viewModel && cbDelay.SelectedItem is DelayOption selectedOption)
+ {
+ // int 값을 SearchDelayTime enum으로 변환
+ int delayValue = selectedOption.Value;
+ viewModel.PluginPair.Metadata.SearchDelayTime = (SearchDelayTime)delayValue;
+
+ // 설정 저장
+ //How to save?
+ }
+ }
+ }
+
+ public class DelayOption
+ {
+ public string Display { get; set; }
+ public int Value { get; set; }
+ }
+}
From bf259dcb13eb0258417f79e1858303717c32a1e9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 08:47:57 +0800
Subject: [PATCH 0512/1442] Fix application dispose issue
---
Flow.Launcher/App.xaml.cs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 7b1d113fb..9aee56bff 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -138,6 +138,11 @@ namespace Flow.Launcher
{
await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
{
+ // Because new message box api uses MessageBoxEx window,
+ // if it is created and closed before main window is created, it will cause the application to exit.
+ // So set to OnExplicitShutdown to prevent the application from shutting down before main window is created
+ Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
+
Log.SetLogLevel(_settings.LogLevel);
Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate();
From 6a2b3495a009927c8593de42a3c21020f01c12d7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 09:26:39 +0800
Subject: [PATCH 0513/1442] Ask reselect environment path until it is valid
---
.../Environments/AbstractPluginEnvironment.cs | 40 +++++++++++++++++--
Flow.Launcher/Languages/en.xaml | 5 +++
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
index f80e573f9..0bd00d982 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
@@ -69,10 +69,44 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
var selectedFile = GetFileFromDialog(msg, FileDialogFilter);
- if (!string.IsNullOrEmpty(selectedFile)) PluginsSettingsFilePath = selectedFile;
-
+ if (!string.IsNullOrEmpty(selectedFile))
+ {
+ PluginsSettingsFilePath = selectedFile;
+ }
// Nothing selected because user pressed cancel from the file dialog window
- if (string.IsNullOrEmpty(selectedFile)) InstallEnvironment();
+ else
+ {
+ var forceDownloadMessage = string.Format(
+ API.GetTranslation("runtimeExecutableInvalidChooseDownload"),
+ Language,
+ EnvName,
+ Environment.NewLine
+ );
+
+ // Let users select valid path or choose to download
+ while (string.IsNullOrEmpty(selectedFile))
+ {
+ if (API.ShowMsgBox(forceDownloadMessage, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.Yes)
+ {
+ // Continue select file
+ selectedFile = GetFileFromDialog(msg, FileDialogFilter);
+ }
+ else
+ {
+ // User selected no, break the loop
+ break;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(selectedFile))
+ {
+ PluginsSettingsFilePath = selectedFile;
+ }
+ else
+ {
+ InstallEnvironment();
+ }
+ }
}
else
{
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 3c0e5b153..2df430c3b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -9,6 +9,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
From a9dfd1b377d2129cf74a51171386db84bc486a78 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 09:57:04 +0800
Subject: [PATCH 0514/1442] Code quality
---
.../Environments/AbstractPluginEnvironment.cs | 4 ++--
.../Environments/PythonEnvironment.cs | 12 ++++++++----
.../Environments/TypeScriptEnvironment.cs | 14 +++++++++-----
.../Environments/TypeScriptV2Environment.cs | 14 +++++++++-----
4 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
index 0bd00d982..bbb6cf638 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
@@ -249,8 +249,8 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
var index = filePath.IndexOf(DataLocation.PluginEnvironments);
// get the substring after "Environments" because we can not determine it dynamically
- var ExecutablePathSubstring = filePath[(index + DataLocation.PluginEnvironments.Length)..];
- return $"{DataLocation.PluginEnvironmentsPath}{ExecutablePathSubstring}";
+ var executablePathSubstring = filePath[(index + DataLocation.PluginEnvironments.Length)..];
+ return $"{DataLocation.PluginEnvironmentsPath}{executablePathSubstring}";
}
}
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
index 607c19062..fab5738de 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
@@ -1,10 +1,10 @@
-using Droplex;
+using System.Collections.Generic;
+using System.IO;
+using Droplex;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
-using System.Collections.Generic;
-using System.IO;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -22,7 +22,11 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal override string FileDialogFilter => "Python|pythonw.exe";
- internal override string PluginsSettingsFilePath { get => PluginSettings.PythonExecutablePath; set => PluginSettings.PythonExecutablePath = value; }
+ internal override string PluginsSettingsFilePath
+ {
+ get => PluginSettings.PythonExecutablePath;
+ set => PluginSettings.PythonExecutablePath = value;
+ }
internal PythonEnvironment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
index 399f7cc03..8a4f527ba 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
-using Droplex;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin.SharedCommands;
-using Flow.Launcher.Plugin;
using System.IO;
+using Droplex;
using Flow.Launcher.Core.Plugin;
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -19,7 +19,11 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal override string InstallPath => Path.Combine(EnvPath, "Node-v16.18.0");
internal override string ExecutablePath => Path.Combine(InstallPath, "node-v16.18.0-win-x64\\node.exe");
- internal override string PluginsSettingsFilePath { get => PluginSettings.NodeExecutablePath; set => PluginSettings.NodeExecutablePath = value; }
+ internal override string PluginsSettingsFilePath
+ {
+ get => PluginSettings.NodeExecutablePath;
+ set => PluginSettings.NodeExecutablePath = value;
+ }
internal TypeScriptEnvironment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
index e8cb72e11..61fd28376 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
-using Droplex;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin.SharedCommands;
-using Flow.Launcher.Plugin;
using System.IO;
+using Droplex;
using Flow.Launcher.Core.Plugin;
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -19,7 +19,11 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal override string InstallPath => Path.Combine(EnvPath, "Node-v16.18.0");
internal override string ExecutablePath => Path.Combine(InstallPath, "node-v16.18.0-win-x64\\node.exe");
- internal override string PluginsSettingsFilePath { get => PluginSettings.NodeExecutablePath; set => PluginSettings.NodeExecutablePath = value; }
+ internal override string PluginsSettingsFilePath
+ {
+ get => PluginSettings.NodeExecutablePath;
+ set => PluginSettings.NodeExecutablePath = value;
+ }
internal TypeScriptV2Environment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
From f9c1b6aa3e4dd7052f484e8518e92fffbe234861 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 09:57:55 +0800
Subject: [PATCH 0515/1442] Adjust usings
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 4f869901c..17517832b 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -1,20 +1,19 @@
-using Flow.Launcher.Core.ExternalPlugins;
-using System;
+using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
-using ISavable = Flow.Launcher.Plugin.ISavable;
using Flow.Launcher.Plugin.SharedCommands;
-using System.Text.Json;
-using Flow.Launcher.Core.Resource;
-using CommunityToolkit.Mvvm.DependencyInjection;
+using ISavable = Flow.Launcher.Plugin.ISavable;
namespace Flow.Launcher.Core.Plugin
{
From 6f0126d3ba3f4ab8c6928141287391602d77cf1f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 11:47:18 +0800
Subject: [PATCH 0516/1442] Add log error api function for csharp and jsonrpc
---
.../Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs | 8 ++++++--
Flow.Launcher.Infrastructure/Logger/Log.cs | 11 ++---------
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 5 +++++
Flow.Launcher/PublicAPIInstance.cs | 3 +++
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
index 8df2ce9ed..102d0089f 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
@@ -12,7 +12,7 @@ namespace Flow.Launcher.Core.Plugin.JsonRPCV2Models
{
public class JsonRPCPublicAPI
{
- private IPublicAPI _api;
+ private readonly IPublicAPI _api;
public JsonRPCPublicAPI(IPublicAPI api)
{
@@ -104,7 +104,6 @@ namespace Flow.Launcher.Core.Plugin.JsonRPCV2Models
return _api.GetAllPlugins();
}
-
public MatchResult FuzzySearch(string query, string stringToCompare)
{
return _api.FuzzySearch(query, stringToCompare);
@@ -156,6 +155,11 @@ namespace Flow.Launcher.Core.Plugin.JsonRPCV2Models
_api.LogWarn(className, message, methodName);
}
+ public void LogError(string className, string message, [CallerMemberName] string methodName = "")
+ {
+ _api.LogError(className, message, methodName);
+ }
+
public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
{
_api.OpenDirectory(DirectoryPath, FileNameOrFilePath);
diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs
index 9f5d6725e..9e1173f34 100644
--- a/Flow.Launcher.Infrastructure/Logger/Log.cs
+++ b/Flow.Launcher.Infrastructure/Logger/Log.cs
@@ -1,12 +1,12 @@
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
+using System.Runtime.ExceptionServices;
+using Flow.Launcher.Infrastructure.UserSettings;
using NLog;
using NLog.Config;
using NLog.Targets;
-using Flow.Launcher.Infrastructure.UserSettings;
using NLog.Targets.Wrappers;
-using System.Runtime.ExceptionServices;
namespace Flow.Launcher.Infrastructure.Logger
{
@@ -135,13 +135,6 @@ namespace Flow.Launcher.Infrastructure.Logger
return className;
}
- private static void ExceptionInternal(string classAndMethod, string message, System.Exception e)
- {
- var logger = LogManager.GetLogger(classAndMethod);
-
- logger.Error(e, message);
- }
-
private static void LogInternal(string message, LogLevel level)
{
if (FormatValid(message))
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f178ebb90..9258e5147 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -227,6 +227,11 @@ namespace Flow.Launcher.Plugin
///
void LogWarn(string className, string message, [CallerMemberName] string methodName = "");
+ ///
+ /// Log error message
+ ///
+ void LogError(string className, string message, [CallerMemberName] string methodName = "");
+
///
/// Log an Exception. Will throw if in debug mode so developer will be aware,
/// otherwise logs the eror message. This is the primary logging method used for Flow
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index e19ad2fdc..31307b668 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -187,6 +187,9 @@ namespace Flow.Launcher
public void LogWarn(string className, string message, [CallerMemberName] string methodName = "") =>
Log.Warn(className, message, methodName);
+ public void LogError(string className, string message, [CallerMemberName] string methodName = "") =>
+ Log.Error(className, message, methodName);
+
public void LogException(string className, string message, Exception e,
[CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName);
From 1381248e9e71444b56704548167830010f97ac68 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 11:54:18 +0800
Subject: [PATCH 0517/1442] Adjust code formats
---
Flow.Launcher/PublicAPIInstance.cs | 35 ++++++++++++++++++++----------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 31307b668..2d2713e79 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -11,9 +11,9 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Squirrel;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Plugin;
+using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Http;
@@ -27,7 +27,7 @@ using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel;
using JetBrains.Annotations;
-using Flow.Launcher.Core.Resource;
+using Squirrel;
namespace Flow.Launcher
{
@@ -78,7 +78,11 @@ namespace Flow.Launcher
public bool IsMainWindowVisible() => _mainVM.MainWindowVisibilityStatus;
- public event VisibilityChangedEventHandler VisibilityChanged { add => _mainVM.VisibilityChanged += value; remove => _mainVM.VisibilityChanged -= value; }
+ public event VisibilityChangedEventHandler VisibilityChanged
+ {
+ add => _mainVM.VisibilityChanged += value;
+ remove => _mainVM.VisibilityChanged -= value;
+ }
// Must use Ioc.Default.GetRequiredService() to avoid circular dependency
public void CheckForNewUpdate() => _ = Ioc.Default.GetRequiredService().UpdateAppAsync(false);
@@ -162,13 +166,14 @@ namespace Flow.Launcher
public MatchResult FuzzySearch(string query, string stringToCompare) =>
StringMatcher.FuzzySearch(query, stringToCompare);
- public Task HttpGetStringAsync(string url, CancellationToken token = default) => Http.GetAsync(url, token);
+ public Task HttpGetStringAsync(string url, CancellationToken token = default) =>
+ Http.GetAsync(url, token);
public Task HttpGetStreamAsync(string url, CancellationToken token = default) =>
Http.GetStreamAsync(url, token);
public Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath, Action reportProgress = null,
- CancellationToken token = default) => Http.DownloadAsync(url, filePath, reportProgress, token);
+ CancellationToken token = default) =>Http.DownloadAsync(url, filePath, reportProgress, token);
public void AddActionKeyword(string pluginId, string newActionKeyword) =>
PluginManager.AddActionKeyword(pluginId, newActionKeyword);
@@ -190,8 +195,8 @@ namespace Flow.Launcher
public void LogError(string className, string message, [CallerMemberName] string methodName = "") =>
Log.Error(className, message, methodName);
- public void LogException(string className, string message, Exception e,
- [CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName);
+ public void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "") =>
+ Log.Exception(className, message, e, methodName);
private readonly ConcurrentDictionary _pluginJsonStorages = new();
@@ -204,7 +209,7 @@ namespace Flow.Launcher
var name = value.GetType().GetField("AssemblyName")?.GetValue(value)?.ToString();
if (name == assemblyName)
{
- _pluginJsonStorages.Remove(key, out var pluginJsonStorage);
+ _pluginJsonStorages.Remove(key, out var _);
}
}
}
@@ -333,17 +338,23 @@ namespace Flow.Launcher
private readonly List> _globalKeyboardHandlers = new();
- public void RegisterGlobalKeyboardCallback(Func callback) => _globalKeyboardHandlers.Add(callback);
- public void RemoveGlobalKeyboardCallback(Func callback) => _globalKeyboardHandlers.Remove(callback);
+ public void RegisterGlobalKeyboardCallback(Func callback) =>
+ _globalKeyboardHandlers.Add(callback);
+
+ public void RemoveGlobalKeyboardCallback(Func callback) =>
+ _globalKeyboardHandlers.Remove(callback);
public void ReQuery(bool reselect = true) => _mainVM.ReQuery(reselect);
public void BackToQueryResults() => _mainVM.BackToQueryResults();
- public MessageBoxResult ShowMsgBox(string messageBoxText, string caption = "", MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None, MessageBoxResult defaultResult = MessageBoxResult.OK) =>
+ public MessageBoxResult ShowMsgBox(string messageBoxText, string caption = "",
+ MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None,
+ MessageBoxResult defaultResult = MessageBoxResult.OK) =>
MessageBoxEx.Show(messageBoxText, caption, button, icon, defaultResult);
- public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
+ public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync,
+ Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
#endregion
From 835e4096c8ec781e6bd319946853060f9de2b493 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 11:56:51 +0800
Subject: [PATCH 0518/1442] Fix build issue
---
Flow.Launcher.Infrastructure/Logger/Log.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs
index 9e1173f34..84331ef70 100644
--- a/Flow.Launcher.Infrastructure/Logger/Log.cs
+++ b/Flow.Launcher.Infrastructure/Logger/Log.cs
@@ -135,6 +135,15 @@ namespace Flow.Launcher.Infrastructure.Logger
return className;
}
+#if !DEBUG
+ private static void ExceptionInternal(string classAndMethod, string message, System.Exception e)
+ {
+ var logger = LogManager.GetLogger(classAndMethod);
+
+ logger.Error(e, message);
+ }
+#endif
+
private static void LogInternal(string message, LogLevel level)
{
if (FormatValid(message))
From 24327533c6e165f0cfa02e9a822fcf973c1880df Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 14:16:32 +0800
Subject: [PATCH 0519/1442] Add plugin json storage
---
.../Image/ImageLoader.cs | 1 +
.../Storage/BinaryStorage.cs | 62 +++++++++++++++----
.../Storage/PluginBinaryStorage.cs | 15 +++++
.../Storage/PluginJsonStorage.cs | 6 --
4 files changed, 65 insertions(+), 19 deletions(-)
create mode 100644 Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 6f7b1cd90..cca4bd2a4 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -37,6 +37,7 @@ namespace Flow.Launcher.Infrastructure.Image
_hashGenerator = new ImageHashGenerator();
var usage = await LoadStorageToConcurrentDictionaryAsync();
+ _storage.ClearData();
ImageCache.Initialize(usage);
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 5b73faae6..69ac6000b 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -4,6 +4,8 @@ using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using MemoryPack;
+#nullable enable
+
namespace Flow.Launcher.Infrastructure.Storage
{
///
@@ -15,40 +17,53 @@ namespace Flow.Launcher.Infrastructure.Storage
///
public class BinaryStorage
{
+ protected T? Data;
+
public const string FileSuffix = ".cache";
- // Let the derived class to set the file path
- public BinaryStorage(string filename, string directoryPath = null)
- {
- directoryPath ??= DataLocation.CacheDirectory;
- Helper.ValidateDirectory(directoryPath);
+ protected string FilePath { get; init; } = null!;
- FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
+ protected string DirectoryPath { get; init; } = null!;
+
+ // Let the derived class to set the file path
+ protected BinaryStorage()
+ {
}
- public string FilePath { get; }
+ public BinaryStorage(string filename)
+ {
+ DirectoryPath = DataLocation.CacheDirectory;
+ Helper.ValidateDirectory(DirectoryPath);
+
+ FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
+ }
public async ValueTask TryLoadAsync(T defaultData)
{
+ if (Data != null)
+ return Data;
+
if (File.Exists(FilePath))
{
if (new FileInfo(FilePath).Length == 0)
{
Log.Error($"|BinaryStorage.TryLoad|Zero length cache file <{FilePath}>");
- await SaveAsync(defaultData);
- return defaultData;
+ Data = defaultData;
+ await SaveAsync();
}
await using var stream = new FileStream(FilePath, FileMode.Open);
var d = await DeserializeAsync(stream, defaultData);
- return d;
+ Data = d;
}
else
{
Log.Info("|BinaryStorage.TryLoad|Cache file not exist, load default data");
- await SaveAsync(defaultData);
- return defaultData;
+ Data = defaultData;
+ await SaveAsync();
}
+
+ return Data;
}
private static async ValueTask DeserializeAsync(Stream stream, T defaultData)
@@ -56,7 +71,7 @@ namespace Flow.Launcher.Infrastructure.Storage
try
{
var t = await MemoryPackSerializer.DeserializeAsync(stream);
- return t;
+ return t ?? defaultData;
}
catch (System.Exception)
{
@@ -65,6 +80,27 @@ namespace Flow.Launcher.Infrastructure.Storage
}
}
+ public async ValueTask SaveAsync()
+ {
+ await using var stream = new FileStream(FilePath, FileMode.Create);
+ await MemoryPackSerializer.SerializeAsync(stream, Data);
+ }
+
+ // For SavePluginSettings function
+ public void Save()
+ {
+ var serialized = MemoryPackSerializer.Serialize(Data);
+
+ File.WriteAllBytes(FilePath, serialized);
+ }
+
+ // ImageCache need to be converted into concurrent dictionary, so it does not need to cache loading results into Data
+ public void ClearData()
+ {
+ Data = default;
+ }
+
+ // ImageCache storages data in its class, so it needs to pass it to SaveAsync
public async ValueTask SaveAsync(T data)
{
await using var stream = new FileStream(FilePath, FileMode.Create);
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
new file mode 100644
index 000000000..87f51d5d7
--- /dev/null
+++ b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
@@ -0,0 +1,15 @@
+using System.IO;
+
+namespace Flow.Launcher.Infrastructure.Storage
+{
+ public class PluginBinaryStorage : BinaryStorage where T : new()
+ {
+ public PluginBinaryStorage(string cacheName, string cacheDirectory)
+ {
+ DirectoryPath = cacheDirectory;
+ Helper.ValidateDirectory(DirectoryPath);
+
+ FilePath = Path.Combine(DirectoryPath, $"{cacheName}{FileSuffix}");
+ }
+ }
+}
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index b377c81aa..9c6547c66 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -10,7 +10,6 @@ namespace Flow.Launcher.Infrastructure.Storage
public PluginJsonStorage()
{
- // C# related, add python related below
var dataType = typeof(T);
AssemblyName = dataType.Assembly.GetName().Name;
DirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, AssemblyName);
@@ -18,10 +17,5 @@ namespace Flow.Launcher.Infrastructure.Storage
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
}
-
- public PluginJsonStorage(T data) : this()
- {
- Data = data;
- }
}
}
From ca221d710026b3e402873a174696a48e28e5d958 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 14:19:59 +0800
Subject: [PATCH 0520/1442] Add binary storage api functions
---
.../JsonRPCV2Models/JsonRPCPublicAPI.cs | 5 ++
Flow.Launcher.Core/Plugin/PluginManager.cs | 5 +-
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 33 ++++++++++++
Flow.Launcher.Plugin/Interfaces/ISavable.cs | 7 +--
Flow.Launcher/PublicAPIInstance.cs | 53 ++++++++++++++++---
5 files changed, 91 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
index 8df2ce9ed..cf1c57f3e 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs
@@ -185,5 +185,10 @@ namespace Flow.Launcher.Core.Plugin.JsonRPCV2Models
{
_api.StopLoadingBar();
}
+
+ public void SavePluginCaches()
+ {
+ _api.SavePluginCaches();
+ }
}
}
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 4f869901c..fa4e43e07 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -66,6 +66,7 @@ namespace Flow.Launcher.Core.Plugin
}
API.SavePluginSettings();
+ API.SavePluginCaches();
}
public static async ValueTask DisposePluginsAsync()
@@ -587,11 +588,13 @@ namespace Flow.Launcher.Core.Plugin
if (removePluginSettings)
{
- // For dotnet plugins, we need to remove their PluginJsonStorage instance
+ // For dotnet plugins, we need to remove their PluginJsonStorage and PluginBinaryStorage instances
if (AllowedLanguage.IsDotNet(plugin.Language))
{
var method = API.GetType().GetMethod("RemovePluginSettings");
method?.Invoke(API, new object[] { plugin.AssemblyName });
+ var method1 = API.GetType().GetMethod("RemovePluginCache");
+ method1?.Invoke(API, new object[] { plugin.PluginCacheDirectoryPath });
}
try
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f178ebb90..be776b068 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -344,5 +344,38 @@ namespace Flow.Launcher.Plugin
/// Stop the loading bar in main window
///
public void StopLoadingBar();
+
+ ///
+ /// Save all Flow's plugins caches
+ ///
+ void SavePluginCaches();
+
+ ///
+ /// Load BinaryStorage for current plugin's cache. This is the method used to load cache from binary in Flow.
+ /// When the file is not exist, it will create a new instance for the specific type.
+ ///
+ /// Type for deserialization
+ /// Cache file name
+ /// Cache directory from plugin metadata
+ /// Default data to return
+ ///
+ ///
+ /// BinaryStorage utilize MemoryPack, which means the object must be MemoryPackSerializable
+ ///
+ Task LoadCacheBinaryStorageAsync(string cacheName, string cacheDirectory, T defaultData) where T : new();
+
+ ///
+ /// Save BinaryStorage for current plugin's cache. This is the method used to save cache to binary in Flow.Launcher
+ /// This method will save the original instance loaded with LoadCacheBinaryStorageAsync.
+ /// This API call is for manually Save. Flow will automatically save all cache type that has called LoadCacheBinaryStorageAsync or SaveCacheBinaryStorageAsync previously.
+ ///
+ /// Type for Serialization
+ /// Cache file name
+ /// Cache directory from plugin metadata
+ ///
+ ///
+ /// BinaryStorage utilize MemoryPack, which means the object must be MemoryPackSerializable
+ ///
+ Task SaveCacheBinaryStorageAsync(string cacheName, string cacheDirectory) where T : new();
}
}
diff --git a/Flow.Launcher.Plugin/Interfaces/ISavable.cs b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
index 77bd304e4..cabd26962 100644
--- a/Flow.Launcher.Plugin/Interfaces/ISavable.cs
+++ b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
@@ -1,11 +1,12 @@
-namespace Flow.Launcher.Plugin
+namespace Flow.Launcher.Plugin
{
///
/// Inherit this interface if additional data e.g. cache needs to be saved.
///
///
/// For storing plugin settings, prefer
- /// or .
+ /// or .
+ /// or .
/// Once called, your settings will be automatically saved by Flow.
///
public interface ISavable : IFeatures
@@ -15,4 +16,4 @@ namespace Flow.Launcher.Plugin
///
void Save();
}
-}
\ No newline at end of file
+}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index e19ad2fdc..17d7e103e 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -236,14 +236,6 @@ namespace Flow.Launcher
((PluginJsonStorage)_pluginJsonStorages[type]).Save();
}
- public void SaveJsonStorage(T settings) where T : new()
- {
- var type = typeof(T);
- _pluginJsonStorages[type] = new PluginJsonStorage(settings);
-
- ((PluginJsonStorage)_pluginJsonStorages[type]).Save();
- }
-
public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
{
using var explorer = new Process();
@@ -342,6 +334,51 @@ namespace Flow.Launcher
public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
+ private readonly ConcurrentDictionary<(string, string, Type), object> _pluginBinaryStorages = new();
+
+ public void RemovePluginCache(string cacheDirectory)
+ {
+ foreach (var keyValuePair in _pluginBinaryStorages)
+ {
+ var key = keyValuePair.Key;
+ var currentCacheDirectory = key.Item2;
+ if (cacheDirectory == currentCacheDirectory)
+ {
+ _pluginBinaryStorages.Remove(key, out var _);
+ }
+ }
+ }
+
+ ///
+ /// Save plugin caches.
+ ///
+ public void SavePluginCaches()
+ {
+ foreach (var value in _pluginBinaryStorages.Values)
+ {
+ var method = value.GetType().GetMethod("Save");
+ method?.Invoke(value, null);
+ }
+ }
+
+ public async Task LoadCacheBinaryStorageAsync(string cacheName, string cacheDirectory, T defaultData) where T : new()
+ {
+ var type = typeof(T);
+ if (!_pluginBinaryStorages.ContainsKey((cacheName, cacheDirectory, type)))
+ _pluginBinaryStorages[(cacheName, cacheDirectory, type)] = new PluginBinaryStorage(cacheName, cacheDirectory);
+
+ return await ((PluginBinaryStorage)_pluginBinaryStorages[(cacheName, cacheDirectory, type)]).TryLoadAsync(defaultData);
+ }
+
+ public async Task SaveCacheBinaryStorageAsync(string cacheName, string cacheDirectory) where T : new()
+ {
+ var type = typeof(T);
+ if (!_pluginBinaryStorages.ContainsKey((cacheName, cacheDirectory, type)))
+ _pluginBinaryStorages[(cacheName, cacheDirectory, type)] = new PluginBinaryStorage(cacheName, cacheDirectory);
+
+ await ((PluginBinaryStorage)_pluginBinaryStorages[(cacheName, cacheDirectory, type)]).SaveAsync();
+ }
+
#endregion
#region Private Methods
From 0496d6c04ac2bed323060f41519c41fe1358dc73 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 14:21:29 +0800
Subject: [PATCH 0521/1442] Use api functions for Program plugin
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 82 +++++++++----------
.../Programs/UWPPackage.cs | 2 +-
.../Programs/Win32.cs | 2 +-
.../Views/ProgramSetting.xaml.cs | 6 +-
4 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 3be23214c..5bc518105 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -8,7 +8,6 @@ using System.Threading.Tasks;
using System.Windows.Controls;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.Program.Programs;
using Flow.Launcher.Plugin.Program.Views;
@@ -19,19 +18,17 @@ using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
namespace Flow.Launcher.Plugin.Program
{
- public class Main : ISettingProvider, IAsyncPlugin, IPluginI18n, IContextMenu, ISavable, IAsyncReloadable,
- IDisposable
+ public class Main : ISettingProvider, IAsyncPlugin, IPluginI18n, IContextMenu, IAsyncReloadable, IDisposable
{
- internal static Win32[] _win32s { get; set; }
- internal static UWPApp[] _uwps { get; set; }
- internal static Settings _settings { get; set; }
+ private const string Win32CacheName = "Win32";
+ private const string UwpCacheName = "UWP";
+ internal static List _win32s { get; private set; }
+ internal static List _uwps { get; private set; }
+ internal static Settings _settings { get; private set; }
internal static PluginInitContext Context { get; private set; }
- private static BinaryStorage _win32Storage;
- private static BinaryStorage _uwpStorage;
-
private static readonly List emptyResults = new();
private static readonly MemoryCacheOptions cacheOptions = new() { SizeLimit = 1560 };
@@ -81,12 +78,6 @@ namespace Flow.Launcher.Plugin.Program
{
}
- public void Save()
- {
- _win32Storage.SaveAsync(_win32s);
- _uwpStorage.SaveAsync(_uwps);
- }
-
public async Task> QueryAsync(Query query, CancellationToken token)
{
var result = await cache.GetOrCreateAsync(query.Search, async entry =>
@@ -191,7 +182,9 @@ namespace Flow.Launcher.Plugin.Program
await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
{
- Helper.ValidateDirectory(Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
+ var pluginCachePath = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
+
+ Helper.ValidateDirectory(pluginCachePath);
static void MoveFile(string sourcePath, string destinationPath)
{
@@ -236,20 +229,18 @@ namespace Flow.Launcher.Plugin.Program
}
// Move old cache files to the new cache directory
- var oldWin32CacheFile = Path.Combine(DataLocation.CacheDirectory, $"Win32.cache");
- var newWin32CacheFile = Path.Combine(Context.CurrentPluginMetadata.PluginCacheDirectoryPath, $"Win32.cache");
+ var oldWin32CacheFile = Path.Combine(DataLocation.CacheDirectory, $"{Win32CacheName}.cache");
+ var newWin32CacheFile = Path.Combine(pluginCachePath, $"{Win32CacheName}.cache");
MoveFile(oldWin32CacheFile, newWin32CacheFile);
- var oldUWPCacheFile = Path.Combine(DataLocation.CacheDirectory, $"UWP.cache");
- var newUWPCacheFile = Path.Combine(Context.CurrentPluginMetadata.PluginCacheDirectoryPath, $"UWP.cache");
+ var oldUWPCacheFile = Path.Combine(DataLocation.CacheDirectory, $"{UwpCacheName}.cache");
+ var newUWPCacheFile = Path.Combine(pluginCachePath, $"{UwpCacheName}.cache");
MoveFile(oldUWPCacheFile, newUWPCacheFile);
- _win32Storage = new BinaryStorage("Win32", Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
- _win32s = await _win32Storage.TryLoadAsync(Array.Empty());
- _uwpStorage = new BinaryStorage("UWP", Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
- _uwps = await _uwpStorage.TryLoadAsync(Array.Empty());
+ _win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCachePath, new List());
+ _uwps = await context.API.LoadCacheBinaryStorageAsync(UwpCacheName, pluginCachePath, new List());
});
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Length}>");
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwps.Length}>");
+ Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Count}>");
+ Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwps.Count}>");
bool cacheEmpty = !_win32s.Any() || !_uwps.Any();
@@ -273,36 +264,45 @@ namespace Flow.Launcher.Plugin.Program
}
}
- public static void IndexWin32Programs()
+ public static async Task IndexWin32ProgramsAsync()
{
var win32S = Win32.All(_settings);
- _win32s = win32S;
+ _win32s.Clear();
+ foreach (var win32 in win32S)
+ {
+ _win32s.Add(win32);
+ }
ResetCache();
- _win32Storage.SaveAsync(_win32s);
+ await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
}
- public static void IndexUwpPrograms()
+ public static async Task IndexUwpProgramsAsync()
{
- var applications = UWPPackage.All(_settings);
- _uwps = applications;
+ var uwps = UWPPackage.All(_settings);
+ _uwps.Clear();
+ foreach (var uwp in uwps)
+ {
+ _uwps.Add(uwp);
+ }
ResetCache();
- _uwpStorage.SaveAsync(_uwps);
+ await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
}
public static async Task IndexProgramsAsync()
{
- var a = Task.Run(() =>
+ var win32Task = Task.Run(async () =>
{
- Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|Win32Program index cost", IndexWin32Programs);
+ await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Win32Program index cost", IndexWin32ProgramsAsync);
});
- var b = Task.Run(() =>
+ var uwpTask = Task.Run(async () =>
{
- Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|UWPProgram index cost", IndexUwpPrograms);
+ await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|UWPProgram index cost", IndexUwpProgramsAsync);
});
- await Task.WhenAll(a, b).ConfigureAwait(false);
+
+ await Task.WhenAll(win32Task, uwpTask).ConfigureAwait(false);
}
internal static void ResetCache()
@@ -314,7 +314,7 @@ namespace Flow.Launcher.Plugin.Program
public Control CreateSettingPanel()
{
- return new ProgramSetting(Context, _settings, _win32s, _uwps);
+ return new ProgramSetting(Context, _settings);
}
public string GetTranslatedPluginTitle()
@@ -370,7 +370,7 @@ namespace Flow.Launcher.Plugin.Program
_settings.DisabledProgramSources.Add(new ProgramSource(program));
_ = Task.Run(() =>
{
- IndexUwpPrograms();
+ _ = IndexUwpProgramsAsync();
});
}
else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
@@ -380,7 +380,7 @@ namespace Flow.Launcher.Plugin.Program
_settings.DisabledProgramSources.Add(new ProgramSource(program));
_ = Task.Run(() =>
{
- IndexWin32Programs();
+ _ = IndexWin32ProgramsAsync();
});
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
index 654897cc5..bf100ed7e 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
@@ -317,7 +317,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
await Task.Delay(3000).ConfigureAwait(false);
PackageChangeChannel.Reader.TryRead(out _);
- await Task.Run(Main.IndexUwpPrograms);
+ await Task.Run(Main.IndexUwpProgramsAsync);
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index a64a708ef..06be2a628 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -797,7 +797,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
}
- await Task.Run(Main.IndexWin32Programs);
+ await Task.Run(Main.IndexWin32ProgramsAsync);
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 91864cb68..5ad7fcea3 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -18,8 +18,8 @@ namespace Flow.Launcher.Plugin.Program.Views
///
public partial class ProgramSetting : UserControl
{
- private PluginInitContext context;
- private Settings _settings;
+ private readonly PluginInitContext context;
+ private readonly Settings _settings;
private GridViewColumnHeader _lastHeaderClicked;
private ListSortDirection _lastDirection;
@@ -109,7 +109,7 @@ namespace Flow.Launcher.Plugin.Program.Views
public bool ShowUWPCheckbox => UWPPackage.SupportUWP();
- public ProgramSetting(PluginInitContext context, Settings settings, Win32[] win32s, UWPApp[] uwps)
+ public ProgramSetting(PluginInitContext context, Settings settings)
{
this.context = context;
_settings = settings;
From 68e1fc28efcc31362193aab4e73aa7459bf1b1af Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 14:35:43 +0800
Subject: [PATCH 0522/1442] Use try remove for safety
---
Flow.Launcher/PublicAPIInstance.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 17d7e103e..770195550 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -201,7 +201,7 @@ namespace Flow.Launcher
var name = value.GetType().GetField("AssemblyName")?.GetValue(value)?.ToString();
if (name == assemblyName)
{
- _pluginJsonStorages.Remove(key, out var pluginJsonStorage);
+ _pluginJsonStorages.TryRemove(key, out var pluginJsonStorage);
}
}
}
@@ -344,7 +344,7 @@ namespace Flow.Launcher
var currentCacheDirectory = key.Item2;
if (cacheDirectory == currentCacheDirectory)
{
- _pluginBinaryStorages.Remove(key, out var _);
+ _pluginBinaryStorages.TryRemove(key, out var _);
}
}
}
From 8e8b5dbbba6d45c9304b556c022fe2ebf277ed5d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 19:18:32 +0800
Subject: [PATCH 0523/1442] Code quality
---
.../ViewModels/SettingsPaneAboutViewModel.cs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 20f905411..07e9fba1e 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using System.Windows;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -24,7 +23,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
get
{
var size = GetLogFiles().Sum(file => file.Length);
- return $"{InternationalizationManager.Instance.GetTranslation("clearlogfolder")} ({BytesToReadableString(size)})";
+ return $"{App.API.GetTranslation("clearlogfolder")} ({BytesToReadableString(size)})";
}
}
@@ -42,7 +41,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
};
public string ActivatedTimes => string.Format(
- InternationalizationManager.Instance.GetTranslation("about_activate_times"),
+ App.API.GetTranslation("about_activate_times"),
_settings.ActivateTimes
);
@@ -88,8 +87,8 @@ public partial class SettingsPaneAboutViewModel : BaseModel
private void AskClearLogFolderConfirmation()
{
var confirmResult = App.API.ShowMsgBox(
- InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
- InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
+ App.API.GetTranslation("clearlogfolderMessage"),
+ App.API.GetTranslation("clearlogfolder"),
MessageBoxButton.YesNo
);
@@ -121,7 +120,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
}
[RelayCommand]
- private Task UpdateApp() => _updater.UpdateAppAsync(false);
+ private Task UpdateAppAsync() => _updater.UpdateAppAsync(false);
private void ClearLogFolder()
{
From 482fdc939f9fd01dfdd4b75f485e30768c43e63d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 1 Apr 2025 20:12:27 +0800
Subject: [PATCH 0524/1442] Add clean cache option
---
Flow.Launcher/Languages/en.xaml | 2 +
.../ViewModels/SettingsPaneAboutViewModel.cs | 49 ++++++++++++++++++-
.../SettingPages/Views/SettingsPaneAbout.xaml | 4 ++
3 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 2df430c3b..6963d81c9 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -325,6 +325,8 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Clear Caches
+ Are you sure you want to delete all caches?WizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 07e9fba1e..47cb1b6c3 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -27,6 +27,15 @@ public partial class SettingsPaneAboutViewModel : BaseModel
}
}
+ public string CacheFolderSize
+ {
+ get
+ {
+ var size = GetCacheFiles().Sum(file => file.Length);
+ return $"{App.API.GetTranslation("clearcachefolder")} ({BytesToReadableString(size)})";
+ }
+ }
+
public string Website => Constant.Website;
public string SponsorPage => Constant.SponsorPage;
public string ReleaseNotes => _updater.GitHubRepository + "/releases/latest";
@@ -98,6 +107,21 @@ public partial class SettingsPaneAboutViewModel : BaseModel
}
}
+ [RelayCommand]
+ private void AskClearCacheFolderConfirmation()
+ {
+ var confirmResult = App.API.ShowMsgBox(
+ App.API.GetTranslation("clearcachefolderMessage"),
+ App.API.GetTranslation("clearcachefolder"),
+ MessageBoxButton.YesNo
+ );
+
+ if (confirmResult == MessageBoxResult.Yes)
+ {
+ ClearCacheFolder();
+ }
+ }
+
[RelayCommand]
private void OpenSettingsFolder()
{
@@ -112,7 +136,6 @@ public partial class SettingsPaneAboutViewModel : BaseModel
App.API.OpenDirectory(parentFolderPath);
}
-
[RelayCommand]
private void OpenLogsFolder()
{
@@ -147,6 +170,30 @@ public partial class SettingsPaneAboutViewModel : BaseModel
return GetLogDir(version).EnumerateFiles("*", SearchOption.AllDirectories).ToList();
}
+ private void ClearCacheFolder()
+ {
+ var cacheDirectory = GetCacheDir();
+ var cacheFiles = GetCacheFiles();
+
+ cacheFiles.ForEach(f => f.Delete());
+
+ cacheDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
+ .ToList()
+ .ForEach(dir => dir.Delete(true));
+
+ OnPropertyChanged(nameof(CacheFolderSize));
+ }
+
+ private static DirectoryInfo GetCacheDir()
+ {
+ return new DirectoryInfo(DataLocation.CacheDirectory);
+ }
+
+ private static List GetCacheFiles()
+ {
+ return GetCacheDir().EnumerateFiles("*", SearchOption.AllDirectories).ToList();
+ }
+
private static string BytesToReadableString(long bytes)
{
const int scale = 1024;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
index 75c513411..f7deee7cf 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
@@ -90,6 +90,10 @@
Margin="0 12 0 0"
Icon="">
+
Date: Tue, 1 Apr 2025 20:54:36 +0800
Subject: [PATCH 0525/1442] Add exception handler
---
Flow.Launcher/Languages/en.xaml | 1 +
.../ViewModels/SettingsPaneAboutViewModel.cs | 23 +++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 6963d81c9..f96509bde 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -327,6 +327,7 @@
Are you sure you want to delete all logs?Clear CachesAre you sure you want to delete all caches?
+ Failed to clear folders and filesWizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 47cb1b6c3..1cd90e613 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -103,7 +103,15 @@ public partial class SettingsPaneAboutViewModel : BaseModel
if (confirmResult == MessageBoxResult.Yes)
{
- ClearLogFolder();
+ try
+ {
+ ClearLogFolder();
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(nameof(SettingsPaneAboutViewModel), "Failed to clear log folder", e);
+ App.API.ShowMsgBox(App.API.GetTranslation("clearfolderfailMessage"));
+ }
}
}
@@ -118,7 +126,15 @@ public partial class SettingsPaneAboutViewModel : BaseModel
if (confirmResult == MessageBoxResult.Yes)
{
- ClearCacheFolder();
+ try
+ {
+ ClearCacheFolder();
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(nameof(SettingsPaneAboutViewModel), "Failed to clear cache folder", e);
+ App.API.ShowMsgBox(App.API.GetTranslation("clearfolderfailMessage"));
+ }
}
}
@@ -202,8 +218,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
foreach (string order in orders)
{
- if (bytes > max)
- return $"{decimal.Divide(bytes, max):##.##} {order}";
+ if (bytes > max) return $"{decimal.Divide(bytes, max):##.##} {order}";
max /= scale;
}
From 84510854aeb7b2d365780a31dfc3ab83047e8b20 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 10:11:16 +0800
Subject: [PATCH 0526/1442] Improve exception handler
---
Flow.Launcher/Languages/en.xaml | 2 +-
.../ViewModels/SettingsPaneAboutViewModel.cs | 79 ++++++++++++++-----
2 files changed, 62 insertions(+), 19 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index f96509bde..24ab3cf94 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -327,7 +327,7 @@
Are you sure you want to delete all logs?Clear CachesAre you sure you want to delete all caches?
- Failed to clear folders and files
+ Failed to clear part of folders and files. Please see log file for more informationWizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 1cd90e613..e0530bb83 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -15,6 +15,8 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneAboutViewModel : BaseModel
{
+ private static readonly string ClassName = nameof(SettingsPaneAboutViewModel);
+
private readonly Settings _settings;
private readonly Updater _updater;
@@ -103,13 +105,8 @@ public partial class SettingsPaneAboutViewModel : BaseModel
if (confirmResult == MessageBoxResult.Yes)
{
- try
+ if (!ClearLogFolder())
{
- ClearLogFolder();
- }
- catch (Exception e)
- {
- App.API.LogException(nameof(SettingsPaneAboutViewModel), "Failed to clear log folder", e);
App.API.ShowMsgBox(App.API.GetTranslation("clearfolderfailMessage"));
}
}
@@ -126,13 +123,8 @@ public partial class SettingsPaneAboutViewModel : BaseModel
if (confirmResult == MessageBoxResult.Yes)
{
- try
+ if (!ClearCacheFolder())
{
- ClearCacheFolder();
- }
- catch (Exception e)
- {
- App.API.LogException(nameof(SettingsPaneAboutViewModel), "Failed to clear cache folder", e);
App.API.ShowMsgBox(App.API.GetTranslation("clearfolderfailMessage"));
}
}
@@ -161,19 +153,45 @@ public partial class SettingsPaneAboutViewModel : BaseModel
[RelayCommand]
private Task UpdateAppAsync() => _updater.UpdateAppAsync(false);
- private void ClearLogFolder()
+ private bool ClearLogFolder()
{
+ var success = true;
var logDirectory = GetLogDir();
var logFiles = GetLogFiles();
- logFiles.ForEach(f => f.Delete());
+ logFiles.ForEach(f =>
+ {
+ try
+ {
+ f.Delete();
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete log file: {f.Name}", e);
+ success = false;
+ }
+ });
logDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
+ // Do not clean log files of current version
.Where(dir => !Constant.Version.Equals(dir.Name))
.ToList()
- .ForEach(dir => dir.Delete());
+ .ForEach(dir =>
+ {
+ try
+ {
+ dir.Delete();
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete log directory: {dir.Name}", e);
+ success = false;
+ }
+ });
OnPropertyChanged(nameof(LogFolderSize));
+
+ return success;
}
private static DirectoryInfo GetLogDir(string version = "")
@@ -186,18 +204,43 @@ public partial class SettingsPaneAboutViewModel : BaseModel
return GetLogDir(version).EnumerateFiles("*", SearchOption.AllDirectories).ToList();
}
- private void ClearCacheFolder()
+ private bool ClearCacheFolder()
{
+ var success = true;
var cacheDirectory = GetCacheDir();
var cacheFiles = GetCacheFiles();
- cacheFiles.ForEach(f => f.Delete());
+ cacheFiles.ForEach(f =>
+ {
+ try
+ {
+ f.Delete();
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete cache file: {f.Name}", e);
+ success = false;
+ }
+ });
cacheDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
.ToList()
- .ForEach(dir => dir.Delete(true));
+ .ForEach(dir =>
+ {
+ try
+ {
+ dir.Delete(true);
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete cache directory: {dir.Name}", e);
+ success = false;
+ }
+ });
OnPropertyChanged(nameof(CacheFolderSize));
+
+ return success;
}
private static DirectoryInfo GetCacheDir()
From 7fc453330f08f33c8a87bbdc5cc5d1f7c38b2484 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 10:12:59 +0800
Subject: [PATCH 0527/1442] Recrusive delete log folders
---
.../SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index e0530bb83..6cfb98306 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -180,7 +180,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
{
try
{
- dir.Delete();
+ dir.Delete(true);
}
catch (Exception e)
{
From 53c12327c0bcce76b770273c6a95f2c15ed0d27b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 11:51:34 +0800
Subject: [PATCH 0528/1442] Revert changes
---
Flow.Launcher.Infrastructure/Logger/Log.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs
index 84331ef70..807d631c7 100644
--- a/Flow.Launcher.Infrastructure/Logger/Log.cs
+++ b/Flow.Launcher.Infrastructure/Logger/Log.cs
@@ -135,14 +135,12 @@ namespace Flow.Launcher.Infrastructure.Logger
return className;
}
-#if !DEBUG
private static void ExceptionInternal(string classAndMethod, string message, System.Exception e)
{
var logger = LogManager.GetLogger(classAndMethod);
logger.Error(e, message);
}
-#endif
private static void LogInternal(string message, LogLevel level)
{
From 5165ce8f2a5d11f3b81f3feb37887e03f4c6677f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:22:36 +0800
Subject: [PATCH 0529/1442] Add LoadImageAsync api function
---
.../Image/ImageLoader.cs | 14 ++++++++------
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 16 ++++++++++++++++
Flow.Launcher/PublicAPIInstance.cs | 4 ++++
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 6f7b1cd90..4bd4c29c8 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -277,7 +277,7 @@ namespace Flow.Launcher.Infrastructure.Image
return ImageCache.TryGetValue(path, loadFullImage, out image);
}
- public static async ValueTask LoadAsync(string path, bool loadFullImage = false)
+ public static async ValueTask LoadAsync(string path, bool loadFullImage = false, bool cacheImage = true)
{
var imageResult = await LoadInternalAsync(path, loadFullImage);
@@ -293,16 +293,18 @@ namespace Flow.Launcher.Infrastructure.Image
// image already exists
img = ImageCache[key, loadFullImage] ?? img;
}
- else
+ else if (cacheImage)
{
- // new guid
-
+ // save guid key
GuidToKey[hash] = path;
}
}
- // update cache
- ImageCache[path, loadFullImage] = img;
+ if (cacheImage)
+ {
+ // update cache
+ ImageCache[path, loadFullImage] = img;
+ }
}
return img;
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f178ebb90..fb80ede83 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Media;
namespace Flow.Launcher.Plugin
{
@@ -344,5 +345,20 @@ namespace Flow.Launcher.Plugin
/// Stop the loading bar in main window
///
public void StopLoadingBar();
+
+ ///
+ /// Load image from path. Support local, remote and data:image url.
+ /// If image path is missing, it will retun a missing icon.
+ ///
+ /// The path of the image.
+ ///
+ /// Load full image or not.
+ ///
+ ///
+ /// Cache the image or not. Cached image will be stored in FL cache.
+ /// If the image is just used one time, it's better to set this to false.
+ ///
+ ///
+ ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true);
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index e19ad2fdc..d12c6ac3e 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -10,6 +10,7 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Squirrel;
using Flow.Launcher.Core;
@@ -342,6 +343,9 @@ namespace Flow.Launcher
public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
+ public ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true) =>
+ ImageLoader.LoadAsync(path, loadFullImage, cacheImage);
+
#endregion
#region Private Methods
From f76110856fdc1c104d3dc1c5a888073b1ac3f413 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:25:06 +0800
Subject: [PATCH 0530/1442] Use api function in main project
---
Flow.Launcher/MessageBoxEx.xaml.cs | 2 +-
Flow.Launcher/Msg.xaml.cs | 6 +++---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +-
Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/MessageBoxEx.xaml.cs b/Flow.Launcher/MessageBoxEx.xaml.cs
index e9b434fd9..3d94769d0 100644
--- a/Flow.Launcher/MessageBoxEx.xaml.cs
+++ b/Flow.Launcher/MessageBoxEx.xaml.cs
@@ -156,7 +156,7 @@ namespace Flow.Launcher
private async Task SetImageAsync(string imageName)
{
var imagePath = Path.Combine(Constant.ProgramDirectory, "Images", imageName);
- var imageSource = await ImageLoader.LoadAsync(imagePath);
+ var imageSource = await App.API.LoadImageAsync(imagePath);
Img.Source = imageSource;
}
diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs
index 94184ff63..ff9accd62 100644
--- a/Flow.Launcher/Msg.xaml.cs
+++ b/Flow.Launcher/Msg.xaml.cs
@@ -43,7 +43,7 @@ namespace Flow.Launcher
private async System.Threading.Tasks.Task LoadImageAsync()
{
- imgClose.Source = await ImageLoader.LoadAsync(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png"));
+ imgClose.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\close.png"));
}
void imgClose_MouseUp(object sender, MouseButtonEventArgs e)
@@ -71,11 +71,11 @@ namespace Flow.Launcher
if (!File.Exists(iconPath))
{
- imgIco.Source = await ImageLoader.LoadAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
+ imgIco.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
}
else
{
- imgIco.Source = await ImageLoader.LoadAsync(iconPath);
+ imgIco.Source = await App.API.LoadImageAsync(iconPath);
}
Show();
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 17e4b55b7..bfa5bd504 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1168,7 +1168,7 @@ namespace Flow.Launcher.ViewModel
else if (plugins.Count == 1)
{
PluginIconPath = plugins.Single().Metadata.IcoPath;
- PluginIconSource = await ImageLoader.LoadAsync(PluginIconPath);
+ PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
SearchIconVisibility = Visibility.Hidden;
}
else
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index e91badb38..93a595de4 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -45,7 +45,7 @@ namespace Flow.Launcher.ViewModel
private async Task LoadIconAsync()
{
- Image = await ImageLoader.LoadAsync(PluginPair.Metadata.IcoPath);
+ Image = await App.API.LoadImageAsync(PluginPair.Metadata.IcoPath);
OnPropertyChanged(nameof(Image));
}
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index db124e078..9aab71a32 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -199,7 +199,7 @@ namespace Flow.Launcher.ViewModel
}
}
- return await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
+ return await App.API.LoadImageAsync(imagePath, loadFullImage).ConfigureAwait(false);
}
private async Task LoadImageAsync()
From 4572068e768921e0834c53f6f4192c71ae762c04 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:25:28 +0800
Subject: [PATCH 0531/1442] Use api functions in plugin projects
---
.../Views/PreviewPanel.xaml.cs | 3 +--
.../SearchSourceViewModel.cs | 9 ++++-----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
index 878832e4f..aaf1efdc1 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs
@@ -7,7 +7,6 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Plugin.Explorer.Search;
namespace Flow.Launcher.Plugin.Explorer.Views;
@@ -89,7 +88,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
private async Task LoadImageAsync()
{
- PreviewImage = await ImageLoader.LoadAsync(FilePath, true).ConfigureAwait(false);
+ PreviewImage = await Main.Context.API.LoadImageAsync(FilePath, true).ConfigureAwait(false);
}
public event PropertyChangedEventHandler? PropertyChanged;
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs
index 9c5e81cb5..6554edd83 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs
@@ -1,5 +1,4 @@
-using Flow.Launcher.Infrastructure.Image;
-using System;
+using System;
using System.IO;
using System.Threading.Tasks;
#pragma warning disable IDE0005
@@ -41,8 +40,8 @@ namespace Flow.Launcher.Plugin.WebSearch
#if DEBUG
throw;
#else
- Main._context.API.ShowMsgBox(string.Format("Copying the selected image file to {0} has failed, changes will now be reverted", destinationFileNameFullPath));
- UpdateIconAttributes(selectedSearchSource, fullPathToOriginalImage);
+ Main._context.API.ShowMsgBox(string.Format("Copying the selected image file to {0} has failed, changes will now be reverted", destinationFileNameFullPath));
+ UpdateIconAttributes(selectedSearchSource, fullPathToOriginalImage);
#endif
}
}
@@ -61,7 +60,7 @@ namespace Flow.Launcher.Plugin.WebSearch
internal async ValueTask LoadPreviewIconAsync(string pathToPreviewIconImage)
{
- return await ImageLoader.LoadAsync(pathToPreviewIconImage);
+ return await Main._context.API.LoadImageAsync(pathToPreviewIconImage);
}
}
}
From 3de8005297fcba6e517ea674e3b2dc1129aea8e8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:26:22 +0800
Subject: [PATCH 0532/1442] Improve WebSearch project code quality
---
.../SuggestionSources/Baidu.cs | 8 +++-----
.../SuggestionSources/Bing.cs | 16 +++++-----------
.../SuggestionSources/DuckDuckGo.cs | 8 +++-----
.../SuggestionSources/Google.cs | 8 +++-----
4 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
index 51f81b718..590666af7 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
@@ -4,8 +4,6 @@ using System.Linq;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
using System.Net.Http;
using System.Threading;
@@ -22,11 +20,11 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
try
{
const string api = "http://suggestion.baidu.com/su?json=1&wd=";
- result = await Http.GetAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false);
+ result = await Main._context.API.HttpGetStringAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false);
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from baidu", e);
return null;
}
@@ -41,7 +39,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (JsonException e)
{
- Log.Exception("|Baidu.Suggestions|can't parse suggestions", e);
+ Main._context.API.LogException(nameof(Baidu), "Can't parse suggestions", e);
return new List();
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
index 640674243..938f7d387 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
@@ -1,6 +1,4 @@
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
-using System;
+using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
@@ -10,16 +8,15 @@ using System.Threading;
namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
- class Bing : SuggestionSource
+ public class Bing : SuggestionSource
{
public override async Task> SuggestionsAsync(string query, CancellationToken token)
{
-
try
{
const string api = "https://api.bing.com/qsonhs.aspx?q=";
- await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false);
+ await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token).ConfigureAwait(false);
using var json = (await JsonDocument.ParseAsync(resultStream, cancellationToken: token));
var root = json.RootElement.GetProperty("AS");
@@ -33,18 +30,15 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
.EnumerateArray()
.Select(s => s.GetProperty("Txt").GetString()))
.ToList();
-
-
-
}
catch (Exception e) when (e is HttpRequestException or { InnerException: TimeoutException })
{
- Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Bing), "Can't get suggestion from baidu", e);
return null;
}
catch (JsonException e)
{
- Log.Exception("|Bing.Suggestions|can't parse suggestions", e);
+ Main._context.API.LogException(nameof(Bing), "Can't parse suggestions", e);
return new List();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
index 8fafb44cc..1d248caf3 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
using System.Net.Http;
using System.Threading;
using System.Text.Json;
@@ -25,7 +23,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
const string api = "https://duckduckgo.com/ac/?type=list&q=";
- await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false);
+ await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false);
using var json = await JsonDocument.ParseAsync(resultStream, cancellationToken: token);
@@ -36,12 +34,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Log.Exception("|DuckDuckGo.Suggestions|Can't get suggestion from DuckDuckGo", e);
+ Main._context.API.LogException(nameof(DuckDuckGo), "Can't get suggestion from DuckDuckGo", e);
return null;
}
catch (JsonException e)
{
- Log.Exception("|DuckDuckGo.Suggestions|can't parse suggestions", e);
+ Main._context.API.LogException(nameof(DuckDuckGo), "Can't parse suggestions", e);
return new List();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
index 265de4a98..5f2504009 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
using System.Net.Http;
using System.Threading;
using System.Text.Json;
@@ -18,7 +16,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
const string api = "https://www.google.com/complete/search?output=chrome&q=";
- await using var resultStream = await Http.GetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false);
+ await using var resultStream = await Main._context.API.HttpGetStreamAsync(api + Uri.EscapeDataString(query), token: token).ConfigureAwait(false);
using var json = await JsonDocument.ParseAsync(resultStream, cancellationToken: token);
@@ -29,12 +27,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Log.Exception("|Baidu.Suggestions|Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Google), "Can't get suggestion from baidu", e);
return null;
}
catch (JsonException e)
{
- Log.Exception("|Google.Suggestions|can't parse suggestions", e);
+ Main._context.API.LogException(nameof(Google), "Can't parse suggestions", e);
return new List();
}
}
From f9a01e10025563e069c3caafce85b80e89d60d2f Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:34:04 +0800
Subject: [PATCH 0533/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index fb80ede83..0ee576b2e 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -348,7 +348,7 @@ namespace Flow.Launcher.Plugin
///
/// Load image from path. Support local, remote and data:image url.
- /// If image path is missing, it will retun a missing icon.
+ /// If image path is missing, it will return a missing icon.
///
/// The path of the image.
///
From 15a7e3a5afd8af4a9139935fd376d963963fb66b Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:35:03 +0800
Subject: [PATCH 0534/1442] Fix log typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
index 938f7d387..9efc36263 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
@@ -33,7 +33,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or { InnerException: TimeoutException })
{
- Main._context.API.LogException(nameof(Bing), "Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Bing), "Can't get suggestion from Bing", e);
return null;
}
catch (JsonException e)
From a33ecdbb971869605c4e8c03b5a0a00465040bd4 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:35:27 +0800
Subject: [PATCH 0535/1442] Fix log typos
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
.../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
index 5f2504009..ad8fb508f 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
@@ -27,7 +27,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Main._context.API.LogException(nameof(Google), "Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Google), "Can't get suggestion from Google", e);
return null;
}
catch (JsonException e)
From e6a8fe3523b7c810faebf2b2235e1322884c0696 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 18:36:25 +0800
Subject: [PATCH 0536/1442] Use caption letter
---
.../Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
index 590666af7..65be06b53 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
@@ -24,7 +24,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from baidu", e);
+ Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from Baidu", e);
return null;
}
From b62c19e28b0fd8063dc3004dc21a7c840162d3b7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 19:30:15 +0800
Subject: [PATCH 0537/1442] Move format function position
---
Flow.Launcher.Core/Updater.cs | 13 ++++++++++++-
Flow.Launcher.Infrastructure/Helper.cs | 22 ----------------------
2 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index 9a77ece32..96efcacf6 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -17,6 +17,7 @@ using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using System.Text.Json.Serialization;
using System.Threading;
+using System.Text.Json;
namespace Flow.Launcher.Core
{
@@ -51,7 +52,7 @@ namespace Flow.Launcher.Core
var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString());
var currentVersion = Version.Parse(Constant.Version);
- Log.Info($"|Updater.UpdateApp|Future Release <{newUpdateInfo.FutureReleaseEntry.Formatted()}>");
+ Log.Info($"|Updater.UpdateApp|Future Release <{Formatted(newUpdateInfo.FutureReleaseEntry)}>");
if (newReleaseVersion <= currentVersion)
{
@@ -151,5 +152,15 @@ namespace Flow.Launcher.Core
return tips;
}
+
+ private static string Formatted(T t)
+ {
+ var formatted = JsonSerializer.Serialize(t, new JsonSerializerOptions
+ {
+ WriteIndented = true
+ });
+
+ return formatted;
+ }
}
}
diff --git a/Flow.Launcher.Infrastructure/Helper.cs b/Flow.Launcher.Infrastructure/Helper.cs
index 864d796c7..c393c4016 100644
--- a/Flow.Launcher.Infrastructure/Helper.cs
+++ b/Flow.Launcher.Infrastructure/Helper.cs
@@ -2,18 +2,11 @@
using System;
using System.IO;
-using System.Text.Json;
-using System.Text.Json.Serialization;
namespace Flow.Launcher.Infrastructure
{
public static class Helper
{
- static Helper()
- {
- jsonFormattedSerializerOptions.Converters.Add(new JsonStringEnumConverter());
- }
-
///
/// http://www.yinwang.org/blog-cn/2015/11/21/programming-philosophy
///
@@ -71,20 +64,5 @@ namespace Flow.Launcher.Infrastructure
Directory.CreateDirectory(path);
}
}
-
- private static readonly JsonSerializerOptions jsonFormattedSerializerOptions = new JsonSerializerOptions
- {
- WriteIndented = true
- };
-
- public static string Formatted(this T t)
- {
- var formatted = JsonSerializer.Serialize(t, new JsonSerializerOptions
- {
- WriteIndented = true
- });
-
- return formatted;
- }
}
}
From 44ba60cdfcd58785456c8fcb61a203197005daa5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 20:17:32 +0800
Subject: [PATCH 0538/1442] Move ValidateDirectory functions to FileFolders for
plugin usage
---
Flow.Launcher.Infrastructure/Helper.cs | 36 ---------------
.../Storage/BinaryStorage.cs | 3 +-
.../Storage/FlowLauncherJsonStorage.cs | 5 +-
.../Storage/JsonStorage.cs | 3 +-
.../Storage/PluginJsonStorage.cs | 3 +-
.../SharedCommands/FilesFolders.cs | 46 +++++++++++++++++++
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 4 +-
.../Flow.Launcher.Plugin.WebSearch/Main.cs | 3 +-
8 files changed, 58 insertions(+), 45 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Helper.cs b/Flow.Launcher.Infrastructure/Helper.cs
index c393c4016..b02d84ca7 100644
--- a/Flow.Launcher.Infrastructure/Helper.cs
+++ b/Flow.Launcher.Infrastructure/Helper.cs
@@ -1,7 +1,6 @@
#nullable enable
using System;
-using System.IO;
namespace Flow.Launcher.Infrastructure
{
@@ -29,40 +28,5 @@ namespace Flow.Launcher.Infrastructure
throw new NullReferenceException();
}
}
-
- public static void ValidateDataDirectory(string bundledDataDirectory, string dataDirectory)
- {
- if (!Directory.Exists(dataDirectory))
- {
- Directory.CreateDirectory(dataDirectory);
- }
-
- foreach (var bundledDataPath in Directory.GetFiles(bundledDataDirectory))
- {
- var data = Path.GetFileName(bundledDataPath);
- var dataPath = Path.Combine(dataDirectory, data.NonNull());
- if (!File.Exists(dataPath))
- {
- File.Copy(bundledDataPath, dataPath);
- }
- else
- {
- var time1 = new FileInfo(bundledDataPath).LastWriteTimeUtc;
- var time2 = new FileInfo(dataPath).LastWriteTimeUtc;
- if (time1 != time2)
- {
- File.Copy(bundledDataPath, dataPath, true);
- }
- }
- }
- }
-
- public static void ValidateDirectory(string path)
- {
- if (!Directory.Exists(path))
- {
- Directory.CreateDirectory(path);
- }
- }
}
}
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 5b73faae6..a8d5f5d62 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin.SharedCommands;
using MemoryPack;
namespace Flow.Launcher.Infrastructure.Storage
@@ -21,7 +22,7 @@ namespace Flow.Launcher.Infrastructure.Storage
public BinaryStorage(string filename, string directoryPath = null)
{
directoryPath ??= DataLocation.CacheDirectory;
- Helper.ValidateDirectory(directoryPath);
+ FilesFolders.ValidateDirectory(directoryPath);
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
}
diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
index 865041fb3..3669bb405 100644
--- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
@@ -1,5 +1,6 @@
using System.IO;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
@@ -8,10 +9,10 @@ namespace Flow.Launcher.Infrastructure.Storage
public FlowLauncherJsonStorage()
{
var directoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
- Helper.ValidateDirectory(directoryPath);
+ FilesFolders.ValidateDirectory(directoryPath);
var filename = typeof(T).Name;
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
}
}
-}
\ No newline at end of file
+}
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index 40106acd8..a3488124b 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Text.Json;
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
@@ -37,7 +38,7 @@ namespace Flow.Launcher.Infrastructure.Storage
FilePath = filePath;
DirectoryPath = Path.GetDirectoryName(filePath) ?? throw new ArgumentException("Invalid file path");
- Helper.ValidateDirectory(DirectoryPath);
+ FilesFolders.ValidateDirectory(DirectoryPath);
}
public async Task LoadAsync()
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index b377c81aa..cc78bb8f6 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -1,5 +1,6 @@
using System.IO;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
@@ -14,7 +15,7 @@ namespace Flow.Launcher.Infrastructure.Storage
var dataType = typeof(T);
AssemblyName = dataType.Assembly.GetName().Name;
DirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, AssemblyName);
- Helper.ValidateDirectory(DirectoryPath);
+ FilesFolders.ValidateDirectory(DirectoryPath);
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
}
diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
index 5f003e351..1de5841a5 100644
--- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
+++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
@@ -318,5 +318,51 @@ namespace Flow.Launcher.Plugin.SharedCommands
{
return path.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar;
}
+
+ ///
+ /// Validates a directory, creating it if it doesn't exist
+ ///
+ ///
+ public static void ValidateDirectory(string path)
+ {
+ if (!Directory.Exists(path))
+ {
+ Directory.CreateDirectory(path);
+ }
+ }
+
+ ///
+ /// Validates a data directory, synchronizing it by ensuring all files from a bundled source directory exist in it.
+ /// If files are missing or outdated, they are copied from the bundled directory to the data directory.
+ ///
+ ///
+ ///
+ public static void ValidateDataDirectory(string bundledDataDirectory, string dataDirectory)
+ {
+ if (!Directory.Exists(dataDirectory))
+ {
+ Directory.CreateDirectory(dataDirectory);
+ }
+
+ foreach (var bundledDataPath in Directory.GetFiles(bundledDataDirectory))
+ {
+ var data = Path.GetFileName(bundledDataPath);
+ if (data == null) continue;
+ var dataPath = Path.Combine(dataDirectory, data);
+ if (!File.Exists(dataPath))
+ {
+ File.Copy(bundledDataPath, dataPath);
+ }
+ else
+ {
+ var time1 = new FileInfo(bundledDataPath).LastWriteTimeUtc;
+ var time2 = new FileInfo(dataPath).LastWriteTimeUtc;
+ if (time1 != time2)
+ {
+ File.Copy(bundledDataPath, dataPath, true);
+ }
+ }
+ }
+ }
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 3be23214c..73b4ae9e6 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -6,13 +6,13 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.Program.Programs;
using Flow.Launcher.Plugin.Program.Views;
using Flow.Launcher.Plugin.Program.Views.Models;
+using Flow.Launcher.Plugin.SharedCommands;
using Microsoft.Extensions.Caching.Memory;
using Path = System.IO.Path;
using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
@@ -191,7 +191,7 @@ namespace Flow.Launcher.Plugin.Program
await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
{
- Helper.ValidateDirectory(Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
+ FilesFolders.ValidateDirectory(Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
static void MoveFile(string sourcePath, string destinationPath)
{
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
index 7ad9715bb..76aeb3250 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Plugin.WebSearch
@@ -180,7 +179,7 @@ namespace Flow.Launcher.Plugin.WebSearch
// Default images directory is in the WebSearch's application folder
DefaultImagesDirectory = Path.Combine(pluginDirectory, Images);
- Helper.ValidateDataDirectory(bundledImagesDirectory, DefaultImagesDirectory);
+ FilesFolders.ValidateDataDirectory(bundledImagesDirectory, DefaultImagesDirectory);
// Custom images directory is in the WebSearch's data location folder
CustomImagesDirectory = Path.Combine(_context.CurrentPluginMetadata.PluginSettingsDirectoryPath, "CustomIcons");
From 0430eea2fd14f208be42d560716319bde2a0362f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 22:25:55 +0800
Subject: [PATCH 0539/1442] Use api functions instead of project reference for
code quality
---
.../Commands/BookmarkLoader.cs | 5 ++--
.../FirefoxBookmarkLoader.cs | 23 ++++++++++---------
...low.Launcher.Plugin.BrowserBookmark.csproj | 1 -
.../Main.cs | 15 ++----------
4 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs
index 3468015eb..758ce68ae 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Flow.Launcher.Plugin.SharedModels;
@@ -10,11 +9,11 @@ internal static class BookmarkLoader
{
internal static MatchResult MatchProgram(Bookmark bookmark, string queryString)
{
- var match = StringMatcher.FuzzySearch(queryString, bookmark.Name);
+ var match = Main._context.API.FuzzySearch(queryString, bookmark.Name);
if (match.IsSearchPrecisionScoreMet())
return match;
- return StringMatcher.FuzzySearch(queryString, bookmark.Url);
+ return Main._context.API.FuzzySearch(queryString, bookmark.Url);
}
internal static List LoadAllBookmarks(Settings setting)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
index 3b37bbaed..0e02b2c9e 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
@@ -1,15 +1,16 @@
-using Flow.Launcher.Plugin.BrowserBookmark.Models;
-using Microsoft.Data.Sqlite;
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Plugin.BrowserBookmark.Models;
+using Microsoft.Data.Sqlite;
namespace Flow.Launcher.Plugin.BrowserBookmark;
public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
{
+ private static readonly string ClassName = nameof(FirefoxBookmarkLoaderBase);
+
private readonly string _faviconCacheDir;
protected FirefoxBookmarkLoaderBase()
@@ -52,7 +53,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to register Firefox bookmark file monitoring: {placesPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to register Firefox bookmark file monitoring: {placesPath}", ex);
}
// Use a copy to avoid lock issues with the original file
@@ -93,12 +94,12 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{
- Log.Exception($"Failed to load Firefox bookmarks: {placesPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to load Firefox bookmarks: {placesPath}", ex);
}
return bookmarks;
@@ -177,7 +178,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to extract Firefox favicon: {bookmark.Url}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to extract Firefox favicon: {bookmark.Url}", ex);
}
}
@@ -192,12 +193,12 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{
- Log.Exception($"Failed to load Firefox favicon DB: {faviconDbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to load Firefox favicon DB: {faviconDbPath}", ex);
}
}
@@ -218,7 +219,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to save image: {outputPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to save image: {outputPath}", ex);
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
index b4e42fbcd..d09b9e750 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
@@ -81,7 +81,6 @@
-
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index ce7f56c34..5ab868ab9 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.BrowserBookmark.Commands;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Flow.Launcher.Plugin.BrowserBookmark.Views;
@@ -15,7 +14,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark;
public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContextMenu, IDisposable
{
- private static PluginInitContext _context;
+ internal static PluginInitContext _context;
private static List _cachedBookmarks = new();
@@ -23,16 +22,6 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
private static bool _initialized = false;
- public static PluginInitContext GetContext()
- {
- return _context;
- }
-
- public static string GetPluginDirectory()
- {
- return _context?.CurrentPluginMetadata?.PluginDirectory;
- }
-
public void Init(PluginInitContext context)
{
_context = context;
@@ -223,7 +212,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
catch (Exception e)
{
var message = "Failed to set url in clipboard";
- Log.Exception("Main", message, e, "LoadContextMenus");
+ _context.API.LogException(nameof(Main), message, e);
_context.API.ShowMsg(message);
From 168f898baf15950ed79fe2e2a26c96a4bd4e89aa Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 22:27:45 +0800
Subject: [PATCH 0540/1442] Cleanup namespaces
---
.../Views/SettingsControl.xaml.cs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
index 8584a3eb0..3182adfed 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs
@@ -3,13 +3,6 @@ using Flow.Launcher.Plugin.BrowserBookmark.Models;
using System.Windows.Input;
using System.ComponentModel;
using System.Threading.Tasks;
-using System;
-using System.IO;
-using System.Windows;
-using System.Windows.Input;
-using System.ComponentModel;
-using System.Threading.Tasks;
-using Flow.Launcher.Plugin.BrowserBookmark.Models;
namespace Flow.Launcher.Plugin.BrowserBookmark.Views;
@@ -23,6 +16,7 @@ public partial class SettingsControl : INotifyPropertyChanged
Settings = settings;
InitializeComponent();
}
+
public bool LoadChromeBookmark
{
get => Settings.LoadChromeBookmark;
@@ -62,6 +56,7 @@ public partial class SettingsControl : INotifyPropertyChanged
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow)));
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
private void NewCustomBrowser(object sender, RoutedEventArgs e)
From b564a39aae1990610a09ccd54531cae9c82e07e4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 22:31:31 +0800
Subject: [PATCH 0541/1442] Use api functions instead of project reference for
code quality
---
.../ChromiumBookmarkLoader.cs | 22 ++++++++++---------
...low.Launcher.Plugin.BrowserBookmark.csproj | 3 ++-
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
index d9c4e91d0..39bbb73ff 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
@@ -1,15 +1,17 @@
-using Flow.Launcher.Plugin.BrowserBookmark.Models;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using System.Text.Json;
-using Flow.Launcher.Infrastructure.Logger;
using System;
+using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Microsoft.Data.Sqlite;
namespace Flow.Launcher.Plugin.BrowserBookmark;
public abstract class ChromiumBookmarkLoader : IBookmarkLoader
{
+ private readonly static string ClassName = nameof(ChromiumBookmarkLoader);
+
private readonly string _faviconCacheDir;
protected ChromiumBookmarkLoader()
@@ -44,7 +46,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to register bookmark file monitoring: {bookmarkPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to register bookmark file monitoring: {bookmarkPath}", ex);
}
var source = name + (Path.GetFileName(profile) == "Default" ? "" : $" ({Path.GetFileName(profile)})");
@@ -136,7 +138,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to copy favicon DB: {dbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
return;
}
@@ -189,7 +191,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to extract bookmark favicon: {bookmark.Url}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to extract bookmark favicon: {bookmark.Url}", ex);
}
}
@@ -199,7 +201,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to connect to SQLite: {tempDbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to connect to SQLite: {tempDbPath}", ex);
}
// Delete temporary file
@@ -209,12 +211,12 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{
- Log.Exception($"Failed to load favicon DB: {dbPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to load favicon DB: {dbPath}", ex);
}
}
@@ -226,7 +228,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- Log.Exception($"Failed to save image: {outputPath}", ex);
+ Main._context.API.LogException(ClassName, $"Failed to save image: {outputPath}", ex);
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
index d09b9e750..49ae26564 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
@@ -1,4 +1,4 @@
-
+Library
@@ -81,6 +81,7 @@
+
From a845e68c98f4ed3c350bd291dc0a5847bc4f4a8c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 2 Apr 2025 22:39:30 +0800
Subject: [PATCH 0542/1442] Use plugin cache directory
---
.../ChromiumBookmarkLoader.cs | 7 ++-----
.../FirefoxBookmarkLoader.cs | 5 +----
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 9 +++++++++
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
index 39bbb73ff..282876472 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
@@ -10,16 +10,13 @@ namespace Flow.Launcher.Plugin.BrowserBookmark;
public abstract class ChromiumBookmarkLoader : IBookmarkLoader
{
- private readonly static string ClassName = nameof(ChromiumBookmarkLoader);
+ private static readonly string ClassName = nameof(ChromiumBookmarkLoader);
private readonly string _faviconCacheDir;
protected ChromiumBookmarkLoader()
{
- _faviconCacheDir = Path.Combine(
- Path.GetDirectoryName(typeof(ChromiumBookmarkLoader).Assembly.Location),
- "FaviconCache");
- Directory.CreateDirectory(_faviconCacheDir);
+ _faviconCacheDir = Main._faviconCacheDir;
}
public abstract List GetBookmarks();
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
index 0e02b2c9e..d2f973329 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
@@ -15,10 +15,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
protected FirefoxBookmarkLoaderBase()
{
- _faviconCacheDir = Path.Combine(
- Path.GetDirectoryName(typeof(FirefoxBookmarkLoaderBase).Assembly.Location),
- "FaviconCache");
- Directory.CreateDirectory(_faviconCacheDir);
+ _faviconCacheDir = Main._faviconCacheDir;
}
public abstract List GetBookmarks();
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index 5ab868ab9..5dec8b953 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
+using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.BrowserBookmark.Commands;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Flow.Launcher.Plugin.BrowserBookmark.Views;
@@ -14,6 +15,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark;
public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContextMenu, IDisposable
{
+ internal static string _faviconCacheDir;
+
internal static PluginInitContext _context;
private static List _cachedBookmarks = new();
@@ -28,6 +31,12 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
_settings = context.API.LoadSettingJsonStorage();
+ _faviconCacheDir = Path.Combine(
+ _context.CurrentPluginMetadata.PluginCacheDirectoryPath,
+ "FaviconCache");
+
+ Helper.ValidateDirectory(_faviconCacheDir);
+
LoadBookmarksIfEnabled();
}
From 5d16216a5519a42c6f201219ddca60ef24289308 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 21:53:09 +0800
Subject: [PATCH 0543/1442] Fix environment exit
---
Flow.Launcher.Core/Configuration/Portable.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs
index 069154364..4f8287c16 100644
--- a/Flow.Launcher.Core/Configuration/Portable.cs
+++ b/Flow.Launcher.Core/Configuration/Portable.cs
@@ -169,7 +169,7 @@ namespace Flow.Launcher.Core.Configuration
{
FilesFolders.OpenPath(Constant.RootDirectory, (s) => API.ShowMsgBox(s));
- Environment.Exit(0);
+ Application.Current.Shutdown();
}
}
// Otherwise, if the portable data folder is marked for deletion,
From 96f10d27997f13e24866a415c346ba947e515f98 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 22:13:12 +0800
Subject: [PATCH 0544/1442] Code quality
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 11 +++++++++++
Flow.Launcher/Notification.cs | 5 ++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 7a3a0c36e..42461dc18 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -488,5 +488,16 @@ namespace Flow.Launcher.Infrastructure
}
#endregion
+
+ #region Noticification
+
+ public static bool IsNotificationSupport()
+ {
+ // Noticification only supported Windows 10 19041+
+ return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
+ Environment.OSVersion.Version.Build >= 19041;
+ }
+
+ #endregion
}
}
diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs
index cb1cbb729..23125de15 100644
--- a/Flow.Launcher/Notification.cs
+++ b/Flow.Launcher/Notification.cs
@@ -9,8 +9,8 @@ namespace Flow.Launcher
{
internal static class Notification
{
- internal static bool legacy = Environment.OSVersion.Version.Build < 19041;
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "")]
+ internal static bool legacy = !Win32Helper.IsNotificationSupport();
+
internal static void Uninstall()
{
if (!legacy)
@@ -25,7 +25,6 @@ namespace Flow.Launcher
});
}
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "")]
private static void ShowInternal(string title, string subTitle, string iconPath = null)
{
// Handle notification for win7/8/early win10
From b1721f15077c264a79df2642e12a5fd1c1b369fe Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 22:25:04 +0800
Subject: [PATCH 0545/1442] Code quality
---
Flow.Launcher.Core/Updater.cs | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index 9a77ece32..5b2144efe 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -4,10 +4,11 @@ using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Linq;
+using System.Text.Json.Serialization;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
-using JetBrains.Annotations;
-using Squirrel;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Infrastructure;
@@ -15,8 +16,8 @@ using Flow.Launcher.Infrastructure.Http;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
-using System.Text.Json.Serialization;
-using System.Threading;
+using JetBrains.Annotations;
+using Squirrel;
namespace Flow.Launcher.Core
{
@@ -70,7 +71,7 @@ namespace Flow.Launcher.Core
if (DataLocation.PortableDataLocationInUse())
{
- var targetDestination = updateManager.RootAppDirectory + $"\\app-{newReleaseVersion.ToString()}\\{DataLocation.PortableFolderName}";
+ var targetDestination = updateManager.RootAppDirectory + $"\\app-{newReleaseVersion}\\{DataLocation.PortableFolderName}";
FilesFolders.CopyAll(DataLocation.PortableDataPath, targetDestination, (s) => _api.ShowMsgBox(s));
if (!FilesFolders.VerifyBothFolderFilesEqual(DataLocation.PortableDataPath, targetDestination, (s) => _api.ShowMsgBox(s)))
_api.ShowMsgBox(string.Format(_api.GetTranslation("update_flowlauncher_fail_moving_portable_user_profile_data"),
@@ -122,7 +123,7 @@ namespace Flow.Launcher.Core
}
// https://github.com/Squirrel/Squirrel.Windows/blob/master/src/Squirrel/UpdateManager.Factory.cs
- private async Task GitHubUpdateManagerAsync(string repository)
+ private static async Task GitHubUpdateManagerAsync(string repository)
{
var uri = new Uri(repository);
var api = $"https://api.github.com/repos{uri.AbsolutePath}/releases";
@@ -144,9 +145,9 @@ namespace Flow.Launcher.Core
return manager;
}
- public string NewVersionTips(string version)
+ private static string NewVersionTips(string version)
{
- var translator = InternationalizationManager.Instance;
+ var translator = Ioc.Default.GetRequiredService();
var tips = string.Format(translator.GetTranslation("newVersionTips"), version);
return tips;
From 0def881b9d74497974124c35327cfa10b6bc35fa Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 22:27:02 +0800
Subject: [PATCH 0546/1442] Code quality
---
Flow.Launcher.Core/Configuration/Portable.cs | 40 ++++++++------------
1 file changed, 15 insertions(+), 25 deletions(-)
diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs
index 4f8287c16..8abdae8d8 100644
--- a/Flow.Launcher.Core/Configuration/Portable.cs
+++ b/Flow.Launcher.Core/Configuration/Portable.cs
@@ -22,7 +22,7 @@ namespace Flow.Launcher.Core.Configuration
/// As at Squirrel.Windows version 1.5.2, UpdateManager needs to be disposed after finish
///
///
- private UpdateManager NewUpdateManager()
+ private static UpdateManager NewUpdateManager()
{
var applicationFolderName = Constant.ApplicationDirectory
.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.None)
@@ -81,20 +81,16 @@ namespace Flow.Launcher.Core.Configuration
public void RemoveShortcuts()
{
- using (var portabilityUpdater = NewUpdateManager())
- {
- portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu);
- portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop);
- portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup);
- }
+ using var portabilityUpdater = NewUpdateManager();
+ portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu);
+ portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop);
+ portabilityUpdater.RemoveShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup);
}
public void RemoveUninstallerEntry()
{
- using (var portabilityUpdater = NewUpdateManager())
- {
- portabilityUpdater.RemoveUninstallerRegistryEntry();
- }
+ using var portabilityUpdater = NewUpdateManager();
+ portabilityUpdater.RemoveUninstallerRegistryEntry();
}
public void MoveUserDataFolder(string fromLocation, string toLocation)
@@ -110,12 +106,10 @@ namespace Flow.Launcher.Core.Configuration
public void CreateShortcuts()
{
- using (var portabilityUpdater = NewUpdateManager())
- {
- portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu, false);
- portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop, false);
- portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup, false);
- }
+ using var portabilityUpdater = NewUpdateManager();
+ portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.StartMenu, false);
+ portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Desktop, false);
+ portabilityUpdater.CreateShortcutsForExecutable(Constant.ApplicationFileName, ShortcutLocation.Startup, false);
}
public void CreateUninstallerEntry()
@@ -129,18 +123,14 @@ namespace Flow.Launcher.Core.Configuration
subKey2.SetValue("DisplayIcon", Path.Combine(Constant.ApplicationDirectory, "app.ico"), RegistryValueKind.String);
}
- using (var portabilityUpdater = NewUpdateManager())
- {
- _ = portabilityUpdater.CreateUninstallerRegistryEntry();
- }
+ using var portabilityUpdater = NewUpdateManager();
+ _ = portabilityUpdater.CreateUninstallerRegistryEntry();
}
- internal void IndicateDeletion(string filePathTodelete)
+ private static void IndicateDeletion(string filePathTodelete)
{
var deleteFilePath = Path.Combine(filePathTodelete, DataLocation.DeletionIndicatorFile);
- using (var _ = File.CreateText(deleteFilePath))
- {
- }
+ using var _ = File.CreateText(deleteFilePath);
}
///
From 2f53a79a26fc84cb012d580a37c9c2bab7eb7965 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 22:56:31 +0800
Subject: [PATCH 0547/1442] Revert "Fix environment exit"
This reverts commit 5d16216a5519a42c6f201219ddca60ef24289308.
---
Flow.Launcher.Core/Configuration/Portable.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs
index 8abdae8d8..2b570d2c0 100644
--- a/Flow.Launcher.Core/Configuration/Portable.cs
+++ b/Flow.Launcher.Core/Configuration/Portable.cs
@@ -159,7 +159,7 @@ namespace Flow.Launcher.Core.Configuration
{
FilesFolders.OpenPath(Constant.RootDirectory, (s) => API.ShowMsgBox(s));
- Application.Current.Shutdown();
+ Environment.Exit(0);
}
}
// Otherwise, if the portable data folder is marked for deletion,
From b725975b9898e249a7382171cf2edb07437871d0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 3 Apr 2025 23:01:16 +0800
Subject: [PATCH 0548/1442] Fix environment exit stuck issue
---
Flow.Launcher/App.xaml.cs | 8 ++++++++
Flow.Launcher/MainWindow.xaml.cs | 13 +++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 9aee56bff..f484d4dba 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -304,6 +304,14 @@ namespace Flow.Launcher
return;
}
+ // If we call Environment.Exit(0), the application dispose will be called before _mainWindow.Close()
+ // Accessing _mainWindow?.Dispatcher will cause the application stuck
+ // So here we need to check it and just return so that we will not acees _mainWindow?.Dispatcher
+ if (!_mainWindow.CanClose)
+ {
+ return;
+ }
+
_disposed = true;
}
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 011d46d6b..c62606743 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -32,6 +32,13 @@ namespace Flow.Launcher
{
public partial class MainWindow : IDisposable
{
+ #region Public Property
+
+ // Window Event: Close Event
+ public bool CanClose { get; set; } = false;
+
+ #endregion
+
#region Private Fields
// Dependency Injection
@@ -45,8 +52,6 @@ namespace Flow.Launcher
private readonly ContextMenu _contextMenu = new();
private readonly MainViewModel _viewModel;
- // Window Event: Close Event
- private bool _canClose = false;
// Window Event: Key Event
private bool _isArrowKeyPressed = false;
@@ -279,7 +284,7 @@ namespace Flow.Launcher
private async void OnClosing(object sender, CancelEventArgs e)
{
- if (!_canClose)
+ if (!CanClose)
{
_notifyIcon.Visible = false;
App.API.SaveAppAllSettings();
@@ -287,7 +292,7 @@ namespace Flow.Launcher
await PluginManager.DisposePluginsAsync();
Notification.Uninstall();
// After plugins are all disposed, we can close the main window
- _canClose = true;
+ CanClose = true;
// Use this instead of Close() to avoid InvalidOperationException when calling Close() in OnClosing event
Application.Current.Shutdown();
}
From 95b38d21af7b8790659d9eb49e2edbbba9a037b1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 09:57:03 +0800
Subject: [PATCH 0549/1442] Wait image cache saved before restarting
---
Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 8 +++++++-
Flow.Launcher/PublicAPIInstance.cs | 7 +++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 6f7b1cd90..0ba059b7b 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -61,7 +61,7 @@ namespace Flow.Launcher.Infrastructure.Image
});
}
- public static async Task Save()
+ public static async Task SaveAsync()
{
await storageLock.WaitAsync();
@@ -77,6 +77,12 @@ namespace Flow.Launcher.Infrastructure.Image
}
}
+ public static async Task WaitSaveAsync()
+ {
+ await storageLock.WaitAsync();
+ storageLock.Release();
+ }
+
private static async Task> LoadStorageToConcurrentDictionaryAsync()
{
await storageLock.WaitAsync();
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index e19ad2fdc..b86e731b3 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -57,7 +57,7 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
- public void RestartApp()
+ public async void RestartApp()
{
_mainVM.Hide();
@@ -66,6 +66,9 @@ namespace Flow.Launcher
// which will cause ungraceful exit
SaveAppAllSettings();
+ // wait for all image caches to be saved
+ await ImageLoader.WaitSaveAsync();
+
// Restart requires Squirrel's Update.exe to be present in the parent folder,
// it is only published from the project's release pipeline. When debugging without it,
// the project may not restart or just terminates. This is expected.
@@ -88,7 +91,7 @@ namespace Flow.Launcher
PluginManager.Save();
_mainVM.Save();
_settings.Save();
- _ = ImageLoader.Save();
+ _ = ImageLoader.SaveAsync();
}
public Task ReloadAllPluginData() => PluginManager.ReloadDataAsync();
From e4577eb23edbe6ce4e13154d2588d9e42e494764 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 10:02:47 +0800
Subject: [PATCH 0550/1442] Improve code comment
---
Flow.Launcher/PublicAPIInstance.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index b86e731b3..a9862c74c 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -57,16 +57,18 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
+#pragma warning disable VSTHRD100 // Avoid async void methods
+
public async void RestartApp()
{
_mainVM.Hide();
- // we must manually save
+ // We must manually save
// UpdateManager.RestartApp() will call Environment.Exit(0)
// which will cause ungraceful exit
SaveAppAllSettings();
- // wait for all image caches to be saved
+ // Wait for all image caches to be saved before restarting
await ImageLoader.WaitSaveAsync();
// Restart requires Squirrel's Update.exe to be present in the parent folder,
@@ -75,6 +77,8 @@ namespace Flow.Launcher
UpdateManager.RestartApp(Constant.ApplicationFileName);
}
+#pragma warning restore VSTHRD100 // Avoid async void methods
+
public void ShowMainWindow() => _mainVM.Show();
public void HideMainWindow() => _mainVM.Hide();
From 043fe76a613a5768bcd0e983acb555c58a8d681f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 10:03:19 +0800
Subject: [PATCH 0551/1442] Add settings save lock
---
Flow.Launcher/PublicAPIInstance.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index a9862c74c..d88eeb7c9 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -37,6 +37,8 @@ namespace Flow.Launcher
private readonly Internationalization _translater;
private readonly MainViewModel _mainVM;
+ private readonly object _saveSettingsLock = new();
+
#region Constructor
public PublicAPIInstance(Settings settings, Internationalization translater, MainViewModel mainVM)
@@ -92,9 +94,12 @@ namespace Flow.Launcher
public void SaveAppAllSettings()
{
- PluginManager.Save();
- _mainVM.Save();
- _settings.Save();
+ lock (_saveSettingsLock)
+ {
+ _settings.Save();
+ PluginManager.Save();
+ _mainVM.Save();
+ }
_ = ImageLoader.SaveAsync();
}
From 95a3fd36dea778911d0f4f8b9a434e4813096b6a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 10:34:59 +0800
Subject: [PATCH 0552/1442] Do not crash when caught exception on saving
settings
---
.../Plugin/JsonRPCPluginSettings.cs | 20 +++++++++--
.../Storage/FlowLauncherJsonStorage.cs | 35 ++++++++++++++++++-
.../Storage/PluginJsonStorage.cs | 33 +++++++++++++++++
3 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
index 944b2fd10..e0a217251 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
@@ -23,6 +23,8 @@ namespace Flow.Launcher.Core.Plugin
protected ConcurrentDictionary Settings { get; set; } = null!;
public required IPublicAPI API { get; init; }
+ private static readonly string ClassName = nameof(JsonRPCPluginSettings);
+
private JsonStorage> _storage = null!;
private static readonly Thickness SettingPanelMargin = (Thickness)Application.Current.FindResource("SettingPanelMargin");
@@ -122,12 +124,26 @@ namespace Flow.Launcher.Core.Plugin
public async Task SaveAsync()
{
- await _storage.SaveAsync();
+ try
+ {
+ await _storage.SaveAsync();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin settings to path: {SettingPath}", e);
+ }
}
public void Save()
{
- _storage.Save();
+ try
+ {
+ _storage.Save();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin settings to path: {SettingPath}", e);
+ }
}
public bool NeedCreateSettingPanel()
diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
index 865041fb3..a3634a0e2 100644
--- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
@@ -1,10 +1,19 @@
using System.IO;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Infrastructure.Storage
{
public class FlowLauncherJsonStorage : JsonStorage where T : new()
{
+ private static readonly string ClassName = "FlowLauncherJsonStorage";
+
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
public FlowLauncherJsonStorage()
{
var directoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
@@ -13,5 +22,29 @@ namespace Flow.Launcher.Infrastructure.Storage
var filename = typeof(T).Name;
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
}
+
+ public new void Save()
+ {
+ try
+ {
+ base.Save();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
+ }
+ }
+
+ public new async Task SaveAsync()
+ {
+ try
+ {
+ await base.SaveAsync();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
+ }
+ }
}
-}
\ No newline at end of file
+}
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index b377c81aa..e02d51bdb 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -1,5 +1,8 @@
using System.IO;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Infrastructure.Storage
{
@@ -8,6 +11,12 @@ namespace Flow.Launcher.Infrastructure.Storage
// Use assembly name to check which plugin is using this storage
public readonly string AssemblyName;
+ private static readonly string ClassName = "PluginJsonStorage";
+
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
public PluginJsonStorage()
{
// C# related, add python related below
@@ -23,5 +32,29 @@ namespace Flow.Launcher.Infrastructure.Storage
{
Data = data;
}
+
+ public new void Save()
+ {
+ try
+ {
+ base.Save();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
+ }
+ }
+
+ public new async Task SaveAsync()
+ {
+ try
+ {
+ await base.SaveAsync();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
+ }
+ }
}
}
From f6e3608f72ab28c48bf8563ea3bb58af7b9950bb Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 10:42:48 +0800
Subject: [PATCH 0553/1442] Do not crash when saving cache
---
Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 0ba059b7b..1ee033821 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -71,6 +71,10 @@ namespace Flow.Launcher.Infrastructure.Image
.Select(x => x.Key)
.ToList());
}
+ catch (System.Exception e)
+ {
+ Log.Exception($"|ImageLoader.SaveAsync|Failed to save image cache to file", e);
+ }
finally
{
storageLock.Release();
From 2d6667bb53549c5580004fe194b56b90d20cdcd7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 10:42:55 +0800
Subject: [PATCH 0554/1442] Test save error
---
Flow.Launcher.Infrastructure/Storage/JsonStorage.cs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index 40106acd8..52bcdcfab 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -180,20 +180,24 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Save()
{
- string serialized = JsonSerializer.Serialize(Data,
+ throw new NotImplementedException("Save error");
+
+ /*string serialized = JsonSerializer.Serialize(Data,
new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText(TempFilePath, serialized);
- AtomicWriteSetting();
+ AtomicWriteSetting();*/
}
public async Task SaveAsync()
{
- await using var tempOutput = File.OpenWrite(TempFilePath);
+ throw new NotImplementedException("SaveAsync error");
+
+ /*await using var tempOutput = File.OpenWrite(TempFilePath);
await JsonSerializer.SerializeAsync(tempOutput, Data,
new JsonSerializerOptions { WriteIndented = true });
- AtomicWriteSetting();
+ AtomicWriteSetting();*/
}
private void AtomicWriteSetting()
From c2f8480c049a4a818831c05558080907f2bac8d0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:15:13 +0800
Subject: [PATCH 0555/1442] Revert "Test save error"
This reverts commit 2d6667bb53549c5580004fe194b56b90d20cdcd7.
---
Flow.Launcher.Infrastructure/Storage/JsonStorage.cs | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index 52bcdcfab..40106acd8 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -180,24 +180,20 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Save()
{
- throw new NotImplementedException("Save error");
-
- /*string serialized = JsonSerializer.Serialize(Data,
+ string serialized = JsonSerializer.Serialize(Data,
new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText(TempFilePath, serialized);
- AtomicWriteSetting();*/
+ AtomicWriteSetting();
}
public async Task SaveAsync()
{
- throw new NotImplementedException("SaveAsync error");
-
- /*await using var tempOutput = File.OpenWrite(TempFilePath);
+ await using var tempOutput = File.OpenWrite(TempFilePath);
await JsonSerializer.SerializeAsync(tempOutput, Data,
new JsonSerializerOptions { WriteIndented = true });
- AtomicWriteSetting();*/
+ AtomicWriteSetting();
}
private void AtomicWriteSetting()
From 2a2ef234d952be3bc44507f95248b1622b92256d Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:17:30 +0800
Subject: [PATCH 0556/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 42461dc18..f2b99588d 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -489,8 +489,7 @@ namespace Flow.Launcher.Infrastructure
#endregion
- #region Noticification
-
+ #region Notification
public static bool IsNotificationSupport()
{
// Noticification only supported Windows 10 19041+
From 834780d6e7d57577a59f35c0ad5715f99e7b61cf Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:17:37 +0800
Subject: [PATCH 0557/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index f2b99588d..5bec3e5e7 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -492,7 +492,7 @@ namespace Flow.Launcher.Infrastructure
#region Notification
public static bool IsNotificationSupport()
{
- // Noticification only supported Windows 10 19041+
+ // Notification only supported Windows 10 19041+
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
Environment.OSVersion.Version.Build >= 19041;
}
From 8df1e6a0ce9977346327c9e9249ef2359c3a9ad1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:18:57 +0800
Subject: [PATCH 0558/1442] Add blank line
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 5bec3e5e7..d3023a3f0 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -490,6 +490,7 @@ namespace Flow.Launcher.Infrastructure
#endregion
#region Notification
+
public static bool IsNotificationSupport()
{
// Notification only supported Windows 10 19041+
From 3283adce59384003887d5d91dfa767ca6822c92e Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:27:10 +0800
Subject: [PATCH 0559/1442] Fix typos
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index d3023a3f0..c21849403 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -491,9 +491,9 @@ namespace Flow.Launcher.Infrastructure
#region Notification
- public static bool IsNotificationSupport()
+ public static bool IsNotificationSupported()
{
- // Notification only supported Windows 10 19041+
+ // Notifications only supported on Windows 10 19041+
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
Environment.OSVersion.Version.Build >= 19041;
}
From ec7a4e8aaa1463524ae0cacebceb5ec7f89e94b8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:27:50 +0800
Subject: [PATCH 0560/1442] Fix build issue
---
Flow.Launcher/Notification.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs
index 23125de15..30b3a0673 100644
--- a/Flow.Launcher/Notification.cs
+++ b/Flow.Launcher/Notification.cs
@@ -9,7 +9,7 @@ namespace Flow.Launcher
{
internal static class Notification
{
- internal static bool legacy = !Win32Helper.IsNotificationSupport();
+ internal static bool legacy = !Win32Helper.IsNotificationSupported();
internal static void Uninstall()
{
From 28ab71f11a60304db888c465e871c24be5b18ab5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 11:46:07 +0800
Subject: [PATCH 0561/1442] Fix build issue
---
Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs | 1 +
Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs | 1 +
2 files changed, 2 insertions(+)
diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
index 0fbeed9f5..8b4062b6b 100644
--- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index 910672119..e8cbd70fb 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
From df84e02f55d87404d1f9fe07299d20747072900c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 15:37:03 +0800
Subject: [PATCH 0562/1442] Improve code quality
---
...Flow.Launcher.Plugin.PluginsManager.csproj | 3 +-
.../Main.cs | 13 ++++-----
.../PluginsManager.cs | 29 +++++++++----------
3 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
index c33c42889..5a2259ff1 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
@@ -18,8 +18,7 @@
-
-
+
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
index 156135f81..b333aba42 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
@@ -1,18 +1,17 @@
-using Flow.Launcher.Core.ExternalPlugins;
-using Flow.Launcher.Plugin.PluginsManager.ViewModels;
-using Flow.Launcher.Plugin.PluginsManager.Views;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure;
using System.Threading.Tasks;
using System.Threading;
+using Flow.Launcher.Core.ExternalPlugins;
+using Flow.Launcher.Plugin.PluginsManager.ViewModels;
+using Flow.Launcher.Plugin.PluginsManager.Views;
namespace Flow.Launcher.Plugin.PluginsManager
{
public class Main : ISettingProvider, IAsyncPlugin, IContextMenu, IPluginI18n
{
- internal PluginInitContext Context { get; set; }
+ internal static PluginInitContext Context { get; set; }
internal Settings Settings;
@@ -56,7 +55,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Settings.UpdateCommand => await pluginManager.RequestUpdateAsync(query.SecondToEndSearch, token, query.IsReQuery),
_ => pluginManager.GetDefaultHotKeys().Where(hotkey =>
{
- hotkey.Score = StringMatcher.FuzzySearch(query.Search, hotkey.Title).Score;
+ hotkey.Score = Context.API.FuzzySearch(query.Search, hotkey.Title).Score;
return hotkey.Score > 0;
}).ToList()
};
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
index 79d6aedd5..9cee8bc8f 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
@@ -1,8 +1,5 @@
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Core.Plugin;
-using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
using System;
using System.Collections.Generic;
@@ -17,7 +14,9 @@ namespace Flow.Launcher.Plugin.PluginsManager
{
internal class PluginsManager
{
- private const string zip = "zip";
+ private const string ZipSuffix = "zip";
+
+ private static readonly string ClassName = nameof(PluginsManager);
private PluginInitContext Context { get; set; }
@@ -169,7 +168,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Context.API.ShowMsgError(
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"), plugin.Name),
Context.API.GetTranslation("plugin_pluginsmanager_download_error"));
- Log.Exception("PluginsManager", "An error occurred while downloading plugin", e);
+ Context.API.LogException(ClassName, "An error occurred while downloading plugin", e);
return;
}
@@ -179,7 +178,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_install_error_subtitle"),
plugin.Name));
- Log.Exception("PluginsManager", "An error occurred while downloading plugin", e);
+ Context.API.LogException(ClassName, "An error occurred while downloading plugin", e);
return;
}
@@ -366,7 +365,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
}).ContinueWith(t =>
{
- Log.Exception("PluginsManager", $"Update failed for {x.Name}",
+ Context.API.LogException(ClassName, $"Update failed for {x.Name}",
t.Exception.InnerException);
Context.API.ShowMsg(
Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
@@ -438,7 +437,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
catch (Exception ex)
{
- Log.Exception("PluginsManager", $"Update failed for {plugin.Name}", ex.InnerException);
+ Context.API.LogException(ClassName, $"Update failed for {plugin.Name}", ex.InnerException);
Context.API.ShowMsg(
Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
string.Format(
@@ -486,7 +485,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return results
.Where(x =>
{
- var matchResult = StringMatcher.FuzzySearch(searchName, x.Title);
+ var matchResult = Context.API.FuzzySearch(searchName, x.Title);
if (matchResult.IsSearchPrecisionScoreMet())
x.Score = matchResult.Score;
@@ -498,7 +497,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal List InstallFromWeb(string url)
{
var filename = url.Split("/").Last();
- var name = filename.Split(string.Format(".{0}", zip)).First();
+ var name = filename.Split(string.Format(".{0}", ZipSuffix)).First();
var plugin = new UserPlugin
{
@@ -605,7 +604,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
await PluginsManifest.UpdateManifestAsync(token, usePrimaryUrlOnly);
if (Uri.IsWellFormedUriString(search, UriKind.Absolute)
- && search.Split('.').Last() == zip)
+ && search.Split('.').Last() == ZipSuffix)
return InstallFromWeb(search);
if (FilesFolders.IsZipFilePath(search, checkFileExists: true))
@@ -656,21 +655,21 @@ namespace Flow.Launcher.Plugin.PluginsManager
{
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
Context.API.GetTranslation("plugin_pluginsmanager_install_errormetadatafile"));
- Log.Exception("Flow.Launcher.Plugin.PluginsManager", e.Message, e);
+ Context.API.LogException(ClassName, e.Message, e);
}
catch (InvalidOperationException e)
{
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_install_error_duplicate"),
plugin.Name));
- Log.Exception("Flow.Launcher.Plugin.PluginsManager", e.Message, e);
+ Context.API.LogException(ClassName, e.Message, e);
}
catch (ArgumentException e)
{
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_install_error_title"),
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_plugin_modified_error"),
plugin.Name));
- Log.Exception("Flow.Launcher.Plugin.PluginsManager", e.Message, e);
+ Context.API.LogException(ClassName, e.Message, e);
}
}
@@ -744,7 +743,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
catch (ArgumentException e)
{
- Log.Exception("Flow.Launcher.Plugin.PluginsManager", e.Message, e);
+ Context.API.LogException(ClassName, e.Message, e);
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_pluginsmanager_uninstall_error_title"),
Context.API.GetTranslation("plugin_pluginsmanager_plugin_modified_error"));
}
From e2d9148702aa47a64d02c915fda77f80b165bc54 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 15:52:57 +0800
Subject: [PATCH 0563/1442] Move user plugin to plugin project
---
.../ExternalPlugins/CommunityPluginSource.cs | 1 +
.../ExternalPlugins/CommunityPluginStore.cs | 1 +
.../ExternalPlugins/PluginsManifest.cs | 1 +
.../ExternalPlugins/UserPlugin.cs | 23 ------
Flow.Launcher.Plugin/UserPlugin.cs | 80 +++++++++++++++++++
.../ViewModel/PluginStoreItemViewModel.cs | 2 -
.../ContextMenu.cs | 3 +-
.../Utilities.cs | 3 +-
8 files changed, 85 insertions(+), 29 deletions(-)
delete mode 100644 Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
create mode 100644 Flow.Launcher.Plugin/UserPlugin.cs
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
index 68be746f2..e9713564e 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
@@ -1,5 +1,6 @@
using Flow.Launcher.Infrastructure.Http;
using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Plugin;
using System;
using System.Collections.Generic;
using System.Net;
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
index affd7c312..1f23c2f66 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
@@ -2,6 +2,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.ExternalPlugins
{
diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
index ac8abcdcc..4f5c4ae40 100644
--- a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
@@ -1,4 +1,5 @@
using Flow.Launcher.Infrastructure.Logger;
+using Flow.Launcher.Plugin;
using System;
using System.Collections.Generic;
using System.Threading;
diff --git a/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs b/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
deleted file mode 100644
index 79d6d7605..000000000
--- a/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-
-namespace Flow.Launcher.Core.ExternalPlugins
-{
- public record UserPlugin
- {
- public string ID { get; set; }
- public string Name { get; set; }
- public string Description { get; set; }
- public string Author { get; set; }
- public string Version { get; set; }
- public string Language { get; set; }
- public string Website { get; set; }
- public string UrlDownload { get; set; }
- public string UrlSourceCode { get; set; }
- public string LocalInstallPath { get; set; }
- public string IcoPath { get; set; }
- public DateTime? LatestReleaseDate { get; set; }
- public DateTime? DateAdded { get; set; }
-
- public bool IsFromLocalInstallPath => !string.IsNullOrEmpty(LocalInstallPath);
- }
-}
diff --git a/Flow.Launcher.Plugin/UserPlugin.cs b/Flow.Launcher.Plugin/UserPlugin.cs
new file mode 100644
index 000000000..5c9189ae1
--- /dev/null
+++ b/Flow.Launcher.Plugin/UserPlugin.cs
@@ -0,0 +1,80 @@
+using System;
+
+namespace Flow.Launcher.Plugin
+{
+ ///
+ /// User Plugin Model for Flow Launcher
+ ///
+ public record UserPlugin
+ {
+ ///
+ /// Unique identifier of the plugin
+ ///
+ public string ID { get; set; }
+
+ ///
+ /// Name of the plugin
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// Description of the plugin
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// Author of the plugin
+ ///
+ public string Author { get; set; }
+
+ ///
+ /// Version of the plugin
+ ///
+ public string Version { get; set; }
+
+ ///
+ /// Allow language of the plugin
+ ///
+ public string Language { get; set; }
+
+ ///
+ /// Website of the plugin
+ ///
+ public string Website { get; set; }
+
+ ///
+ /// URL to download the plugin
+ ///
+ public string UrlDownload { get; set; }
+
+ ///
+ /// URL to the source code of the plugin
+ ///
+ public string UrlSourceCode { get; set; }
+
+ ///
+ /// URL to the issue tracker of the plugin
+ ///
+ public string LocalInstallPath { get; set; }
+
+ ///
+ /// Icon path of the plugin
+ ///
+ public string IcoPath { get; set; }
+
+ ///
+ /// The date when the plugin was last updated
+ ///
+ public DateTime? LatestReleaseDate { get; set; }
+
+ ///
+ /// The date when the plugin was added to the local system
+ ///
+ public DateTime? DateAdded { get; set; }
+
+ ///
+ /// The date when the plugin was last updated on the local system
+ ///
+ public bool IsFromLocalInstallPath => !string.IsNullOrEmpty(LocalInstallPath);
+ }
+}
diff --git a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
index 38b5bec65..d1cf74501 100644
--- a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
@@ -1,10 +1,8 @@
using System;
using System.Linq;
using CommunityToolkit.Mvvm.Input;
-using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Plugin;
-using SemanticVersioning;
using Version = SemanticVersioning.Version;
namespace Flow.Launcher.ViewModel
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
index 482e821dc..265657ef4 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs
@@ -1,5 +1,4 @@
-using Flow.Launcher.Core.ExternalPlugins;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Flow.Launcher.Plugin.PluginsManager
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
index 743f5b25b..4bb78f6ff 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
@@ -1,5 +1,4 @@
-using Flow.Launcher.Core.ExternalPlugins;
-using ICSharpCode.SharpZipLib.Zip;
+using ICSharpCode.SharpZipLib.Zip;
using System.IO;
using System.IO.Compression;
using System.Linq;
From b9c0eb7b7859d5288f1cb53bb60be110ed669210 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 15:56:18 +0800
Subject: [PATCH 0564/1442] Code quality
---
.../ExternalPlugins/PluginsManifest.cs | 12 ++++++------
.../PluginsManager.cs | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
index 4f5c4ae40..44d3ef0ff 100644
--- a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
@@ -1,9 +1,9 @@
-using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Plugin;
-using System;
+using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.ExternalPlugins
{
@@ -18,11 +18,11 @@ namespace Flow.Launcher.Core.ExternalPlugins
private static readonly SemaphoreSlim manifestUpdateLock = new(1);
private static DateTime lastFetchedAt = DateTime.MinValue;
- private static TimeSpan fetchTimeout = TimeSpan.FromMinutes(2);
+ private static readonly TimeSpan fetchTimeout = TimeSpan.FromMinutes(2);
public static List UserPlugins { get; private set; }
- public static async Task UpdateManifestAsync(CancellationToken token = default, bool usePrimaryUrlOnly = false)
+ public static async Task UpdateManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default)
{
try
{
@@ -44,7 +44,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
}
catch (Exception e)
{
- Log.Exception($"|PluginsManifest.{nameof(UpdateManifestAsync)}|Http request failed", e);
+ Ioc.Default.GetRequiredService().LogException(nameof(PluginsManifest), "Http request failed", e);
}
finally
{
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
index 9cee8bc8f..9d2a8fe73 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
@@ -236,7 +236,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal async ValueTask> RequestUpdateAsync(string search, CancellationToken token,
bool usePrimaryUrlOnly = false)
{
- await PluginsManifest.UpdateManifestAsync(token, usePrimaryUrlOnly);
+ await PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
var pluginFromLocalPath = null as UserPlugin;
var updateFromLocalPath = false;
@@ -601,7 +601,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal async ValueTask> RequestInstallOrUpdateAsync(string search, CancellationToken token,
bool usePrimaryUrlOnly = false)
{
- await PluginsManifest.UpdateManifestAsync(token, usePrimaryUrlOnly);
+ await PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
if (Uri.IsWellFormedUriString(search, UriKind.Absolute)
&& search.Split('.').Last() == ZipSuffix)
From 55d1754ed6941835745baf7a64efac7be05a5cb1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 16:05:33 +0800
Subject: [PATCH 0565/1442] Move PluginManifest public function to api
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 18 ++++++++++++++++++
Flow.Launcher/PublicAPIInstance.cs | 6 ++++++
.../SettingsPanePluginStoreViewModel.cs | 5 ++---
.../Main.cs | 3 +--
.../PluginsManager.cs | 12 +++++-------
5 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f178ebb90..513c2da84 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -344,5 +344,23 @@ namespace Flow.Launcher.Plugin
/// Stop the loading bar in main window
///
public void StopLoadingBar();
+
+ ///
+ /// Update the plugin manifest
+ ///
+ ///
+ /// FL has multiple urls to download the plugin manifest. Set this to true to only use the primary url.
+ ///
+ ///
+ ///
+ /// True if the manifest is updated successfully, false otherwise.
+ ///
+ public Task UpdatePluginManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default);
+
+ ///
+ /// Get the plugin manifest
+ ///
+ ///
+ public IReadOnlyList GetUserPlugins();
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index d88eeb7c9..a8ec46982 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -28,6 +28,7 @@ using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel;
using JetBrains.Annotations;
using Flow.Launcher.Core.Resource;
+using Flow.Launcher.Core.ExternalPlugins;
namespace Flow.Launcher
{
@@ -354,6 +355,11 @@ namespace Flow.Launcher
public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
+ public Task UpdatePluginManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default) =>
+ PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
+
+ public IReadOnlyList GetUserPlugins() => PluginsManifest.UserPlugins;
+
#endregion
#region Private Methods
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
index 15579a61d..23a316304 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
-using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
@@ -14,7 +13,7 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
public string FilterText { get; set; } = string.Empty;
public IList ExternalPlugins =>
- PluginsManifest.UserPlugins?.Select(p => new PluginStoreItemViewModel(p))
+ App.API.GetUserPlugins()?.Select(p => new PluginStoreItemViewModel(p))
.OrderByDescending(p => p.Category == PluginStoreItemViewModel.NewRelease)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.RecentlyUpdated)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.None)
@@ -24,7 +23,7 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
[RelayCommand]
private async Task RefreshExternalPluginsAsync()
{
- if (await PluginsManifest.UpdateManifestAsync())
+ if (await App.API.UpdatePluginManifestAsync())
{
OnPropertyChanged(nameof(ExternalPlugins));
}
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
index b333aba42..742d85fc1 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs
@@ -3,7 +3,6 @@ using System.Linq;
using System.Windows.Controls;
using System.Threading.Tasks;
using System.Threading;
-using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Plugin.PluginsManager.ViewModels;
using Flow.Launcher.Plugin.PluginsManager.Views;
@@ -34,7 +33,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
contextMenu = new ContextMenu(Context);
pluginManager = new PluginsManager(Context, Settings);
- await PluginsManifest.UpdateManifestAsync();
+ await Context.API.UpdatePluginManifestAsync();
}
public List LoadContextMenus(Result selectedResult)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
index 9d2a8fe73..c742e457c 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
@@ -1,5 +1,4 @@
-using Flow.Launcher.Core.ExternalPlugins;
-using Flow.Launcher.Core.Plugin;
+using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
using System;
using System.Collections.Generic;
@@ -236,7 +235,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal async ValueTask> RequestUpdateAsync(string search, CancellationToken token,
bool usePrimaryUrlOnly = false)
{
- await PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
+ await Context.API.UpdatePluginManifestAsync(usePrimaryUrlOnly, token);
var pluginFromLocalPath = null as UserPlugin;
var updateFromLocalPath = false;
@@ -249,7 +248,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
var updateSource = !updateFromLocalPath
- ? PluginsManifest.UserPlugins
+ ? Context.API.GetUserPlugins()
: new List { pluginFromLocalPath };
var resultsForUpdate = (
@@ -601,7 +600,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
internal async ValueTask> RequestInstallOrUpdateAsync(string search, CancellationToken token,
bool usePrimaryUrlOnly = false)
{
- await PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
+ await Context.API.UpdatePluginManifestAsync(usePrimaryUrlOnly, token);
if (Uri.IsWellFormedUriString(search, UriKind.Absolute)
&& search.Split('.').Last() == ZipSuffix)
@@ -611,8 +610,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return InstallFromLocalPath(search);
var results =
- PluginsManifest
- .UserPlugins
+ Context.API.GetUserPlugins()
.Where(x => !PluginExists(x.ID) && !PluginManager.PluginModified(x.ID))
.Select(x =>
new Result
From 4744ff780e91ef36c7f835a7cb7a9b3c02a52af5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 16:33:03 +0800
Subject: [PATCH 0566/1442] Move PluginManager public function to api
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 43 +++++++----------
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 47 +++++++++++++++++--
Flow.Launcher/PublicAPIInstance.cs | 13 ++++-
.../SettingsPanePluginStoreViewModel.cs | 2 +-
.../PluginsManager.cs | 31 ++++++------
5 files changed, 87 insertions(+), 49 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 17517832b..aa6c54a94 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -454,16 +454,11 @@ namespace Flow.Launcher.Core.Plugin
#region Public functions
- public static bool PluginModified(string uuid)
+ public static bool PluginModified(string id)
{
- return _modifiedPlugins.Contains(uuid);
+ return _modifiedPlugins.Contains(id);
}
-
- ///
- /// Update a plugin to new version, from a zip file. By default will remove the zip file if update is via url,
- /// unless it's a local path installation
- ///
public static async Task UpdatePluginAsync(PluginMetadata existingVersion, UserPlugin newVersion, string zipFilePath)
{
InstallPlugin(newVersion, zipFilePath, checkModified:false);
@@ -471,17 +466,11 @@ namespace Flow.Launcher.Core.Plugin
_modifiedPlugins.Add(existingVersion.ID);
}
- ///
- /// Install a plugin. By default will remove the zip file if installation is from url, unless it's a local path installation
- ///
public static void InstallPlugin(UserPlugin plugin, string zipFilePath)
{
InstallPlugin(plugin, zipFilePath, checkModified: true);
}
- ///
- /// Uninstall a plugin.
- ///
public static async Task UninstallPluginAsync(PluginMetadata plugin, bool removePluginFromSettings = true, bool removePluginSettings = false)
{
await UninstallPluginAsync(plugin, removePluginFromSettings, removePluginSettings, true);
@@ -525,20 +514,20 @@ namespace Flow.Launcher.Core.Plugin
var folderName = string.IsNullOrEmpty(plugin.Version) ? $"{plugin.Name}-{Guid.NewGuid()}" : $"{plugin.Name}-{plugin.Version}";
var defaultPluginIDs = new List
- {
- "0ECADE17459B49F587BF81DC3A125110", // BrowserBookmark
- "CEA0FDFC6D3B4085823D60DC76F28855", // Calculator
- "572be03c74c642baae319fc283e561a8", // Explorer
- "6A122269676E40EB86EB543B945932B9", // PluginIndicator
- "9f8f9b14-2518-4907-b211-35ab6290dee7", // PluginsManager
- "b64d0a79-329a-48b0-b53f-d658318a1bf6", // ProcessKiller
- "791FC278BA414111B8D1886DFE447410", // Program
- "D409510CD0D2481F853690A07E6DC426", // Shell
- "CEA08895D2544B019B2E9C5009600DF4", // Sys
- "0308FD86DE0A4DEE8D62B9B535370992", // URL
- "565B73353DBF4806919830B9202EE3BF", // WebSearch
- "5043CETYU6A748679OPA02D27D99677A" // WindowsSettings
- };
+ {
+ "0ECADE17459B49F587BF81DC3A125110", // BrowserBookmark
+ "CEA0FDFC6D3B4085823D60DC76F28855", // Calculator
+ "572be03c74c642baae319fc283e561a8", // Explorer
+ "6A122269676E40EB86EB543B945932B9", // PluginIndicator
+ "9f8f9b14-2518-4907-b211-35ab6290dee7", // PluginsManager
+ "b64d0a79-329a-48b0-b53f-d658318a1bf6", // ProcessKiller
+ "791FC278BA414111B8D1886DFE447410", // Program
+ "D409510CD0D2481F853690A07E6DC426", // Shell
+ "CEA08895D2544B019B2E9C5009600DF4", // Sys
+ "0308FD86DE0A4DEE8D62B9B535370992", // URL
+ "565B73353DBF4806919830B9202EE3BF", // WebSearch
+ "5043CETYU6A748679OPA02D27D99677A" // WindowsSettings
+ };
// Treat default plugin differently, it needs to be removable along with each flow release
var installDirectory = !defaultPluginIDs.Any(x => x == plugin.ID)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 513c2da84..eeb3f5de3 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -352,15 +352,54 @@ namespace Flow.Launcher.Plugin
/// FL has multiple urls to download the plugin manifest. Set this to true to only use the primary url.
///
///
- ///
- /// True if the manifest is updated successfully, false otherwise.
- ///
+ /// True if the manifest is updated successfully, false otherwise
public Task UpdatePluginManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default);
///
/// Get the plugin manifest
///
///
- public IReadOnlyList GetUserPlugins();
+ public IReadOnlyList GetPluginManifest();
+
+ ///
+ /// Check if the plugin has been modified.
+ /// If this plugin is updated, installed or uninstalled and users do not restart the app,
+ /// it will be marked as modified
+ ///
+ /// Plugin id
+ ///
+ public bool PluginModified(string id);
+
+ ///
+ /// Update a plugin to new version, from a zip file. By default will remove the zip file if update is via url,
+ /// unless it's a local path installation
+ ///
+ /// The metadata of the old plugin to update
+ /// The new plugin to update
+ ///
+ /// Path to the zip file containing the plugin. It will be unzipped to the temporary directory, removed and installed.
+ ///
+ ///
+ public Task UpdatePluginAsync(PluginMetadata pluginMetadata, UserPlugin plugin, string zipFilePath);
+
+ ///
+ /// Install a plugin. By default will remove the zip file if installation is from url,
+ /// unless it's a local path installation
+ ///
+ /// The plugin to install
+ ///
+ /// Path to the zip file containing the plugin. It will be unzipped to the temporary directory, removed and installed.
+ ///
+ public void InstallPlugin(UserPlugin plugin, string zipFilePath);
+
+ ///
+ /// Uninstall a plugin
+ ///
+ /// The metadata of the plugin to uninstall
+ ///
+ /// Plugin has their own settings. If this is set to true, the plugin settings will be removed.
+ ///
+ ///
+ public Task UninstallPluginAsync(PluginMetadata pluginMetadata, bool removePluginSettings = false);
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index a8ec46982..c40e40ebb 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -358,7 +358,18 @@ namespace Flow.Launcher
public Task UpdatePluginManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default) =>
PluginsManifest.UpdateManifestAsync(usePrimaryUrlOnly, token);
- public IReadOnlyList GetUserPlugins() => PluginsManifest.UserPlugins;
+ public IReadOnlyList GetPluginManifest() => PluginsManifest.UserPlugins;
+
+ public bool PluginModified(string id) => PluginManager.PluginModified(id);
+
+ public Task UpdatePluginAsync(PluginMetadata pluginMetadata, UserPlugin plugin, string zipFilePath) =>
+ PluginManager.UpdatePluginAsync(pluginMetadata, plugin, zipFilePath);
+
+ public void InstallPlugin(UserPlugin plugin, string zipFilePath) =>
+ PluginManager.InstallPlugin(plugin, zipFilePath);
+
+ public Task UninstallPluginAsync(PluginMetadata pluginMetadata, bool removePluginSettings = false) =>
+ PluginManager.UninstallPluginAsync(pluginMetadata, removePluginSettings);
#endregion
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
index 23a316304..84d8a2ff9 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
@@ -13,7 +13,7 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
public string FilterText { get; set; } = string.Empty;
public IList ExternalPlugins =>
- App.API.GetUserPlugins()?.Select(p => new PluginStoreItemViewModel(p))
+ App.API.GetPluginManifest()?.Select(p => new PluginStoreItemViewModel(p))
.OrderByDescending(p => p.Category == PluginStoreItemViewModel.NewRelease)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.RecentlyUpdated)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.None)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
index c742e457c..a16778ff4 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
@@ -1,6 +1,4 @@
-using Flow.Launcher.Core.Plugin;
-using Flow.Launcher.Plugin.SharedCommands;
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -8,6 +6,7 @@ using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Plugin.PluginsManager
{
@@ -49,7 +48,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
{
return new List()
{
- new Result()
+ new()
{
Title = Settings.InstallCommand,
IcoPath = icoPath,
@@ -61,7 +60,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return false;
}
},
- new Result()
+ new()
{
Title = Settings.UninstallCommand,
IcoPath = icoPath,
@@ -73,7 +72,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return false;
}
},
- new Result()
+ new()
{
Title = Settings.UpdateCommand,
IcoPath = icoPath,
@@ -248,7 +247,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
var updateSource = !updateFromLocalPath
- ? Context.API.GetUserPlugins()
+ ? Context.API.GetPluginManifest()
: new List { pluginFromLocalPath };
var resultsForUpdate = (
@@ -258,7 +257,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
where string.Compare(existingPlugin.Metadata.Version, pluginUpdateSource.Version,
StringComparison.InvariantCulture) <
0 // if current version precedes version of the plugin from update source (e.g. PluginsManifest)
- && !PluginManager.PluginModified(existingPlugin.Metadata.ID)
+ && !Context.API.PluginModified(existingPlugin.Metadata.ID)
select
new
{
@@ -274,7 +273,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
if (!resultsForUpdate.Any())
return new List
{
- new Result
+ new()
{
Title = Context.API.GetTranslation("plugin_pluginsmanager_update_noresult_title"),
SubTitle = Context.API.GetTranslation("plugin_pluginsmanager_update_noresult_subtitle"),
@@ -339,7 +338,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
}
else
{
- await PluginManager.UpdatePluginAsync(x.PluginExistingMetadata, x.PluginNewUserPlugin,
+ await Context.API.UpdatePluginAsync(x.PluginExistingMetadata, x.PluginNewUserPlugin,
downloadToFilePath);
if (Settings.AutoRestartAfterChanging)
@@ -431,7 +430,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
if (cts.IsCancellationRequested)
return;
else
- await PluginManager.UpdatePluginAsync(plugin.PluginExistingMetadata, plugin.PluginNewUserPlugin,
+ await Context.API.UpdatePluginAsync(plugin.PluginExistingMetadata, plugin.PluginNewUserPlugin,
downloadToFilePath);
}
catch (Exception ex)
@@ -550,7 +549,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
return new List
{
- new Result
+ new()
{
Title = $"{plugin.Name} by {plugin.Author}",
SubTitle = plugin.Description,
@@ -610,8 +609,8 @@ namespace Flow.Launcher.Plugin.PluginsManager
return InstallFromLocalPath(search);
var results =
- Context.API.GetUserPlugins()
- .Where(x => !PluginExists(x.ID) && !PluginManager.PluginModified(x.ID))
+ Context.API.GetPluginManifest()
+ .Where(x => !PluginExists(x.ID) && !Context.API.PluginModified(x.ID))
.Select(x =>
new Result
{
@@ -644,7 +643,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
try
{
- PluginManager.InstallPlugin(plugin, downloadedFilePath);
+ Context.API.InstallPlugin(plugin, downloadedFilePath);
if (!plugin.IsFromLocalInstallPath)
File.Delete(downloadedFilePath);
@@ -737,7 +736,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Context.API.GetTranslation("plugin_pluginsmanager_keep_plugin_settings_subtitle"),
Context.API.GetTranslation("plugin_pluginsmanager_keep_plugin_settings_title"),
button: MessageBoxButton.YesNo) == MessageBoxResult.No;
- await PluginManager.UninstallPluginAsync(plugin, removePluginFromSettings: true, removePluginSettings: removePluginSettings);
+ await Context.API.UninstallPluginAsync(plugin, removePluginSettings);
}
catch (ArgumentException e)
{
From 473b139ea4a6b43346aa79c582ff66f0094477ca Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 16:35:28 +0800
Subject: [PATCH 0567/1442] Move FL project reference
---
.../Flow.Launcher.Plugin.PluginsManager.csproj | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
index 5a2259ff1..8ff41a7ad 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj
@@ -18,7 +18,6 @@
-
@@ -36,4 +35,8 @@
PreserveNewest
+
+
+
+
From 56536d018891a7a28e1c5916a1426045b3682360 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 16:45:58 +0800
Subject: [PATCH 0568/1442] Add log for plugin binary storage
---
.../Storage/PluginBinaryStorage.cs | 36 ++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
index 87f51d5d7..d18060e3d 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
@@ -1,15 +1,49 @@
using System.IO;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
{
public class PluginBinaryStorage : BinaryStorage where T : new()
{
+ private static readonly string ClassName = "PluginBinaryStorage";
+
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
public PluginBinaryStorage(string cacheName, string cacheDirectory)
{
DirectoryPath = cacheDirectory;
- Helper.ValidateDirectory(DirectoryPath);
+ FilesFolders.ValidateDirectory(DirectoryPath);
FilePath = Path.Combine(DirectoryPath, $"{cacheName}{FileSuffix}");
}
+
+ public new void Save()
+ {
+ try
+ {
+ base.Save();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
+ }
+ }
+
+ public new async Task SaveAsync()
+ {
+ try
+ {
+ await base.SaveAsync();
+ }
+ catch (System.Exception e)
+ {
+ API.LogException(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
+ }
+ }
}
}
From cbd8d2272386ce4e28b688c9cd3b7bc8a16e832e Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 17:24:21 +0800
Subject: [PATCH 0569/1442] Improve documents
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher.Plugin/UserPlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/UserPlugin.cs b/Flow.Launcher.Plugin/UserPlugin.cs
index 5c9189ae1..3488b4b93 100644
--- a/Flow.Launcher.Plugin/UserPlugin.cs
+++ b/Flow.Launcher.Plugin/UserPlugin.cs
@@ -73,7 +73,7 @@ namespace Flow.Launcher.Plugin
public DateTime? DateAdded { get; set; }
///
- /// The date when the plugin was last updated on the local system
+ /// Indicates whether the plugin is installed from a local path
///
public bool IsFromLocalInstallPath => !string.IsNullOrEmpty(LocalInstallPath);
}
From 171ebe955f23491ad6a70b3a6c197313f7aa47b0 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 17:24:36 +0800
Subject: [PATCH 0570/1442] Improve documents
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher.Plugin/UserPlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/UserPlugin.cs b/Flow.Launcher.Plugin/UserPlugin.cs
index 3488b4b93..74a16b83d 100644
--- a/Flow.Launcher.Plugin/UserPlugin.cs
+++ b/Flow.Launcher.Plugin/UserPlugin.cs
@@ -53,7 +53,7 @@ namespace Flow.Launcher.Plugin
public string UrlSourceCode { get; set; }
///
- /// URL to the issue tracker of the plugin
+ /// Local path where the plugin is installed
///
public string LocalInstallPath { get; set; }
From 358b1fd7c875e4e4863227d53ee977872a9bd703 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:10:39 +0800
Subject: [PATCH 0571/1442] Move theme data and functions into api
---
Flow.Launcher.Core/Resource/Theme.cs | 31 ++++----
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 19 +++++
Flow.Launcher.Plugin/ThemeData.cs | 71 +++++++++++++++++++
Flow.Launcher/PublicAPIInstance.cs | 13 ++++
4 files changed, 116 insertions(+), 18 deletions(-)
create mode 100644 Flow.Launcher.Plugin/ThemeData.cs
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index e5980b62f..4cf9ce7a7 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -81,11 +81,6 @@ namespace Flow.Launcher.Core.Resource
#region Theme Resources
- public string GetCurrentTheme()
- {
- return _settings.Theme;
- }
-
private void MakeSureThemeDirectoriesExist()
{
foreach (var dir in _themeDirectories.Where(dir => !Directory.Exists(dir)))
@@ -127,7 +122,7 @@ namespace Flow.Launcher.Core.Resource
try
{
// Load a ResourceDictionary for the specified theme.
- var themeName = GetCurrentTheme();
+ var themeName = _settings.Theme;
var dict = GetThemeResourceDictionary(themeName);
// Apply font settings to the theme resource.
@@ -330,7 +325,7 @@ namespace Flow.Launcher.Core.Resource
private ResourceDictionary GetCurrentResourceDictionary()
{
- return GetResourceDictionary(GetCurrentTheme());
+ return GetResourceDictionary(_settings.Theme);
}
private ThemeData GetThemeDataFromPath(string path)
@@ -383,9 +378,15 @@ namespace Flow.Launcher.Core.Resource
#endregion
- #region Load & Change
+ #region Get & Change Theme
- public List LoadAvailableThemes()
+ public ThemeData GetCurrentTheme()
+ {
+ var themes = GetAvailableThemes();
+ return themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme) ?? themes.FirstOrDefault();
+ }
+
+ public List GetAvailableThemes()
{
List themes = new List();
foreach (var themeDirectory in _themeDirectories)
@@ -403,7 +404,7 @@ namespace Flow.Launcher.Core.Resource
public bool ChangeTheme(string theme = null)
{
if (string.IsNullOrEmpty(theme))
- theme = GetCurrentTheme();
+ theme = _settings.Theme;
string path = GetThemePath(theme);
try
@@ -591,7 +592,7 @@ namespace Flow.Launcher.Core.Resource
{
AutoDropShadow(useDropShadowEffect);
}
- SetBlurForWindow(GetCurrentTheme(), backdropType);
+ SetBlurForWindow(_settings.Theme, backdropType);
if (!BlurEnabled)
{
@@ -610,7 +611,7 @@ namespace Flow.Launcher.Core.Resource
// Get the actual backdrop type and drop shadow effect settings
var (backdropType, _) = GetActualValue();
- SetBlurForWindow(GetCurrentTheme(), backdropType);
+ SetBlurForWindow(_settings.Theme, backdropType);
}, DispatcherPriority.Render);
}
@@ -898,11 +899,5 @@ namespace Flow.Launcher.Core.Resource
}
#endregion
-
- #region Classes
-
- public record ThemeData(string FileNameWithoutExtension, string Name, bool? IsDark = null, bool? HasBlur = null);
-
- #endregion
}
}
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index f178ebb90..bfcc2f9e0 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -344,5 +344,24 @@ namespace Flow.Launcher.Plugin
/// Stop the loading bar in main window
///
public void StopLoadingBar();
+
+ ///
+ /// Get all available themes
+ ///
+ ///
+ public List GetAvailableThemes();
+
+ ///
+ /// Get the current theme
+ ///
+ ///
+ public ThemeData GetCurrentTheme();
+
+ ///
+ /// Set the current theme
+ ///
+ ///
+ ///
+ public void SetCurrentTheme(ThemeData theme);
}
}
diff --git a/Flow.Launcher.Plugin/ThemeData.cs b/Flow.Launcher.Plugin/ThemeData.cs
new file mode 100644
index 000000000..d4a69ef09
--- /dev/null
+++ b/Flow.Launcher.Plugin/ThemeData.cs
@@ -0,0 +1,71 @@
+namespace Flow.Launcher.Plugin;
+
+///
+/// Theme data model
+///
+public class ThemeData
+{
+ ///
+ /// Theme file name without extension
+ ///
+ public string FileNameWithoutExtension { get; private init; }
+
+ ///
+ /// Theme name
+ ///
+ public string Name { get; private init; }
+
+ ///
+ /// Theme file path
+ ///
+ public bool? IsDark { get; private init; }
+
+ ///
+ /// Theme file path
+ ///
+ public bool? HasBlur { get; private init; }
+
+ ///
+ /// Theme data constructor
+ ///
+ public ThemeData(string fileNameWithoutExtension, string name, bool? isDark = null, bool? hasBlur = null)
+ {
+ FileNameWithoutExtension = fileNameWithoutExtension;
+ Name = name;
+ IsDark = isDark;
+ HasBlur = hasBlur;
+ }
+
+ ///
+ public static bool operator ==(ThemeData left, ThemeData right)
+ {
+ return left.Equals(right);
+ }
+
+ ///
+ public static bool operator !=(ThemeData left, ThemeData right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ public override bool Equals(object obj)
+ {
+ if (obj is not ThemeData other)
+ return false;
+ return FileNameWithoutExtension == other.FileNameWithoutExtension &&
+ Name == other.Name;
+ }
+
+ ///
+ public override int GetHashCode()
+ {
+ return Name?.GetHashCode() ?? 0;
+ }
+
+ ///
+ public override string ToString()
+ {
+ return Name;
+ }
+}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index d88eeb7c9..96ccb55c4 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -37,6 +37,9 @@ namespace Flow.Launcher
private readonly Internationalization _translater;
private readonly MainViewModel _mainVM;
+ private Theme _theme;
+ private Theme Theme => _theme ??= Ioc.Default.GetRequiredService();
+
private readonly object _saveSettingsLock = new();
#region Constructor
@@ -354,6 +357,16 @@ namespace Flow.Launcher
public Task ShowProgressBoxAsync(string caption, Func, Task> reportProgressAsync, Action cancelProgress = null) => ProgressBoxEx.ShowAsync(caption, reportProgressAsync, cancelProgress);
+ public List GetAvailableThemes() => Theme.GetAvailableThemes();
+
+ public ThemeData GetCurrentTheme() => Theme.GetCurrentTheme();
+
+ public void SetCurrentTheme(ThemeData theme)
+ {
+ Theme.ChangeTheme(theme.FileNameWithoutExtension);
+ _ = _theme.RefreshFrameAsync();
+ }
+
#endregion
#region Private Methods
From 9b9704e938f1e74584c8bc7688bc333387700c6b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:11:01 +0800
Subject: [PATCH 0572/1442] Improve settings panel theme page & theme selector
---
.../ViewModels/SettingsPaneThemeViewModel.cs | 14 +++---
.../Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 47 +++++--------------
2 files changed, 17 insertions(+), 44 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index 6e2488fe1..58cf3a314 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -28,25 +28,23 @@ public partial class SettingsPaneThemeViewModel : BaseModel
public static string LinkHowToCreateTheme => @"https://www.flowlauncher.com/theme-builder/";
public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438";
- private List _themes;
- public List Themes => _themes ??= _theme.LoadAvailableThemes();
+ private List _themes;
+ public List Themes => _themes ??= App.API.GetAvailableThemes();
- private Theme.ThemeData _selectedTheme;
- public Theme.ThemeData SelectedTheme
+ private ThemeData _selectedTheme;
+ public ThemeData SelectedTheme
{
- get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == _theme.GetCurrentTheme());
+ get => _selectedTheme ??= Themes.Find(v => v == App.API.GetCurrentTheme());
set
{
_selectedTheme = value;
- _theme.ChangeTheme(value.FileNameWithoutExtension);
+ App.API.SetCurrentTheme(value);
// Update UI state
OnPropertyChanged(nameof(BackdropType));
OnPropertyChanged(nameof(IsBackdropEnabled));
OnPropertyChanged(nameof(IsDropShadowEnabled));
OnPropertyChanged(nameof(DropShadowEffect));
-
- _ = _theme.RefreshFrameAsync();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 31faeba52..84bfa218e 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core.Resource;
namespace Flow.Launcher.Plugin.Sys
{
@@ -11,32 +9,6 @@ namespace Flow.Launcher.Plugin.Sys
private readonly PluginInitContext _context;
- // Do not initialize it in the constructor, because it will cause null reference in
- // var dicts = Application.Current.Resources.MergedDictionaries; line of Theme
- private Theme theme = null;
- private Theme Theme => theme ??= Ioc.Default.GetRequiredService();
-
- #region Theme Selection
-
- // Theme select codes simplified from SettingsPaneThemeViewModel.cs
-
- private Theme.ThemeData _selectedTheme;
- public Theme.ThemeData SelectedTheme
- {
- get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == Theme.GetCurrentTheme());
- set
- {
- _selectedTheme = value;
- Theme.ChangeTheme(value.FileNameWithoutExtension);
-
- _ = Theme.RefreshFrameAsync();
- }
- }
-
- private List Themes => Theme.LoadAvailableThemes();
-
- #endregion
-
public ThemeSelector(PluginInitContext context)
{
_context = context;
@@ -44,28 +16,31 @@ namespace Flow.Launcher.Plugin.Sys
public List Query(Query query)
{
+ var themes = _context.API.GetAvailableThemes();
+ var selectedTheme = _context.API.GetCurrentTheme();
+
var search = query.SecondToEndSearch;
if (string.IsNullOrWhiteSpace(search))
{
- return Themes.Select(CreateThemeResult)
+ return themes.Select(x => CreateThemeResult(x, selectedTheme))
.OrderBy(x => x.Title)
.ToList();
}
- return Themes.Select(theme => (theme, matchResult: _context.API.FuzzySearch(search, theme.Name)))
+ return themes.Select(theme => (theme, matchResult: _context.API.FuzzySearch(search, theme.Name)))
.Where(x => x.matchResult.IsSearchPrecisionScoreMet())
- .Select(x => CreateThemeResult(x.theme, x.matchResult.Score, x.matchResult.MatchData))
+ .Select(x => CreateThemeResult(x.theme, selectedTheme, x.matchResult.Score, x.matchResult.MatchData))
.OrderBy(x => x.Title)
.ToList();
}
- private Result CreateThemeResult(Theme.ThemeData theme) => CreateThemeResult(theme, 0, null);
+ private Result CreateThemeResult(ThemeData theme, ThemeData selectedTheme) => CreateThemeResult(theme, selectedTheme, 0, null);
- private Result CreateThemeResult(Theme.ThemeData theme, int score, IList highlightData)
+ private Result CreateThemeResult(ThemeData theme, ThemeData selectedTheme, int score, IList highlightData)
{
- string themeName = theme.Name;
+ var themeName = theme.FileNameWithoutExtension;
string title;
- if (theme == SelectedTheme)
+ if (theme == selectedTheme)
{
title = $"{theme.Name} ★";
// Set current theme to the top
@@ -101,7 +76,7 @@ namespace Flow.Launcher.Plugin.Sys
Score = score,
Action = c =>
{
- SelectedTheme = theme;
+ _context.API.SetCurrentTheme(theme);
_context.API.ReQuery();
return false;
}
From 1611ad37f37fde5ac054529cfa3a136e28fa3168 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:15:47 +0800
Subject: [PATCH 0573/1442] Fix ThemeData hashcode issue
---
Flow.Launcher.Plugin/ThemeData.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Plugin/ThemeData.cs b/Flow.Launcher.Plugin/ThemeData.cs
index d4a69ef09..6cbd0fe74 100644
--- a/Flow.Launcher.Plugin/ThemeData.cs
+++ b/Flow.Launcher.Plugin/ThemeData.cs
@@ -1,4 +1,6 @@
-namespace Flow.Launcher.Plugin;
+using System;
+
+namespace Flow.Launcher.Plugin;
///
/// Theme data model
@@ -60,7 +62,7 @@ public class ThemeData
///
public override int GetHashCode()
{
- return Name?.GetHashCode() ?? 0;
+ return HashCode.Combine(FileNameWithoutExtension, Name);
}
///
From 514fa0037a0f0ad6b78ad6ae17d943764cf696c7 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:23:07 +0800
Subject: [PATCH 0574/1442] Improve documents
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Plugin/ThemeData.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/ThemeData.cs b/Flow.Launcher.Plugin/ThemeData.cs
index 6cbd0fe74..90a45182c 100644
--- a/Flow.Launcher.Plugin/ThemeData.cs
+++ b/Flow.Launcher.Plugin/ThemeData.cs
@@ -23,7 +23,7 @@ public class ThemeData
public bool? IsDark { get; private init; }
///
- /// Theme file path
+ /// Indicates whether the theme supports blur effects
///
public bool? HasBlur { get; private init; }
From 28d92c789f181acb2060f7ff0b1c9f226bdb4905 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:23:36 +0800
Subject: [PATCH 0575/1442] Improve documents
---
Flow.Launcher.Plugin/ThemeData.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/ThemeData.cs b/Flow.Launcher.Plugin/ThemeData.cs
index 90a45182c..1888be65e 100644
--- a/Flow.Launcher.Plugin/ThemeData.cs
+++ b/Flow.Launcher.Plugin/ThemeData.cs
@@ -18,7 +18,7 @@ public class ThemeData
public string Name { get; private init; }
///
- /// Theme file path
+ /// Indicates whether the theme supports dark mode
///
public bool? IsDark { get; private init; }
From 2e885ea5ccec4a42de61e1d1fe6ced1e319656ce Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 4 Apr 2025 20:45:24 +0800
Subject: [PATCH 0576/1442] Remove useless variable
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 84bfa218e..4b99efe3b 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -38,7 +38,6 @@ namespace Flow.Launcher.Plugin.Sys
private Result CreateThemeResult(ThemeData theme, ThemeData selectedTheme, int score, IList highlightData)
{
- var themeName = theme.FileNameWithoutExtension;
string title;
if (theme == selectedTheme)
{
From a65e89b86fbe3e1134c1a098f9af85ed4ea8bf71 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 5 Apr 2025 01:06:06 +0900
Subject: [PATCH 0577/1442] Adjust advanced control UI
---
.../SettingsPanePluginsViewModel.cs | 22 +++++
.../Views/SettingsPaneGeneral.xaml | 21 ++++
.../Views/SettingsPanePlugins.xaml | 97 +++++++++++++------
.../Views/SettingsPanePlugins.xaml.cs | 9 ++
4 files changed, 117 insertions(+), 32 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 5cd14ba7e..69d31a98d 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -14,6 +14,28 @@ public class SettingsPanePluginsViewModel : BaseModel
{
private readonly Settings _settings;
+ public void UpdateDisplayModeFromSelection()
+ {
+ switch (CurrentDisplayMode)
+ {
+ case "OnOff":
+ IsOnOffSelected = true;
+ IsPrioritySelected = false;
+ IsSearchDelaySelected = false;
+ break;
+ case "Priority":
+ IsOnOffSelected = false;
+ IsPrioritySelected = true;
+ IsSearchDelaySelected = false;
+ break;
+ case "SearchDelay":
+ IsOnOffSelected = false;
+ IsPrioritySelected = false;
+ IsSearchDelaySelected = true;
+ break;
+ }
+ }
+
private bool _isOnOffSelected = true;
public bool IsOnOffSelected
{
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 3f8272dda..e36c647a2 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -196,6 +196,27 @@
+
+
+
+
+
+
+
+
+
@@ -34,34 +34,35 @@
Text="{DynamicResource plugins}"
TextAlignment="Left" />
-
+
+
-
+
+
+
+
+
-
+ Margin="0 0 20 0"
+ Content="?"
+ FontSize="14" />
+
+
+
-
-
+
+
Date: Sat, 5 Apr 2025 01:46:47 +0900
Subject: [PATCH 0578/1442] - Add strings - Adjust combobox
---
Flow.Launcher/Languages/en.xaml | 4 ++++
.../SettingsPanePluginsViewModel.cs | 17 ++++++++++++-
.../Views/SettingsPanePlugins.xaml | 24 ++++++++++++-------
3 files changed, 35 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 24ab3cf94..b869a82e1 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -134,6 +134,10 @@
Change Action KeywordsPlugin seach delay timeChange Plugin Seach Delay Time
+ Advanced Settings:
+ Enabled
+ Priority
+ Search DelayCurrent PriorityNew PriorityPriority
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 69d31a98d..5d55e8e2f 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -14,9 +14,24 @@ public class SettingsPanePluginsViewModel : BaseModel
{
private readonly Settings _settings;
+ private string _selectedDisplayMode = "OnOff";
+ public string SelectedDisplayMode
+ {
+ get => _selectedDisplayMode;
+ set
+ {
+ if (_selectedDisplayMode != value)
+ {
+ _selectedDisplayMode = value;
+ OnPropertyChanged(nameof(SelectedDisplayMode));
+ UpdateDisplayModeFromSelection();
+ }
+ }
+ }
+
public void UpdateDisplayModeFromSelection()
{
- switch (CurrentDisplayMode)
+ switch (SelectedDisplayMode)
{
case "OnOff":
IsOnOffSelected = true;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index 23ec6d242..bfab94f20 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -43,25 +43,31 @@
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource Color15B}"
- Text="Advanced Settings:" />
+ Text="{DynamicResource FilterComboboxLabel}" />
-
-
-
+
+
+
+
+
+
+
+
+
Date: Sat, 5 Apr 2025 02:28:07 +0900
Subject: [PATCH 0579/1442] Remove Delay item in plugin setting page layout
---
.../Resources/Controls/InstalledPluginDisplay.xaml | 6 +++---
Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index cb1d8dbc4..a524dd7cb 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -102,12 +102,12 @@
@@ -143,7 +143,7 @@
-
+
Date: Sat, 5 Apr 2025 05:28:38 +0900
Subject: [PATCH 0580/1442] Add help window with content dialogue style
---
.../Resources/CustomControlTemplate.xaml | 54 ++++++++++---------
Flow.Launcher/Resources/Dark.xaml | 2 +-
.../SettingsPanePluginsViewModel.cs | 3 +-
.../Views/SettingsPanePlugins.xaml | 2 +-
.../Views/SettingsPanePlugins.xaml.cs | 49 ++++++++++++++++-
5 files changed, 79 insertions(+), 31 deletions(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index aeb8f872f..31e9d1f13 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -3523,8 +3523,8 @@
-
-
-
-
- -->
-
-
-
+ Visibility="{Binding DataContext.IsPrioritySelected, RelativeSource={RelativeSource AncestorType=ListBox}, Converter={StaticResource BooleanToVisibilityConverter}}">
+ Margin="0 0 8 0"
+ VerticalAlignment="Center"
+ FontSize="13"
+ Foreground="{DynamicResource Color08B}"
+ Text="{DynamicResource priority}"
+ ToolTip="{DynamicResource priorityToolTip}" />
+ SpinButtonPlacementMode="Inline"
+ ToolTip="{DynamicResource priorityToolTip}" />
+ Orientation="Horizontal"
+ Visibility="{Binding DataContext.IsSearchDelaySelected, RelativeSource={RelativeSource AncestorType=ListBox}, Converter={StaticResource BooleanToVisibilityConverter}}">
-
+ Text="{DynamicResource searchDelay}"
+ ToolTip="{DynamicResource searchDelayToolTip}" />
+
+
-
+ Visibility="{Binding DataContext.IsOnOffSelected, RelativeSource={RelativeSource AncestorType=ListBox}, Converter={StaticResource BooleanToVisibilityConverter}}" />
+
@@ -148,8 +104,6 @@
-
-
-
+
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 754b15989..af1653c93 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -19,8 +19,13 @@ public partial class SettingsPanePluginsViewModel : BaseModel
{
private readonly Settings _settings;
- private string _selectedDisplayMode = "OnOff";
- public string SelectedDisplayMode
+ public class DisplayModeData : DropdownDataGeneric { }
+
+ public List DisplayModes { get; } =
+ DropdownDataGeneric.GetValues("DisplayMode");
+
+ private DisplayMode _selectedDisplayMode = DisplayMode.OnOff;
+ public DisplayMode SelectedDisplayMode
{
get => _selectedDisplayMode;
set
@@ -28,34 +33,12 @@ public partial class SettingsPanePluginsViewModel : BaseModel
if (_selectedDisplayMode != value)
{
_selectedDisplayMode = value;
- OnPropertyChanged(nameof(SelectedDisplayMode));
+ OnPropertyChanged();
UpdateDisplayModeFromSelection();
}
}
}
- public void UpdateDisplayModeFromSelection()
- {
- switch (SelectedDisplayMode)
- {
- case "OnOff":
- IsOnOffSelected = true;
- IsPrioritySelected = false;
- IsSearchDelaySelected = false;
- break;
- case "Priority":
- IsOnOffSelected = false;
- IsPrioritySelected = true;
- IsSearchDelaySelected = false;
- break;
- case "SearchDelay":
- IsOnOffSelected = false;
- IsPrioritySelected = false;
- IsSearchDelaySelected = true;
- break;
- }
- }
-
private bool _isOnOffSelected = true;
public bool IsOnOffSelected
{
@@ -65,8 +48,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
if (_isOnOffSelected != value)
{
_isOnOffSelected = value;
- OnPropertyChanged(nameof(IsOnOffSelected));
- UpdateDisplayMode();
+ OnPropertyChanged();
}
}
}
@@ -80,8 +62,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
if (_isPrioritySelected != value)
{
_isPrioritySelected = value;
- OnPropertyChanged(nameof(IsPrioritySelected));
- UpdateDisplayMode();
+ OnPropertyChanged();
}
}
}
@@ -95,38 +76,15 @@ public partial class SettingsPanePluginsViewModel : BaseModel
if (_isSearchDelaySelected != value)
{
_isSearchDelaySelected = value;
- OnPropertyChanged(nameof(IsSearchDelaySelected));
- UpdateDisplayMode();
+ OnPropertyChanged();
}
}
}
- private string _currentDisplayMode = "OnOff";
- public string CurrentDisplayMode
- {
- get => _currentDisplayMode;
- set
- {
- if (_currentDisplayMode != value)
- {
- _currentDisplayMode = value;
- OnPropertyChanged(nameof(CurrentDisplayMode));
- }
- }
- }
-
- private void UpdateDisplayMode()
- {
- if (IsOnOffSelected)
- CurrentDisplayMode = "OnOff";
- else if (IsPrioritySelected)
- CurrentDisplayMode = "Priority";
- else if (IsSearchDelaySelected)
- CurrentDisplayMode = "SearchDelay";
- }
public SettingsPanePluginsViewModel(Settings settings)
{
_settings = settings;
+ UpdateEnumDropdownLocalizations();
}
public string FilterText { get; set; } = string.Empty;
@@ -196,4 +154,38 @@ public partial class SettingsPanePluginsViewModel : BaseModel
await helpDialog.ShowAsync();
}
+
+ private void UpdateEnumDropdownLocalizations()
+ {
+ DropdownDataGeneric.UpdateLabels(DisplayModes);
+ }
+
+ private void UpdateDisplayModeFromSelection()
+ {
+ switch (SelectedDisplayMode)
+ {
+ case DisplayMode.Priority:
+ IsOnOffSelected = false;
+ IsPrioritySelected = true;
+ IsSearchDelaySelected = false;
+ break;
+ case DisplayMode.SearchDelay:
+ IsOnOffSelected = false;
+ IsPrioritySelected = false;
+ IsSearchDelaySelected = true;
+ break;
+ default:
+ IsOnOffSelected = true;
+ IsPrioritySelected = false;
+ IsSearchDelaySelected = false;
+ break;
+ }
+ }
+}
+
+public enum DisplayMode
+{
+ OnOff,
+ Priority,
+ SearchDelay
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index 5498b293c..f9f708314 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -3,7 +3,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
- xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
@@ -16,10 +15,6 @@
FocusManager.FocusedElement="{Binding ElementName=PluginFilterTextbox}"
KeyDown="SettingsPanePlugins_OnKeyDown"
mc:Ignorable="d">
-
-
-
-
@@ -53,19 +48,10 @@
Margin="0 0 4 0"
HorizontalContentAlignment="Left"
Background="{DynamicResource Color00B}"
+ DisplayMemberPath="Display"
+ ItemsSource="{Binding DisplayModes}"
SelectedValue="{Binding SelectedDisplayMode, Mode=TwoWay}"
- SelectedValuePath="Tag"
- SelectionChanged="DisplayModeComboBox_SelectionChanged">
-
-
-
-
-
-
-
-
-
-
+ SelectedValuePath="Value" />
IsExpanded ? _bottomPart1 ??= new InstalledPluginDisplayKeyword() : null;
private Control _bottomPart2;
- public Control BottomPart2 => IsExpanded ? _bottomPart2 ??= new InstalledPluginSearchDelay() : null;
-
- private Control _bottomPart3;
- public Control BottomPart3 => IsExpanded ? _bottomPart3 ??= new InstalledPluginDisplayBottomData() : null;
+ public Control BottomPart2 => IsExpanded ? _bottomPart2 ??= new InstalledPluginDisplayBottomData() : null;
public bool HasSettingControl => PluginPair.Plugin is ISettingProvider &&
(PluginPair.Plugin is not JsonRPCPluginBase jsonRPCPluginBase || jsonRPCPluginBase.NeedCreateSettingPanel());
From dc7b81207761aeddea4b2aed07bbd5ffc12789be Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 7 Apr 2025 14:16:17 +0800
Subject: [PATCH 0600/1442] Change search delay time to int & Improve code
quality & Improve strings
---
.../UserSettings/PluginSettings.cs | 5 +-
.../UserSettings/Settings.cs | 6 +-
Flow.Launcher.Plugin/PluginMetadata.cs | 5 +-
Flow.Launcher.Plugin/SearchDelayTime.cs | 32 ----
Flow.Launcher/Languages/en.xaml | 4 +-
.../Controls/InstalledPluginDisplay.xaml | 7 +-
.../Controls/InstalledPluginSearchDelay.xaml | 49 -------
.../InstalledPluginSearchDelay.xaml.cs | 11 --
.../InstalledPluginSearchDelayCombobox.xaml | 39 -----
...InstalledPluginSearchDelayCombobox.xaml.cs | 84 -----------
Flow.Launcher/SearchDelayTimeWindow.xaml | 138 ------------------
Flow.Launcher/SearchDelayTimeWindow.xaml.cs | 57 --------
.../SettingsPaneGeneralViewModel.cs | 34 +++--
.../Views/SettingsPaneGeneral.xaml | 17 ++-
Flow.Launcher/ViewModel/MainViewModel.cs | 10 +-
Flow.Launcher/ViewModel/PluginViewModel.cs | 9 +-
.../plugin.json | 2 +-
17 files changed, 52 insertions(+), 457 deletions(-)
delete mode 100644 Flow.Launcher.Plugin/SearchDelayTime.cs
delete mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
delete mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml.cs
delete mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
delete mode 100644 Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
delete mode 100644 Flow.Launcher/SearchDelayTimeWindow.xaml
delete mode 100644 Flow.Launcher/SearchDelayTimeWindow.xaml.cs
diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
index da92a3583..7fb9b895a 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
@@ -120,10 +120,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public int Priority { get; set; }
[JsonIgnore]
- public SearchDelayTime? DefaultSearchDelayTime { get; set; }
+ public int? DefaultSearchDelayTime { get; set; }
- [JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelayTime? SearchDelayTime { get; set; }
+ public int? SearchDelayTime { get; set; }
///
/// Used only to save the state of the plugin in settings
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 6cb20d12f..d89340e19 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -322,8 +322,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool SearchQueryResultsWithDelay { get; set; }
- [JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelayTime SearchDelayTime { get; set; } = SearchDelayTime.Normal;
+ [JsonIgnore]
+ public IEnumerable SearchDelayTimeRange = new List { 50, 100, 150, 200, 250, 300, 350, 400, 450, 500 };
+
+ public int SearchDelayTime { get; set; } = 150;
[JsonConverter(typeof(JsonStringEnumConverter))]
public SearchWindowScreens SearchWindowScreen { get; set; } = SearchWindowScreens.Cursor;
diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs
index 1496765ce..da10bc6a5 100644
--- a/Flow.Launcher.Plugin/PluginMetadata.cs
+++ b/Flow.Launcher.Plugin/PluginMetadata.cs
@@ -99,10 +99,9 @@ namespace Flow.Launcher.Plugin
public bool HideActionKeywordPanel { get; set; }
///
- /// Plugin search delay time. Null means use default search delay time.
+ /// Plugin search delay time in ms. Null means use default search delay time.
///
- [JsonConverter(typeof(JsonStringEnumConverter))]
- public SearchDelayTime? SearchDelayTime { get; set; } = null;
+ public int? SearchDelayTime { get; set; } = null;
///
/// Plugin icon path.
diff --git a/Flow.Launcher.Plugin/SearchDelayTime.cs b/Flow.Launcher.Plugin/SearchDelayTime.cs
deleted file mode 100644
index ae1daabe0..000000000
--- a/Flow.Launcher.Plugin/SearchDelayTime.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-namespace Flow.Launcher.Plugin;
-
-///
-/// Enum for search delay time
-///
-public enum SearchDelayTime
-{
- ///
- /// Very long search delay time. 250ms.
- ///
- VeryLong,
-
- ///
- /// Long search delay time. 200ms.
- ///
- Long,
-
- ///
- /// Normal search delay time. 150ms. Default value.
- ///
- Normal,
-
- ///
- /// Short search delay time. 100ms.
- ///
- Short,
-
- ///
- /// Very short search delay time. 50ms.
- ///
- VeryShort
-}
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 78486dad4..5d9b16e0b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -380,9 +380,7 @@
Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.Custom Query Hotkey
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 615904d66..5ba011fed 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -85,7 +85,12 @@
Foreground="{DynamicResource Color08B}"
Text="{DynamicResource searchDelay}"
ToolTip="{DynamicResource searchDelayToolTip}" />
-
+
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
deleted file mode 100644
index 0fd98bfac..000000000
--- a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml.cs
deleted file mode 100644
index ad9284074..000000000
--- a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelay.xaml.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Windows.Controls;
-
-namespace Flow.Launcher.Resources.Controls;
-
-public partial class InstalledPluginSearchDelay : UserControl
-{
- public InstalledPluginSearchDelay()
- {
- InitializeComponent();
- }
-}
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
deleted file mode 100644
index b379b875f..000000000
--- a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
deleted file mode 100644
index 649913872..000000000
--- a/Flow.Launcher/Resources/Controls/InstalledPluginSearchDelayCombobox.xaml.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-using System.Collections.Generic;
-using System.Windows.Controls;
-using Flow.Launcher.Plugin;
-
-namespace Flow.Launcher.Resources.Controls
-{
- public partial class InstalledPluginSearchDelayCombobox
- {
- public InstalledPluginSearchDelayCombobox()
- {
- InitializeComponent();
- LoadDelayOptions();
- Loaded += InstalledPluginSearchDelayCombobox_Loaded;
- }
-
- private void InstalledPluginSearchDelayCombobox_Loaded(object sender, System.Windows.RoutedEventArgs e)
- {
- if (DataContext is ViewModel.PluginViewModel viewModel)
- {
- // 초기 값 설정
- int currentDelayMs = GetCurrentDelayMs(viewModel);
- foreach (DelayOption option in cbDelay.Items)
- {
- if (option.Value == currentDelayMs)
- {
- cbDelay.SelectedItem = option;
- break;
- }
- }
- }
- }
-
- private int GetCurrentDelayMs(ViewModel.PluginViewModel viewModel)
- {
- // SearchDelayTime enum 값을 int로 변환
- SearchDelayTime? delayTime = viewModel.PluginPair.Metadata.SearchDelayTime;
- if (delayTime.HasValue)
- {
- return (int)delayTime.Value;
- }
- return 0; // 기본값
- }
-
- private void LoadDelayOptions()
- {
- // 검색 지연 시간 옵션들 (SearchDelayTime enum 값에 맞춰야 함)
- var delayOptions = new List
- {
- new DelayOption { Display = "0 ms", Value = 0 },
- new DelayOption { Display = "50 ms", Value = 50 },
- new DelayOption { Display = "100 ms", Value = 100 },
- new DelayOption { Display = "150 ms", Value = 150 },
- new DelayOption { Display = "200 ms", Value = 200 },
- new DelayOption { Display = "250 ms", Value = 250 },
- new DelayOption { Display = "300 ms", Value = 300 },
- new DelayOption { Display = "350 ms", Value = 350 },
- new DelayOption { Display = "400 ms", Value = 400 },
- new DelayOption { Display = "450 ms", Value = 450 },
- new DelayOption { Display = "500 ms", Value = 500 },
- };
-
- cbDelay.ItemsSource = delayOptions;
- }
-
- private void CbDelay_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (DataContext is ViewModel.PluginViewModel viewModel && cbDelay.SelectedItem is DelayOption selectedOption)
- {
- // int 값을 SearchDelayTime enum으로 변환
- int delayValue = selectedOption.Value;
- viewModel.PluginPair.Metadata.SearchDelayTime = (SearchDelayTime)delayValue;
-
- // 설정 저장
- //How to save?
- }
- }
- }
-
- public class DelayOption
- {
- public string Display { get; set; }
- public int Value { get; set; }
- }
-}
diff --git a/Flow.Launcher/SearchDelayTimeWindow.xaml b/Flow.Launcher/SearchDelayTimeWindow.xaml
deleted file mode 100644
index 1c7ca58d0..000000000
--- a/Flow.Launcher/SearchDelayTimeWindow.xaml
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs b/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
deleted file mode 100644
index 4a3c9f5a7..000000000
--- a/Flow.Launcher/SearchDelayTimeWindow.xaml.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System.Linq;
-using System.Windows;
-using Flow.Launcher.Plugin;
-using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.ViewModel;
-using static Flow.Launcher.SettingPages.ViewModels.SettingsPaneGeneralViewModel;
-
-namespace Flow.Launcher;
-
-public partial class SearchDelayTimeWindow : Window
-{
- private readonly PluginViewModel _pluginViewModel;
-
- public SearchDelayTimeWindow(PluginViewModel pluginViewModel)
- {
- InitializeComponent();
- _pluginViewModel = pluginViewModel;
- }
-
- private void SearchDelayTimeWindow_OnLoaded(object sender, RoutedEventArgs e)
- {
- tbSearchDelayTimeTips.Text = string.Format(App.API.GetTranslation("searchDelayTime_tips"),
- App.API.GetTranslation("default"));
- tbOldSearchDelayTime.Text = _pluginViewModel.SearchDelayTimeText;
- var searchDelayTimes = DropdownDataGeneric.GetValues("SearchDelayTime");
- SearchDelayTimeData selected = null;
- // Because default value is SearchDelayTime.VeryShort, we need to get selected value before adding default value
- if (_pluginViewModel.PluginSearchDelayTime != null)
- {
- selected = searchDelayTimes.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelayTime);
- }
- // Add default value to the beginning of the list
- // When _pluginViewModel.PluginSearchDelayTime equals null, we will select this
- searchDelayTimes.Insert(0, new SearchDelayTimeData { Display = App.API.GetTranslation("default"), LocalizationKey = "default" });
- selected ??= searchDelayTimes.FirstOrDefault();
- cbDelay.ItemsSource = searchDelayTimes;
- cbDelay.SelectedItem = selected;
- cbDelay.Focus();
- }
-
- private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
- {
- Close();
- }
-
- private void btnDone_OnClick(object sender, RoutedEventArgs _)
- {
- // Update search delay time
- var selected = cbDelay.SelectedItem as SearchDelayTimeData;
- SearchDelayTime? changedValue = selected?.LocalizationKey != "default" ? selected.Value : null;
- _pluginViewModel.PluginSearchDelayTime = changedValue;
-
- // Update search delay time text and close window
- _pluginViewModel.OnSearchDelayTimeChanged();
- Close();
- }
-}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index cec8c318c..74e2d8340 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
+using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
@@ -31,7 +32,25 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public class SearchWindowAlignData : DropdownDataGeneric { }
public class SearchPrecisionData : DropdownDataGeneric { }
public class LastQueryModeData : DropdownDataGeneric { }
- public class SearchDelayTimeData : DropdownDataGeneric { }
+ public class SearchDelayTimeData
+ {
+ public string Display { get; set; }
+ public int Value { get; set; }
+
+ public static List GetValues()
+ {
+ var settings = Ioc.Default.GetRequiredService();
+ var data = new List();
+
+ foreach (var value in settings.SearchDelayTimeRange)
+ {
+ var display = $"{value}ms";
+ data.Add(new SearchDelayTimeData { Display = display, Value = value });
+ }
+
+ return data;
+ }
+ }
public bool StartFlowLauncherOnSystemStartup
{
@@ -144,19 +163,15 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public List LastQueryModes { get; } =
DropdownDataGeneric.GetValues("LastQuery");
- public List SearchDelayTimes { get; } =
- DropdownDataGeneric.GetValues("SearchDelayTime");
+ public List SearchDelayTimes { get; } = SearchDelayTimeData.GetValues();
public SearchDelayTimeData SearchDelayTime
{
- get => SearchDelayTimes.FirstOrDefault(x => x.Value == Settings.SearchDelayTime) ??
- SearchDelayTimes.FirstOrDefault(x => x.Value == Plugin.SearchDelayTime.Normal) ??
- SearchDelayTimes.FirstOrDefault();
+ get => SearchDelayTimes.FirstOrDefault(x => x.Value == Settings.SearchDelayTime);
set
{
- if (value == null)
- return;
-
+ if (value == null) return;
+
if (Settings.SearchDelayTime != value.Value)
{
Settings.SearchDelayTime = value.Value;
@@ -170,7 +185,6 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
DropdownDataGeneric.UpdateLabels(SearchWindowAligns);
DropdownDataGeneric.UpdateLabels(SearchPrecisionScores);
DropdownDataGeneric.UpdateLabels(LastQueryModes);
- DropdownDataGeneric.UpdateLabels(SearchDelayTimes);
}
public string Language
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index e36c647a2..10e2b549a 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -196,18 +196,21 @@
-
+
-
-
+ Sub="{DynamicResource searchDelayTimeToolTip}"
+ Type="InsideFit">
-
+
250,
- SearchDelayTime.Long => 200,
- SearchDelayTime.Normal => 150,
- SearchDelayTime.Short => 100,
- SearchDelayTime.VeryShort => 50,
- _ => 150
- };
+ var searchDelayTime = plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime;
await Task.Delay(searchDelayTime, token);
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 2016d9c98..bf61b1902 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -95,7 +95,7 @@ namespace Flow.Launcher.ViewModel
}
}
- public SearchDelayTime? PluginSearchDelayTime
+ public int? PluginSearchDelayTime
{
get => PluginPair.Metadata.SearchDelayTime;
set
@@ -192,12 +192,5 @@ namespace Flow.Launcher.ViewModel
var changeKeywordsWindow = new ActionKeywords(this);
changeKeywordsWindow.ShowDialog();
}
-
- [RelayCommand]
- private void SetSearchDelayTime()
- {
- var searchDelayTimeWindow = new SearchDelayTimeWindow(this);
- searchDelayTimeWindow.ShowDialog();
- }
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
index 64681f803..c8b6310a7 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json
@@ -32,5 +32,5 @@
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll",
"IcoPath": "Images\\web_search.png",
- "SearchDelayTime": "VeryLong"
+ "SearchDelayTime": 450
}
From dfb6b0a3a300386fe668148d0429de9db7ea9b3a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 7 Apr 2025 14:26:35 +0800
Subject: [PATCH 0601/1442] Fix string resource issue
---
.../SettingPages/ViewModels/SettingsPanePluginsViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index af1653c93..46e398eb5 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -141,7 +141,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
},
new TextBlock
{
- Text = (string)Application.Current.Resources["searchDelayTime_tips"],
+ Text = (string)Application.Current.Resources["searchDelayTimeTips"],
TextWrapping = TextWrapping.Wrap
}
}
From 24bbfcc4139596ac6d3929da44e353508f426974 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 7 Apr 2025 14:27:33 +0800
Subject: [PATCH 0602/1442] Support numerical box for priority
---
Flow.Launcher/PriorityChangeWindow.xaml | 121 ------------------
Flow.Launcher/PriorityChangeWindow.xaml.cs | 67 ----------
.../Controls/InstalledPluginDisplay.xaml | 3 +-
Flow.Launcher/ViewModel/PluginViewModel.cs | 20 +--
4 files changed, 4 insertions(+), 207 deletions(-)
delete mode 100644 Flow.Launcher/PriorityChangeWindow.xaml
delete mode 100644 Flow.Launcher/PriorityChangeWindow.xaml.cs
diff --git a/Flow.Launcher/PriorityChangeWindow.xaml b/Flow.Launcher/PriorityChangeWindow.xaml
deleted file mode 100644
index 33ed54bb4..000000000
--- a/Flow.Launcher/PriorityChangeWindow.xaml
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs
deleted file mode 100644
index fbe2a941d..000000000
--- a/Flow.Launcher/PriorityChangeWindow.xaml.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using Flow.Launcher.Core.Plugin;
-using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Plugin;
-using Flow.Launcher.ViewModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using Flow.Launcher.Core;
-
-namespace Flow.Launcher
-{
- ///
- /// Interaction Logic of PriorityChangeWindow.xaml
- ///
- public partial class PriorityChangeWindow : Window
- {
- private readonly PluginPair plugin;
- private readonly Internationalization translater = InternationalizationManager.Instance;
- private readonly PluginViewModel pluginViewModel;
- public PriorityChangeWindow(string pluginId, PluginViewModel pluginViewModel)
- {
- InitializeComponent();
- plugin = PluginManager.GetPluginForId(pluginId);
- this.pluginViewModel = pluginViewModel;
- if (plugin == null)
- {
- App.API.ShowMsgBox(translater.GetTranslation("cannotFindSpecifiedPlugin"));
- Close();
- }
- }
-
- private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
- {
- Close();
- }
-
- private void btnDone_OnClick(object sender, RoutedEventArgs e)
- {
- if (int.TryParse(tbAction.Text.Trim(), out var newPriority))
- {
- pluginViewModel.ChangePriority(newPriority);
- Close();
- }
- else
- {
- string msg = translater.GetTranslation("invalidPriority");
- App.API.ShowMsgBox(msg);
- }
-
- }
-
- private void PriorityChangeWindow_Loaded(object sender, RoutedEventArgs e)
- {
- tbAction.Text = pluginViewModel.Priority.ToString();
- tbAction.Focus();
- }
- private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
- {
- TextBox textBox = Keyboard.FocusedElement as TextBox;
- if (textBox != null)
- {
- TraversalRequest tRequest = new TraversalRequest(FocusNavigationDirection.Next);
- textBox.MoveFocus(tRequest);
- }
- }
- }
-}
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 5ba011fed..778f00160 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -70,7 +70,8 @@
Maximum="999"
Minimum="-999"
SpinButtonPlacementMode="Inline"
- ToolTip="{DynamicResource priorityToolTip}" />
+ ToolTip="{DynamicResource priorityToolTip}"
+ Value="{Binding Priority, Mode=TwoWay}" />
PluginPair.Metadata.Priority;
set
{
- if (PluginPair.Metadata.Priority != value)
- {
- ChangePriority(value);
- }
+ PluginPair.Metadata.Priority = value;
+ PluginSettingsObject.Priority = value;
}
}
@@ -151,20 +149,6 @@ namespace Flow.Launcher.ViewModel
OnPropertyChanged(nameof(SearchDelayTimeText));
}
- public void ChangePriority(int newPriority)
- {
- PluginPair.Metadata.Priority = newPriority;
- PluginSettingsObject.Priority = newPriority;
- OnPropertyChanged(nameof(Priority));
- }
-
- [RelayCommand]
- private void EditPluginPriority()
- {
- var priorityChangeWindow = new PriorityChangeWindow(PluginPair. Metadata.ID, this);
- priorityChangeWindow.ShowDialog();
- }
-
[RelayCommand]
private void OpenPluginDirectory()
{
From 67268284e0e4ae612a5395973a58b6674b203c4f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 7 Apr 2025 14:40:27 +0800
Subject: [PATCH 0603/1442] Support numerical box for search delay
---
.../Controls/InstalledPluginDisplay.xaml | 3 ++-
Flow.Launcher/ViewModel/PluginViewModel.cs | 18 ++++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 778f00160..f57c0e2d9 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -91,7 +91,8 @@
Maximum="1000"
Minimum="0"
SpinButtonPlacementMode="Inline"
- ToolTip="{DynamicResource searchDelayToolTip}" />
+ ToolTip="{DynamicResource searchDelayToolTip}"
+ Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 22a69592b..2dff72ac5 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -93,13 +93,23 @@ namespace Flow.Launcher.ViewModel
}
}
- public int? PluginSearchDelayTime
+ public double PluginSearchDelayTime
{
- get => PluginPair.Metadata.SearchDelayTime;
+ get => PluginPair.Metadata.SearchDelayTime == null ?
+ double.NaN :
+ PluginPair.Metadata.SearchDelayTime.Value;
set
{
- PluginPair.Metadata.SearchDelayTime = value;
- PluginSettingsObject.SearchDelayTime = value;
+ if (double.IsNaN(value))
+ {
+ PluginPair.Metadata.SearchDelayTime = null;
+ PluginSettingsObject.SearchDelayTime = null;
+ }
+ else
+ {
+ PluginPair.Metadata.SearchDelayTime = (int)value;
+ PluginSettingsObject.SearchDelayTime = (int)value;
+ }
}
}
From 5c09598f213f3eb4af993364d55e95f48b4a8f8a Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 7 Apr 2025 15:47:40 +0900
Subject: [PATCH 0604/1442] Add Infobar strings for korean
---
Flow.Launcher/Languages/en.xaml | 10 ++++++++++
.../SettingPages/Views/SettingsPaneGeneral.xaml | 10 +++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 24ab3cf94..3de278eca 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -116,6 +116,16 @@
NormalShortVery short
+ Information for Korean IME user
+
+ You're using the Korean language! The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+ If you experience any problems, you may need to enable compatibility mode for the Korean IME.
+ Open Setting in Windows 11 and go to:
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+ and enable "Use previous version of Microsoft IME".
+ You can open the relevant menu using the option below, or change the setting directly without manually opening the settings page.
+
+ Very shortSearch Plugin
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 91f648586..431293a50 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -56,12 +56,12 @@
Message="This is a success message."
Type="Error" />
+ IsIconVisible="True"
+ Length="Long"
+ Message="{DynamicResource KoreanImeGuide}"
+ Type="Warning" />
Date: Mon, 7 Apr 2025 14:54:09 +0800
Subject: [PATCH 0605/1442] Force priority to 0 when inputing empty
---
.../Resources/Controls/InstalledPluginDisplay.xaml | 1 +
.../Controls/InstalledPluginDisplay.xaml.cs | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index f57c0e2d9..ece66034c 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -71,6 +71,7 @@
Minimum="-999"
SpinButtonPlacementMode="Inline"
ToolTip="{DynamicResource priorityToolTip}"
+ ValueChanged="NumberBox_OnValueChanged"
Value="{Binding Priority, Mode=TwoWay}" />
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
index dfa03a204..ab9496266 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
@@ -1,4 +1,6 @@
-namespace Flow.Launcher.Resources.Controls;
+using ModernWpf.Controls;
+
+namespace Flow.Launcher.Resources.Controls;
public partial class InstalledPluginDisplay
{
@@ -6,4 +8,12 @@ public partial class InstalledPluginDisplay
{
InitializeComponent();
}
+
+ private void NumberBox_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
+ {
+ if (double.IsNaN(args.NewValue))
+ {
+ sender.Value = 0;
+ }
+ }
}
From e955e47e5fafcf54b6aa651dcc04db7ed9355523 Mon Sep 17 00:00:00 2001
From: DB p
Date: Mon, 7 Apr 2025 22:47:39 +0900
Subject: [PATCH 0606/1442] - Change combobox to numberbox - Adjust Numberbox
Style - Add small change value(10) - Adjust strings
---
.../UserSettings/Settings.cs | 4 ---
Flow.Launcher/Languages/en.xaml | 10 ++----
.../Controls/InstalledPluginDisplay.xaml | 7 ++--
.../Resources/CustomControlTemplate.xaml | 28 ++++++++++-----
.../SettingsPaneGeneralViewModel.cs | 35 +++++--------------
.../SettingsPanePluginsViewModel.cs | 4 +--
.../Views/SettingsPaneGeneral.xaml | 17 +++++----
7 files changed, 49 insertions(+), 56 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index d89340e19..e304a1b50 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -321,10 +321,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool HideWhenDeactivated { get; set; } = true;
public bool SearchQueryResultsWithDelay { get; set; }
-
- [JsonIgnore]
- public IEnumerable SearchDelayTimeRange = new List { 50, 100, 150, 200, 250, 300, 350, 400, 450, 500 };
-
public int SearchDelayTime { get; set; } = 150;
[JsonConverter(typeof(JsonStringEnumConverter))]
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 5d9b16e0b..f01d0575a 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -108,14 +108,10 @@
Always open preview panel when Flow activates. Press {0} to toggle preview.Shadow effect is not allowed while current theme has blur effect enabledSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ DefaultSearch Plugin
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index ece66034c..9a4e3b7b0 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -88,12 +88,15 @@
Text="{DynamicResource searchDelay}"
ToolTip="{DynamicResource searchDelayToolTip}" />
+ Value="{Binding PluginSearchDelayTime, Mode=TwoWay}">
+
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index b51e5fec0..157910b4a 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -1503,7 +1503,7 @@
-
+
@@ -2689,10 +2689,20 @@
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
ui:ValidationHelper.IsTemplateValidationAdornerSite="True"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
+ Background="{DynamicResource CustomTextBoxBG}"
+ BorderBrush="{DynamicResource CustomTextBoxOutline}"
+ BorderThickness="{DynamicResource CustomTextBoxOutlineThickness}"
+ CornerRadius="4">
+
+
-
+
@@ -2788,8 +2798,10 @@
-
-
+
+
+
+
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 74e2d8340..35dbab647 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -32,25 +32,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public class SearchWindowAlignData : DropdownDataGeneric { }
public class SearchPrecisionData : DropdownDataGeneric { }
public class LastQueryModeData : DropdownDataGeneric { }
- public class SearchDelayTimeData
- {
- public string Display { get; set; }
- public int Value { get; set; }
-
- public static List GetValues()
- {
- var settings = Ioc.Default.GetRequiredService();
- var data = new List();
-
- foreach (var value in settings.SearchDelayTimeRange)
- {
- var display = $"{value}ms";
- data.Add(new SearchDelayTimeData { Display = display, Value = value });
- }
-
- return data;
- }
- }
+
public bool StartFlowLauncherOnSystemStartup
{
@@ -163,21 +145,20 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public List LastQueryModes { get; } =
DropdownDataGeneric.GetValues("LastQuery");
- public List SearchDelayTimes { get; } = SearchDelayTimeData.GetValues();
-
- public SearchDelayTimeData SearchDelayTime
+ public int SearchDelayTimeValue
{
- get => SearchDelayTimes.FirstOrDefault(x => x.Value == Settings.SearchDelayTime);
+ get => Settings.SearchDelayTime;
set
{
- if (value == null) return;
-
- if (Settings.SearchDelayTime != value.Value)
+ if (Settings.SearchDelayTime != value)
{
- Settings.SearchDelayTime = value.Value;
+ Settings.SearchDelayTime = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(SearchDelayTimeDisplay));
}
}
}
+ public string SearchDelayTimeDisplay => $"{SearchDelayTimeValue}ms";
private void UpdateEnumDropdownLocalizations()
{
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 46e398eb5..4958bb7b7 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -122,7 +122,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
{
new TextBlock
{
- Text = (string)Application.Current.Resources["changePriorityWindow"],
+ Text = (string)Application.Current.Resources["priority"],
FontSize = 18,
Margin = new Thickness(0, 0, 0, 10),
TextWrapping = TextWrapping.Wrap
@@ -134,7 +134,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
},
new TextBlock
{
- Text = (string)Application.Current.Resources["searchDelayTimeTitle"],
+ Text = (string)Application.Current.Resources["searchDelay"],
FontSize = 18,
Margin = new Thickness(0, 24, 0, 10),
TextWrapping = TextWrapping.Wrap
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 10e2b549a..657e97f30 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -211,12 +211,17 @@
Title="{DynamicResource searchDelayTime}"
Sub="{DynamicResource searchDelayTimeToolTip}"
Type="InsideFit">
-
+
+
+
From cbf50317d3cb87bd62dbb42ee39adcd6719bbeee Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 8 Apr 2025 00:02:59 +0900
Subject: [PATCH 0607/1442] Fix content dialog style
---
.../Resources/CustomControlTemplate.xaml | 24 ++++++++++++-------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index 157910b4a..d78829471 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -3587,7 +3587,7 @@
-
+
-
+
+
+
+
+
+
+
+
From 736837ebe8c3ce2babe80d5f1b5a95905aae3ca2 Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 8 Apr 2025 15:23:23 +0900
Subject: [PATCH 0608/1442] Add function for switch and button
---
Flow.Launcher/Languages/en.xaml | 6 +-
.../SettingsPaneGeneralViewModel.cs | 122 ++++++++++++++----
.../Views/SettingsPaneGeneral.xaml | 62 ++++-----
3 files changed, 133 insertions(+), 57 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 3de278eca..c4c87dbc4 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -125,7 +125,11 @@
and enable "Use previous version of Microsoft IME".
You can open the relevant menu using the option below, or change the setting directly without manually opening the settings page.
- Very short
+ Open Language and Region System Settings
+ Opens the Korean IME setting locationKorean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Open
+ Use Legacy Korean IME
+ You can change the IME settings directly from here without opening a separate settings windowSearch Plugin
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index a1b38a53c..dcd17cf24 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -13,6 +13,8 @@ using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
using Microsoft.Win32;
using OpenFileDialog = System.Windows.Forms.OpenFileDialog;
+using System.Windows.Input;
+
namespace Flow.Launcher.SettingPages.ViewModels;
@@ -21,7 +23,8 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public Settings Settings { get; }
private readonly Updater _updater;
private readonly IPortable _portable;
-
+ public ICommand OpenImeSettingsCommand { get; }
+
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable)
{
Settings = settings;
@@ -29,6 +32,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
_portable = portable;
UpdateEnumDropdownLocalizations();
IsLegacyKoreanIMEEnabled();
+ OpenImeSettingsCommand = new RelayCommand(OpenImeSettings);
}
public class SearchWindowScreenData : DropdownDataGeneric { }
@@ -190,8 +194,89 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
UpdateEnumDropdownLocalizations();
}
}
+
+ public bool LegacyKoreanIMEEnabled
+ {
+ get => IsLegacyKoreanIMEEnabled();
+ set
+ {
+ SetLegacyKoreanIMEEnabled(value);
+ OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
+ OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
+ }
+ }
+
+ public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
+
+ public bool KoreanIMERegistryValueIsZero
+ {
+ get
+ {
+ object value = GetLegacyKoreanIMERegistryValue();
+ if (value is int intValue)
+ {
+ return intValue == 0;
+ }
+ else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ {
+ return parsedValue == 0;
+ }
+
+ return false;
+ }
+ }
+
+ bool IsKoreanIMEExist()
+ {
+ return GetLegacyKoreanIMERegistryValue() != null;
+ }
bool IsLegacyKoreanIMEEnabled()
+ {
+ object value = GetLegacyKoreanIMERegistryValue();
+
+ if (value is int intValue)
+ {
+ return intValue == 1;
+ }
+ else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ {
+ return parsedValue == 1;
+ }
+
+ return false;
+ }
+
+ bool SetLegacyKoreanIMEEnabled(bool enable)
+ {
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
+ {
+ if (key != null)
+ {
+ int value = enable ? 1 : 0;
+ key.SetValue(valueName, value, RegistryValueKind.DWord);
+ return true;
+ }
+ else
+ {
+ Debug.WriteLine($"[IME DEBUG] 레지스트리 키 생성 또는 열기 실패: {subKeyPath}");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"[IME DEBUG] 레지스트리 설정 중 예외 발생: {ex.Message}");
+ }
+
+ return false;
+ }
+
+ private object GetLegacyKoreanIMERegistryValue()
{
const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
const string valueName = "NoTsf3Override5";
@@ -202,25 +287,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
if (key != null)
{
- object value = key.GetValue(valueName);
- if (value != null)
- {
- Debug.WriteLine($"[IME DEBUG] '{valueName}' 값: {value} (타입: {value.GetType()})");
-
- if (value is int intValue)
- return intValue == 1;
-
- if (int.TryParse(value.ToString(), out int parsed))
- return parsed == 1;
- }
- else
- {
- Debug.WriteLine($"[IME DEBUG] '{valueName}' 값이 존재하지 않습니다.");
- }
- }
- else
- {
- Debug.WriteLine($"[IME DEBUG] 레지스트리 키를 찾을 수 없습니다: {subKeyPath}");
+ return key.GetValue(valueName);
}
}
}
@@ -229,10 +296,21 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
Debug.WriteLine($"[IME DEBUG] 예외 발생: {ex.Message}");
}
- return false; // 기본적으로 새 IME 사용 중으로 간주
+ return null;
+ }
+
+ private void OpenImeSettings()
+ {
+ try
+ {
+ Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
+ }
+ catch (Exception e)
+ {
+ Debug.WriteLine($"Error opening IME settings: {e.Message}");
+ }
}
-
public bool ShouldUsePinyin
{
get => Settings.ShouldUsePinyin;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 431293a50..1d4dfd8ae 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -8,12 +8,16 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:settingsViewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
xmlns:ui="http://schemas.modernwpf.com/2019"
+ xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
Title="General"
d:DataContext="{d:DesignInstance settingsViewModels:SettingsPaneGeneralViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
From ecd019dd6b0c286a6cf223cf598bc1fc57dd4279 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 15:56:54 +0800
Subject: [PATCH 0609/1442] Move ThemeData class to SharedModels
---
Flow.Launcher.Core/Resource/Theme.cs | 1 +
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 6 +++---
Flow.Launcher.Plugin/{ => SharedModels}/ThemeData.cs | 2 +-
.../SettingPages/ViewModels/SettingsPaneThemeViewModel.cs | 1 +
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 1 +
5 files changed, 7 insertions(+), 4 deletions(-)
rename Flow.Launcher.Plugin/{ => SharedModels}/ThemeData.cs (97%)
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index 4cf9ce7a7..f3eba7ba7 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedModels;
using Microsoft.Win32;
namespace Flow.Launcher.Core.Resource
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 64bdcec34..1090a3a1e 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -1,6 +1,4 @@
-using Flow.Launcher.Plugin.SharedModels;
-using JetBrains.Annotations;
-using System;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
@@ -8,6 +6,8 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
+using Flow.Launcher.Plugin.SharedModels;
+using JetBrains.Annotations;
namespace Flow.Launcher.Plugin
{
diff --git a/Flow.Launcher.Plugin/ThemeData.cs b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
similarity index 97%
rename from Flow.Launcher.Plugin/ThemeData.cs
rename to Flow.Launcher.Plugin/SharedModels/ThemeData.cs
index 1888be65e..6a5e54f55 100644
--- a/Flow.Launcher.Plugin/ThemeData.cs
+++ b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
@@ -1,6 +1,6 @@
using System;
-namespace Flow.Launcher.Plugin;
+namespace Flow.Launcher.Plugin.SharedModels;
///
/// Theme data model
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index 58cf3a314..f78704ef2 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -12,6 +12,7 @@ using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using ModernWpf;
using ThemeManagerForColorSchemeSwitch = ModernWpf.ThemeManager;
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index 4b99efe3b..feacc3f99 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using Flow.Launcher.Plugin.SharedModels;
namespace Flow.Launcher.Plugin.Sys
{
From 6c458828bc9d24a58de29240f1417c253c64a7d6 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:01:46 +0800
Subject: [PATCH 0610/1442] Fix possible NullReferenceException
---
Flow.Launcher.Plugin/SharedModels/ThemeData.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
index 6a5e54f55..322985f3a 100644
--- a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
+++ b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
@@ -41,12 +41,16 @@ public class ThemeData
///
public static bool operator ==(ThemeData left, ThemeData right)
{
+ if (left is null && right is null)
+ return true;
return left.Equals(right);
}
///
public static bool operator !=(ThemeData left, ThemeData right)
{
+ if (left is null && right is null)
+ return false;
return !(left == right);
}
From 6c5bb7d184d1f5a1284f94647e6f34ce1f0b2b84 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Tue, 8 Apr 2025 18:12:10 +1000
Subject: [PATCH 0611/1442] update summary
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 30004952e..111bc716c 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -228,7 +228,7 @@ namespace Flow.Launcher.Plugin
void LogWarn(string className, string message, [CallerMemberName] string methodName = "");
///
- /// Log error message
+ /// Log error message. Preferred error logging method for plugins.
///
void LogError(string className, string message, [CallerMemberName] string methodName = "");
From 537c03f2d751345176bbeacf1d58a657da3aef31 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:13:58 +0800
Subject: [PATCH 0612/1442] Fix null check issue
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher.Plugin/SharedModels/ThemeData.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
index 322985f3a..093e1ee8e 100644
--- a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
+++ b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
@@ -43,6 +43,8 @@ public class ThemeData
{
if (left is null && right is null)
return true;
+ if (left is null || right is null)
+ return false;
return left.Equals(right);
}
From b3aa89773ce1fdfadc9dfd06b13acc596d504265 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:14:17 +0800
Subject: [PATCH 0613/1442] Use == for != operator
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher.Plugin/SharedModels/ThemeData.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
index 093e1ee8e..cb389c21f 100644
--- a/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
+++ b/Flow.Launcher.Plugin/SharedModels/ThemeData.cs
@@ -51,8 +51,6 @@ public class ThemeData
///
public static bool operator !=(ThemeData left, ThemeData right)
{
- if (left is null && right is null)
- return false;
return !(left == right);
}
From a2d99573855b145a4ac68f270494c05f07ea06a6 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:20:11 +0800
Subject: [PATCH 0614/1442] Log warning if cannot find matched theme
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Core/Resource/Theme.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index f3eba7ba7..d7c619330 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -384,7 +384,12 @@ namespace Flow.Launcher.Core.Resource
public ThemeData GetCurrentTheme()
{
var themes = GetAvailableThemes();
- return themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme) ?? themes.FirstOrDefault();
+ var matchingTheme = themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme);
+ if (matchingTheme == null)
+ {
+ Log.Warn($"No matching theme found for '{_settings.Theme}'. Falling back to the first available theme.");
+ }
+ return matchingTheme ?? themes.FirstOrDefault();
}
public List GetAvailableThemes()
From 7da2884e84ebd45dc70c16cd3dde6f6ef1e2b4af Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:29:03 +0800
Subject: [PATCH 0615/1442] Add locks for win32s & uwps
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 61 +++++++++++++++----
.../Views/Commands/ProgramSettingDisplay.cs | 34 ++++++++---
.../Views/ProgramSetting.xaml.cs | 18 +++---
3 files changed, 83 insertions(+), 30 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index d3c50b406..6d2ae70fc 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -27,6 +27,9 @@ namespace Flow.Launcher.Plugin.Program
internal static List _uwps { get; private set; }
internal static Settings _settings { get; private set; }
+ internal static SemaphoreSlim _win32sLock = new(1, 1);
+ internal static SemaphoreSlim _uwpsLock = new(1, 1);
+
internal static PluginInitContext Context { get; private set; }
private static readonly List emptyResults = new();
@@ -82,8 +85,11 @@ namespace Flow.Launcher.Plugin.Program
{
var result = await cache.GetOrCreateAsync(query.Search, async entry =>
{
- var resultList = await Task.Run(() =>
+ var resultList = await Task.Run(async () =>
{
+ await _win32sLock.WaitAsync(token);
+ await _uwpsLock.WaitAsync(token);
+
try
{
// Collect all UWP Windows app directories
@@ -95,22 +101,26 @@ namespace Flow.Launcher.Plugin.Program
.ToArray() : null;
return _win32s.Cast()
- .Concat(_uwps)
- .AsParallel()
- .WithCancellation(token)
- .Where(HideUninstallersFilter)
- .Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
- .Where(p => p.Enabled)
- .Select(p => p.Result(query.Search, Context.API))
- .Where(r => r?.Score > 0)
- .ToList();
+ .Concat(_uwps)
+ .AsParallel()
+ .WithCancellation(token)
+ .Where(HideUninstallersFilter)
+ .Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
+ .Where(p => p.Enabled)
+ .Select(p => p.Result(query.Search, Context.API))
+ .Where(r => r?.Score > 0)
+ .ToList();
}
catch (OperationCanceledException)
{
Log.Debug("|Flow.Launcher.Plugin.Program.Main|Query operation cancelled");
return emptyResults;
}
-
+ finally
+ {
+ _uwpsLock.Release();
+ _win32sLock.Release();
+ }
}, token);
resultList = resultList.Any() ? resultList : emptyResults;
@@ -236,14 +246,25 @@ namespace Flow.Launcher.Plugin.Program
var newUWPCacheFile = Path.Combine(pluginCachePath, $"{UwpCacheName}.cache");
MoveFile(oldUWPCacheFile, newUWPCacheFile);
+ await _win32sLock.WaitAsync();
_win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCachePath, new List());
+ _win32sLock.Release();
+
+ await _uwpsLock.WaitAsync();
_uwps = await context.API.LoadCacheBinaryStorageAsync(UwpCacheName, pluginCachePath, new List());
+ _uwpsLock.Release();
});
+ await _win32sLock.WaitAsync();
+ await _uwpsLock.WaitAsync();
+
Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Count}>");
Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwps.Count}>");
bool cacheEmpty = !_win32s.Any() || !_uwps.Any();
+ _win32sLock.Release();
+ _uwpsLock.Release();
+
if (cacheEmpty || _settings.LastIndexTime.AddHours(30) < DateTime.Now)
{
_ = Task.Run(async () =>
@@ -267,11 +288,13 @@ namespace Flow.Launcher.Plugin.Program
public static async Task IndexWin32ProgramsAsync()
{
var win32S = Win32.All(_settings);
+ await _win32sLock.WaitAsync();
_win32s.Clear();
foreach (var win32 in win32S)
{
_win32s.Add(win32);
}
+ _win32sLock.Release();
ResetCache();
await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
@@ -280,11 +303,13 @@ namespace Flow.Launcher.Plugin.Program
public static async Task IndexUwpProgramsAsync()
{
var uwps = UWPPackage.All(_settings);
+ await _uwpsLock.WaitAsync();
_uwps.Clear();
foreach (var uwp in uwps)
{
_uwps.Add(uwp);
}
+ _uwpsLock.Release();
ResetCache();
await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
@@ -358,26 +383,36 @@ namespace Flow.Launcher.Plugin.Program
return menuOptions;
}
- private static void DisableProgram(IProgram programToDelete)
+ private static async Task DisableProgram(IProgram programToDelete)
{
if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
return;
+ await _uwpsLock.WaitAsync();
if (_uwps.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
{
var program = _uwps.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier);
program.Enabled = false;
_settings.DisabledProgramSources.Add(new ProgramSource(program));
+ _uwpsLock.Release();
+
+ // Reindex UWP programs
_ = Task.Run(() =>
{
_ = IndexUwpProgramsAsync();
});
+ return;
}
- else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
+
+ await _win32sLock.WaitAsync();
+ if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
{
var program = _win32s.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier);
program.Enabled = false;
_settings.DisabledProgramSources.Add(new ProgramSource(program));
+ _win32sLock.Release();
+
+ // Reindex Win32 programs
_ = Task.Run(() =>
{
_ = IndexWin32ProgramsAsync();
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs
index e4d7c323a..b89a2a6ba 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/Commands/ProgramSettingDisplay.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using System.Threading.Tasks;
using Flow.Launcher.Plugin.Program.Views.Models;
namespace Flow.Launcher.Plugin.Program.Views.Commands
@@ -15,21 +16,24 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands
.ToList();
}
- internal static void DisplayAllPrograms()
+ internal static async Task DisplayAllProgramsAsync()
{
+ await Main._win32sLock.WaitAsync();
var win32 = Main._win32s
.Where(t1 => !ProgramSetting.ProgramSettingDisplayList.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))
.Select(x => new ProgramSource(x));
+ ProgramSetting.ProgramSettingDisplayList.AddRange(win32);
+ Main._win32sLock.Release();
+ await Main._uwpsLock.WaitAsync();
var uwp = Main._uwps
.Where(t1 => !ProgramSetting.ProgramSettingDisplayList.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))
.Select(x => new ProgramSource(x));
-
- ProgramSetting.ProgramSettingDisplayList.AddRange(win32);
ProgramSetting.ProgramSettingDisplayList.AddRange(uwp);
+ Main._uwpsLock.Release();
}
- internal static void SetProgramSourcesStatus(List selectedProgramSourcesToDisable, bool status)
+ internal static async Task SetProgramSourcesStatusAsync(List selectedProgramSourcesToDisable, bool status)
{
foreach(var program in ProgramSetting.ProgramSettingDisplayList)
{
@@ -39,14 +43,17 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands
}
}
- foreach(var program in Main._win32s)
+ await Main._win32sLock.WaitAsync();
+ foreach (var program in Main._win32s)
{
if (selectedProgramSourcesToDisable.Any(x => x.UniqueIdentifier == program.UniqueIdentifier && program.Enabled != status))
{
program.Enabled = status;
}
}
+ Main._win32sLock.Release();
+ await Main._uwpsLock.WaitAsync();
foreach (var program in Main._uwps)
{
if (selectedProgramSourcesToDisable.Any(x => x.UniqueIdentifier == program.UniqueIdentifier && program.Enabled != status))
@@ -54,6 +61,7 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands
program.Enabled = status;
}
}
+ Main._uwpsLock.Release();
}
internal static void StoreDisabledInSettings()
@@ -72,12 +80,22 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands
Main._settings.DisabledProgramSources.RemoveAll(t1 => t1.Enabled);
}
- internal static bool IsReindexRequired(this List selectedItems)
+ internal static async Task IsReindexRequiredAsync(this List selectedItems)
{
// Not in cache
- if (selectedItems.Any(t1 => t1.Enabled && !Main._uwps.Any(x => t1.UniqueIdentifier == x.UniqueIdentifier))
+ await Main._win32sLock.WaitAsync();
+ await Main._uwpsLock.WaitAsync();
+ try
+ {
+ if (selectedItems.Any(t1 => t1.Enabled && !Main._uwps.Any(x => t1.UniqueIdentifier == x.UniqueIdentifier))
&& selectedItems.Any(t1 => t1.Enabled && !Main._win32s.Any(x => t1.UniqueIdentifier == x.UniqueIdentifier)))
- return true;
+ return true;
+ }
+ finally
+ {
+ Main._win32sLock.Release();
+ Main._uwpsLock.Release();
+ }
// ProgramSources holds list of user added directories,
// so when we enable/disable we need to reindex to show/not show the programs
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 5ad7fcea3..c42bd4f30 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -183,7 +183,7 @@ namespace Flow.Launcher.Plugin.Program.Views
EditProgramSource(selectedProgramSource);
}
- private void EditProgramSource(ProgramSource selectedProgramSource)
+ private async void EditProgramSource(ProgramSource selectedProgramSource)
{
if (selectedProgramSource == null)
{
@@ -202,13 +202,13 @@ namespace Flow.Launcher.Plugin.Program.Views
{
if (selectedProgramSource.Enabled)
{
- ProgramSettingDisplay.SetProgramSourcesStatus(new List { selectedProgramSource },
+ await ProgramSettingDisplay.SetProgramSourcesStatusAsync(new List { selectedProgramSource },
true); // sync status in win32, uwp and disabled
ProgramSettingDisplay.RemoveDisabledFromSettings();
}
else
{
- ProgramSettingDisplay.SetProgramSourcesStatus(new List { selectedProgramSource },
+ await ProgramSettingDisplay.SetProgramSourcesStatusAsync(new List { selectedProgramSource },
false);
ProgramSettingDisplay.StoreDisabledInSettings();
}
@@ -277,14 +277,14 @@ namespace Flow.Launcher.Plugin.Program.Views
}
}
- private void btnLoadAllProgramSource_OnClick(object sender, RoutedEventArgs e)
+ private async void btnLoadAllProgramSource_OnClick(object sender, RoutedEventArgs e)
{
- ProgramSettingDisplay.DisplayAllPrograms();
+ await ProgramSettingDisplay.DisplayAllProgramsAsync();
ViewRefresh();
}
- private void btnProgramSourceStatus_OnClick(object sender, RoutedEventArgs e)
+ private async void btnProgramSourceStatus_OnClick(object sender, RoutedEventArgs e)
{
var selectedItems = programSourceView
.SelectedItems.Cast()
@@ -311,18 +311,18 @@ namespace Flow.Launcher.Plugin.Program.Views
}
else if (HasMoreOrEqualEnabledItems(selectedItems))
{
- ProgramSettingDisplay.SetProgramSourcesStatus(selectedItems, false);
+ await ProgramSettingDisplay.SetProgramSourcesStatusAsync(selectedItems, false);
ProgramSettingDisplay.StoreDisabledInSettings();
}
else
{
- ProgramSettingDisplay.SetProgramSourcesStatus(selectedItems, true);
+ await ProgramSettingDisplay.SetProgramSourcesStatusAsync(selectedItems, true);
ProgramSettingDisplay.RemoveDisabledFromSettings();
}
- if (selectedItems.IsReindexRequired())
+ if (await selectedItems.IsReindexRequiredAsync())
ReIndexing();
programSourceView.SelectedItems.Clear();
From dd210ad41968a1e9112fb6b364a08093534ae136 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:41:06 +0800
Subject: [PATCH 0616/1442] Remove RefreshFrameAsync since ChangeTheme calls
this function
---
Flow.Launcher.Core/Resource/Theme.cs | 2 +-
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 6 ++++--
Flow.Launcher/PublicAPIInstance.cs | 5 +----
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index d7c619330..59e76e2d2 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -433,7 +433,7 @@ namespace Flow.Launcher.Core.Resource
BlurEnabled = IsBlurTheme();
- // Can only apply blur but here also apply drop shadow effect to avoid possible drop shadow effect issues
+ // Apply blur and drop shadow effect so that we do not need to call it again
_ = RefreshFrameAsync();
return true;
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 056c4a437..7701fcdd0 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -367,8 +367,10 @@ namespace Flow.Launcher.Plugin
/// Set the current theme
///
///
- ///
- public void SetCurrentTheme(ThemeData theme);
+ ///
+ /// True if the theme is set successfully, false otherwise.
+ ///
+ public bool SetCurrentTheme(ThemeData theme);
/// Load image from path. Support local, remote and data:image url.
/// If image path is missing, it will return a missing icon.
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index b19b21db1..8cce460d7 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -377,11 +377,8 @@ namespace Flow.Launcher
public ThemeData GetCurrentTheme() => Theme.GetCurrentTheme();
- public void SetCurrentTheme(ThemeData theme)
- {
+ public bool SetCurrentTheme(ThemeData theme) =>
Theme.ChangeTheme(theme.FileNameWithoutExtension);
- _ = _theme.RefreshFrameAsync();
- }
public ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true) =>
ImageLoader.LoadAsync(path, loadFullImage, cacheImage);
From a3c7be95597f8c0765f0e62749b7f263749e78cd Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:49:29 +0800
Subject: [PATCH 0617/1442] Handle results from SetCurrentTheme
---
Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
index feacc3f99..f8aeaeafd 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs
@@ -76,8 +76,10 @@ namespace Flow.Launcher.Plugin.Sys
Score = score,
Action = c =>
{
- _context.API.SetCurrentTheme(theme);
- _context.API.ReQuery();
+ if (_context.API.SetCurrentTheme(theme))
+ {
+ _context.API.ReQuery();
+ }
return false;
}
};
From 734c5bb67deb769190fa46572083e64ffcef8cf8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 16:59:27 +0800
Subject: [PATCH 0618/1442] Fix lock release issue
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 6d2ae70fc..a5fbc6c70 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -367,7 +367,7 @@ namespace Flow.Launcher.Plugin.Program
Title = Context.API.GetTranslation("flowlauncher_plugin_program_disable_program"),
Action = c =>
{
- DisableProgram(program);
+ _ = DisableProgramAsync(program);
Context.API.ShowMsg(
Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"),
Context.API.GetTranslation(
@@ -383,7 +383,7 @@ namespace Flow.Launcher.Plugin.Program
return menuOptions;
}
- private static async Task DisableProgram(IProgram programToDelete)
+ private static async Task DisableProgramAsync(IProgram programToDelete)
{
if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
return;
@@ -403,7 +403,12 @@ namespace Flow.Launcher.Plugin.Program
});
return;
}
-
+ else
+ {
+ // Release the lock if we cannot find the program
+ _uwpsLock.Release();
+ }
+
await _win32sLock.WaitAsync();
if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
{
@@ -418,6 +423,11 @@ namespace Flow.Launcher.Plugin.Program
_ = IndexWin32ProgramsAsync();
});
}
+ else
+ {
+ // Release the lock if we cannot find the program
+ _win32sLock.Release();
+ }
}
public static void StartProcess(Func runProcess, ProcessStartInfo info)
From c11ee2f9e78fa626bd7801fed293d990fdfaf682 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 17:20:57 +0800
Subject: [PATCH 0619/1442] Improve code quality & comments & Fix lock issue
---
.../Storage/BinaryStorage.cs | 6 ++--
.../Storage/PluginJsonStorage.cs | 1 +
Flow.Launcher.Plugin/Interfaces/ISavable.cs | 9 ++++--
Flow.Launcher/PublicAPIInstance.cs | 6 ----
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 29 +++++++------------
5 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index f218c5d8d..b5de3b50f 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -42,8 +42,7 @@ namespace Flow.Launcher.Infrastructure.Storage
public async ValueTask TryLoadAsync(T defaultData)
{
- if (Data != null)
- return Data;
+ if (Data != null) return Data;
if (File.Exists(FilePath))
{
@@ -55,8 +54,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
await using var stream = new FileStream(FilePath, FileMode.Open);
- var d = await DeserializeAsync(stream, defaultData);
- Data = d;
+ Data = await DeserializeAsync(stream, defaultData);
}
else
{
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index b63e8c1ef..e8cbd70fb 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -20,6 +20,7 @@ namespace Flow.Launcher.Infrastructure.Storage
public PluginJsonStorage()
{
+ // C# related, add python related below
var dataType = typeof(T);
AssemblyName = dataType.Assembly.GetName().Name;
DirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, AssemblyName);
diff --git a/Flow.Launcher.Plugin/Interfaces/ISavable.cs b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
index cabd26962..0d23c0fc8 100644
--- a/Flow.Launcher.Plugin/Interfaces/ISavable.cs
+++ b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
@@ -1,18 +1,21 @@
namespace Flow.Launcher.Plugin
{
///
- /// Inherit this interface if additional data e.g. cache needs to be saved.
+ /// Inherit this interface if additional data.
+ /// If you need to save data which is not a setting or cache,
+ /// please implement this interface.
///
///
/// For storing plugin settings, prefer
/// or .
+ /// For storing plugin caches, prefer
/// or .
- /// Once called, your settings will be automatically saved by Flow.
+ /// Once called, those settings and caches will be automatically saved by Flow.
///
public interface ISavable : IFeatures
{
///
- /// Save additional plugin data, such as cache.
+ /// Save additional plugin data.
///
void Save();
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 4dd0268d2..a523f90bb 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -229,9 +229,6 @@ namespace Flow.Launcher
}
}
- ///
- /// Save plugin settings.
- ///
public void SavePluginSettings()
{
foreach (var value in _pluginJsonStorages.Values)
@@ -378,9 +375,6 @@ namespace Flow.Launcher
}
}
- ///
- /// Save plugin caches.
- ///
public void SavePluginCaches()
{
foreach (var value in _pluginBinaryStorages.Values)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index a5fbc6c70..561044981 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -77,10 +77,6 @@ namespace Flow.Launcher.Plugin.Program
private static readonly string WindowsAppPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "WindowsApps");
- static Main()
- {
- }
-
public async Task> QueryAsync(Query query, CancellationToken token)
{
var result = await cache.GetOrCreateAsync(query.Search, async entry =>
@@ -101,15 +97,15 @@ namespace Flow.Launcher.Plugin.Program
.ToArray() : null;
return _win32s.Cast()
- .Concat(_uwps)
- .AsParallel()
- .WithCancellation(token)
- .Where(HideUninstallersFilter)
- .Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
- .Where(p => p.Enabled)
- .Select(p => p.Result(query.Search, Context.API))
- .Where(r => r?.Score > 0)
- .ToList();
+ .Concat(_uwps)
+ .AsParallel()
+ .WithCancellation(token)
+ .Where(HideUninstallersFilter)
+ .Where(p => HideDuplicatedWindowsAppFilter(p, uwpsDirectories))
+ .Where(p => p.Enabled)
+ .Select(p => p.Result(query.Search, Context.API))
+ .Where(r => r?.Score > 0)
+ .ToList();
}
catch (OperationCanceledException)
{
@@ -193,7 +189,6 @@ namespace Flow.Launcher.Plugin.Program
await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
{
var pluginCachePath = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
-
FilesFolders.ValidateDirectory(pluginCachePath);
static void MoveFile(string sourcePath, string destinationPath)
@@ -294,10 +289,10 @@ namespace Flow.Launcher.Plugin.Program
{
_win32s.Add(win32);
}
- _win32sLock.Release();
ResetCache();
await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
+ _win32sLock.Release();
}
public static async Task IndexUwpProgramsAsync()
@@ -309,10 +304,10 @@ namespace Flow.Launcher.Plugin.Program
{
_uwps.Add(uwp);
}
- _uwpsLock.Release();
ResetCache();
await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
_settings.LastIndexTime = DateTime.Now;
+ _uwpsLock.Release();
}
public static async Task IndexProgramsAsync()
@@ -405,7 +400,6 @@ namespace Flow.Launcher.Plugin.Program
}
else
{
- // Release the lock if we cannot find the program
_uwpsLock.Release();
}
@@ -425,7 +419,6 @@ namespace Flow.Launcher.Plugin.Program
}
else
{
- // Release the lock if we cannot find the program
_win32sLock.Release();
}
}
From 54e7652084245900e06c4513a1c6926ae13cf3b3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 17:22:32 +0800
Subject: [PATCH 0620/1442] Fix see cref issue
---
Flow.Launcher.Core/Storage/IRemovable.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/Storage/IRemovable.cs b/Flow.Launcher.Core/Storage/IRemovable.cs
index fc34395e0..bcf1cdd5e 100644
--- a/Flow.Launcher.Core/Storage/IRemovable.cs
+++ b/Flow.Launcher.Core/Storage/IRemovable.cs
@@ -1,18 +1,18 @@
namespace Flow.Launcher.Core.Storage;
///
-/// Remove storage instances from instance
+/// Remove storage instances from instance
///
public interface IRemovable
{
///
- /// Remove all instances of one plugin
+ /// Remove all instances of one plugin
///
///
public void RemovePluginSettings(string assemblyName);
///
- /// Remove all instances of one plugin
+ /// Remove all instances of one plugin
///
///
public void RemovePluginCaches(string cacheDirectory);
From 68268026de3261ea5eb7a28ff09f943adc816d0c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:21:03 +0800
Subject: [PATCH 0621/1442] Improve performance
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 561044981..c235fb587 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -186,6 +186,8 @@ namespace Flow.Launcher.Plugin.Program
_settings = context.API.LoadSettingJsonStorage();
+ var _win32sCount = 0;
+ var _uwpsCount = 0;
await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
{
var pluginCachePath = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
@@ -243,19 +245,18 @@ namespace Flow.Launcher.Plugin.Program
await _win32sLock.WaitAsync();
_win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCachePath, new List());
+ _win32sCount = _win32s.Count;
_win32sLock.Release();
await _uwpsLock.WaitAsync();
_uwps = await context.API.LoadCacheBinaryStorageAsync(UwpCacheName, pluginCachePath, new List());
+ _uwpsCount = _uwps.Count;
_uwpsLock.Release();
});
- await _win32sLock.WaitAsync();
- await _uwpsLock.WaitAsync();
+ Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32sCount}>");
+ Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwpsCount}>");
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Count}>");
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwps.Count}>");
-
- bool cacheEmpty = !_win32s.Any() || !_uwps.Any();
+ var cacheEmpty = _win32sCount == 0 || _uwpsCount == 0;
_win32sLock.Release();
_uwpsLock.Release();
From 4c4a6c0e22f65a7c1fd0865c70ad69b86e8a0aea Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:27:53 +0800
Subject: [PATCH 0622/1442] Add log handler for indexing
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 52 ++++++++++++++------
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index c235fb587..11deb710d 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -283,32 +283,52 @@ namespace Flow.Launcher.Plugin.Program
public static async Task IndexWin32ProgramsAsync()
{
- var win32S = Win32.All(_settings);
await _win32sLock.WaitAsync();
- _win32s.Clear();
- foreach (var win32 in win32S)
+ try
{
- _win32s.Add(win32);
+ var win32S = Win32.All(_settings);
+ _win32s.Clear();
+ foreach (var win32 in win32S)
+ {
+ _win32s.Add(win32);
+ }
+ ResetCache();
+ await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
+ _settings.LastIndexTime = DateTime.Now;
+ }
+ catch (Exception e)
+ {
+ Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Win32 programs", e);
+ }
+ finally
+ {
+ _win32sLock.Release();
}
- ResetCache();
- await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
- _settings.LastIndexTime = DateTime.Now;
- _win32sLock.Release();
}
public static async Task IndexUwpProgramsAsync()
{
- var uwps = UWPPackage.All(_settings);
await _uwpsLock.WaitAsync();
- _uwps.Clear();
- foreach (var uwp in uwps)
+ try
{
- _uwps.Add(uwp);
+ var uwps = UWPPackage.All(_settings);
+ _uwps.Clear();
+ foreach (var uwp in uwps)
+ {
+ _uwps.Add(uwp);
+ }
+ ResetCache();
+ await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
+ _settings.LastIndexTime = DateTime.Now;
+ }
+ catch (Exception e)
+ {
+ Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Uwp programs", e);
+ }
+ finally
+ {
+ _uwpsLock.Release();
}
- ResetCache();
- await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath);
- _settings.LastIndexTime = DateTime.Now;
- _uwpsLock.Release();
}
public static async Task IndexProgramsAsync()
From aaadf167777a9374f07a523a11b3c102c403ee5b Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:28:29 +0800
Subject: [PATCH 0623/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 2f8672e13..85c48f8a4 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -366,7 +366,7 @@ namespace Flow.Launcher.Plugin
/// Default data to return
///
///
- /// BinaryStorage utilize MemoryPack, which means the object must be MemoryPackSerializable
+ /// BinaryStorage utilizes MemoryPack, which means the object must be MemoryPackSerializable
///
Task LoadCacheBinaryStorageAsync(string cacheName, string cacheDirectory, T defaultData) where T : new();
From 4749ca208abe9dbcfeb4f80470e2e6e489300e12 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:33:48 +0800
Subject: [PATCH 0624/1442] Improve code comments
---
Flow.Launcher.Plugin/Interfaces/ISavable.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/ISavable.cs b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
index 0d23c0fc8..38cbf8e08 100644
--- a/Flow.Launcher.Plugin/Interfaces/ISavable.cs
+++ b/Flow.Launcher.Plugin/Interfaces/ISavable.cs
@@ -1,8 +1,7 @@
namespace Flow.Launcher.Plugin
{
///
- /// Inherit this interface if additional data.
- /// If you need to save data which is not a setting or cache,
+ /// Inherit this interface if you need to save additional data which is not a setting or cache,
/// please implement this interface.
///
///
From 2ff09cf9b0acb61e3323c80481e6eac5e2873891 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:41:02 +0800
Subject: [PATCH 0625/1442] Improve code quality
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 11deb710d..107673f89 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -413,10 +413,7 @@ namespace Flow.Launcher.Plugin.Program
_uwpsLock.Release();
// Reindex UWP programs
- _ = Task.Run(() =>
- {
- _ = IndexUwpProgramsAsync();
- });
+ _ = Task.Run(IndexUwpProgramsAsync);
return;
}
else
@@ -433,10 +430,8 @@ namespace Flow.Launcher.Plugin.Program
_win32sLock.Release();
// Reindex Win32 programs
- _ = Task.Run(() =>
- {
- _ = IndexWin32ProgramsAsync();
- });
+ _ = Task.Run(IndexWin32ProgramsAsync);
+ return;
}
else
{
From 653b8335700290f175b7f9bce369a849d0d48f81 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:42:59 +0800
Subject: [PATCH 0626/1442] Fix typos
---
Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs | 2 +-
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index b5de3b50f..43bb8dade 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -15,7 +15,7 @@ namespace Flow.Launcher.Infrastructure.Storage
/// Normally, it has better performance, but not readable
///
///
- /// It utilize MemoryPack, which means the object must be MemoryPackSerializable
+ /// It utilizes MemoryPack, which means the object must be MemoryPackSerializable
///
public class BinaryStorage : ISavable
{
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 85c48f8a4..a3020b607 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -380,7 +380,7 @@ namespace Flow.Launcher.Plugin
/// Cache directory from plugin metadata
///
///
- /// BinaryStorage utilize MemoryPack, which means the object must be MemoryPackSerializable
+ /// BinaryStorage utilizes MemoryPack, which means the object must be MemoryPackSerializable
///
Task SaveCacheBinaryStorageAsync(string cacheName, string cacheDirectory) where T : new();
From d7ca36e60a39892295fe2c42c9e2f81e56b59a66 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:44:30 +0800
Subject: [PATCH 0627/1442] Change variable name
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 107673f89..745b042e6 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -190,8 +190,8 @@ namespace Flow.Launcher.Plugin.Program
var _uwpsCount = 0;
await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
{
- var pluginCachePath = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
- FilesFolders.ValidateDirectory(pluginCachePath);
+ var pluginCacheDirectory = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
+ FilesFolders.ValidateDirectory(pluginCacheDirectory);
static void MoveFile(string sourcePath, string destinationPath)
{
@@ -237,19 +237,19 @@ namespace Flow.Launcher.Plugin.Program
// Move old cache files to the new cache directory
var oldWin32CacheFile = Path.Combine(DataLocation.CacheDirectory, $"{Win32CacheName}.cache");
- var newWin32CacheFile = Path.Combine(pluginCachePath, $"{Win32CacheName}.cache");
+ var newWin32CacheFile = Path.Combine(pluginCacheDirectory, $"{Win32CacheName}.cache");
MoveFile(oldWin32CacheFile, newWin32CacheFile);
var oldUWPCacheFile = Path.Combine(DataLocation.CacheDirectory, $"{UwpCacheName}.cache");
- var newUWPCacheFile = Path.Combine(pluginCachePath, $"{UwpCacheName}.cache");
+ var newUWPCacheFile = Path.Combine(pluginCacheDirectory, $"{UwpCacheName}.cache");
MoveFile(oldUWPCacheFile, newUWPCacheFile);
await _win32sLock.WaitAsync();
- _win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCachePath, new List());
+ _win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCacheDirectory, new List());
_win32sCount = _win32s.Count;
_win32sLock.Release();
await _uwpsLock.WaitAsync();
- _uwps = await context.API.LoadCacheBinaryStorageAsync(UwpCacheName, pluginCachePath, new List());
+ _uwps = await context.API.LoadCacheBinaryStorageAsync(UwpCacheName, pluginCacheDirectory, new List());
_uwpsCount = _uwps.Count;
_uwpsLock.Release();
});
From 482e37316a1fee76b924e3b151a4507a42ad2cb7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 19:46:40 +0800
Subject: [PATCH 0628/1442] Remove useless releases
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 745b042e6..a50868b69 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -258,9 +258,6 @@ namespace Flow.Launcher.Plugin.Program
var cacheEmpty = _win32sCount == 0 || _uwpsCount == 0;
- _win32sLock.Release();
- _uwpsLock.Release();
-
if (cacheEmpty || _settings.LastIndexTime.AddHours(30) < DateTime.Now)
{
_ = Task.Run(async () =>
From d30f292e3129aeab196b21380a3076f860a976e3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 20:19:04 +0800
Subject: [PATCH 0629/1442] Remove unused string
---
Flow.Launcher/Languages/en.xaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index f01d0575a..7e5a554a9 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -149,7 +149,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultPlugin Store
From 970bb3ac1268f8e3e443f48aef77d80324b2da15 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 20:30:40 +0800
Subject: [PATCH 0630/1442] Add code comments
---
Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
index ab9496266..a27a00782 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml.cs
@@ -9,6 +9,7 @@ public partial class InstalledPluginDisplay
InitializeComponent();
}
+ // This is used for PriorityControl to force its value to be 0 when the user clears the value
private void NumberBox_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
{
if (double.IsNaN(args.NewValue))
From 61fa4602d529c345616aaea87dd65af14589f77c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:02:42 +0800
Subject: [PATCH 0631/1442] Disable search delay number box when search delay
is disabled
---
.../Resources/Controls/InstalledPluginDisplay.xaml | 9 +++++----
Flow.Launcher/ViewModel/PluginViewModel.cs | 5 +++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 9a4e3b7b0..63d1af6b1 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -90,13 +90,14 @@
-
+ Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 2dff72ac5..5f19459c9 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -3,9 +3,11 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
+using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.Image;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Resources.Controls;
@@ -13,6 +15,8 @@ namespace Flow.Launcher.ViewModel
{
public partial class PluginViewModel : BaseModel
{
+ private static readonly Settings Settings = Ioc.Default.GetRequiredService();
+
private readonly PluginPair _pluginPair;
public PluginPair PluginPair
{
@@ -148,6 +152,7 @@ namespace Flow.Launcher.ViewModel
App.API.GetTranslation("default") :
App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
+ public bool SearchDelayEnabled => Settings.SearchQueryResultsWithDelay;
public void OnActionKeywordsChanged()
{
From ade4fbf7f2a905ef41cdf98e82dcd484d1400367 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:02:56 +0800
Subject: [PATCH 0632/1442] Adjust number box width
---
Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 63d1af6b1..4a89d811f 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -88,7 +88,7 @@
Text="{DynamicResource searchDelay}"
ToolTip="{DynamicResource searchDelayToolTip}" />
Date: Tue, 8 Apr 2025 21:04:04 +0800
Subject: [PATCH 0633/1442] Change default search delay time to value
---
Flow.Launcher/Languages/en.xaml | 1 -
Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml | 2 +-
Flow.Launcher/ViewModel/PluginViewModel.cs | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 7e5a554a9..609859d0d 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -111,7 +111,6 @@
Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.Default Search Delay TimeWait time before showing results after typing stops. Higher values wait longer. (ms)
- DefaultSearch Plugin
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 4a89d811f..231036244 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -93,7 +93,7 @@
IsEnabled="{Binding SearchDelayEnabled}"
Maximum="1000"
Minimum="0"
- PlaceholderText="{DynamicResource searchDelayPlaceHolder}"
+ PlaceholderText="{Binding DefaultSearchDelay}"
SmallChange="10"
SpinButtonPlacementMode="Compact"
ToolTip="{DynamicResource searchDelayToolTip}"
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 5f19459c9..da0ed70fa 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -153,6 +153,7 @@ namespace Flow.Launcher.ViewModel
App.API.GetTranslation($"SearchDelayTime{PluginPair.Metadata.SearchDelayTime}");
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
public bool SearchDelayEnabled => Settings.SearchQueryResultsWithDelay;
+ public string DefaultSearchDelay => Settings.SearchDelayTime.ToString();
public void OnActionKeywordsChanged()
{
From 2589fac0bcb1cd28b0e3074c7bacd3e6baaad27e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:23:02 +0800
Subject: [PATCH 0634/1442] Remove useless function
---
Flow.Launcher.Infrastructure/Stopwatch.cs | 34 -----------------------
1 file changed, 34 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Stopwatch.cs b/Flow.Launcher.Infrastructure/Stopwatch.cs
index dd6edaff9..784d323fe 100644
--- a/Flow.Launcher.Infrastructure/Stopwatch.cs
+++ b/Flow.Launcher.Infrastructure/Stopwatch.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure.Logger;
@@ -7,8 +6,6 @@ namespace Flow.Launcher.Infrastructure
{
public static class Stopwatch
{
- private static readonly Dictionary Count = new Dictionary();
- private static readonly object Locker = new object();
///
/// This stopwatch will appear only in Debug mode
///
@@ -62,36 +59,5 @@ namespace Flow.Launcher.Infrastructure
Log.Info(info);
return milliseconds;
}
-
-
-
- public static void StartCount(string name, Action action)
- {
- var stopWatch = new System.Diagnostics.Stopwatch();
- stopWatch.Start();
- action();
- stopWatch.Stop();
- var milliseconds = stopWatch.ElapsedMilliseconds;
- lock (Locker)
- {
- if (Count.ContainsKey(name))
- {
- Count[name] += milliseconds;
- }
- else
- {
- Count[name] = 0;
- }
- }
- }
-
- public static void EndCount()
- {
- foreach (var key in Count.Keys)
- {
- string info = $"{key} already cost {Count[key]}ms";
- Log.Debug(info);
- }
- }
}
}
From d09899e15c32be3d1755b6222cdae4919735d2fd Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 8 Apr 2025 22:31:33 +0900
Subject: [PATCH 0635/1442] Adjust Placeholder color
---
.../Resources/CustomControlTemplate.xaml | 25 +++++++++++--------
Flow.Launcher/Resources/Dark.xaml | 1 +
Flow.Launcher/Resources/Light.xaml | 3 +++
3 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index d78829471..ffa5eea41 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2777,7 +2777,7 @@
-
+
@@ -3587,7 +3587,7 @@
-
+
-
+
-
+
diff --git a/Flow.Launcher/Resources/Dark.xaml b/Flow.Launcher/Resources/Dark.xaml
index e8629a981..498e96bff 100644
--- a/Flow.Launcher/Resources/Dark.xaml
+++ b/Flow.Launcher/Resources/Dark.xaml
@@ -106,6 +106,7 @@
#f5f5f5#464646#ffffff
+ #272727
diff --git a/Flow.Launcher/Resources/Light.xaml b/Flow.Launcher/Resources/Light.xaml
index aa6da9fb2..0f1e98a6b 100644
--- a/Flow.Launcher/Resources/Light.xaml
+++ b/Flow.Launcher/Resources/Light.xaml
@@ -97,8 +97,11 @@
#f5f5f5#878787#1b1b1b
+ #f6f6f6
+
+
From e753bb79b1985de78f21d68dfd02f0b1160f919d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:32:18 +0800
Subject: [PATCH 0636/1442] Add public methods
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 26 +++++++++++++++++++
Flow.Launcher/PublicAPIInstance.cs | 13 ++++++++++
2 files changed, 39 insertions(+)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 273676bfb..6d9e5f755 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -473,5 +473,31 @@ namespace Flow.Launcher.Plugin
///
///
public Task UninstallPluginAsync(PluginMetadata pluginMetadata, bool removePluginSettings = false);
+
+ ///
+ /// Log debug message of the time taken to execute a method
+ /// Message will only be logged in Debug mode
+ ///
+ /// The time taken to execute the method in milliseconds
+ public long StopWatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "");
+
+ ///
+ /// Log debug message of the time taken to execute a method asynchronously
+ /// Message will only be logged in Debug mode
+ ///
+ /// The time taken to execute the method in milliseconds
+ public Task StopWatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
+
+ ///
+ /// Log info message of the time taken to execute a method
+ ///
+ /// The time taken to execute the method in milliseconds
+ public long StopWatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "");
+
+ ///
+ /// Log info message of the time taken to execute a method asynchronously
+ ///
+ /// The time taken to execute the method in milliseconds
+ public Task StopWatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index b67ef6ab6..b7aaef143 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -31,6 +31,7 @@ using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel;
using JetBrains.Annotations;
using Squirrel;
+using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
namespace Flow.Launcher
{
@@ -431,6 +432,18 @@ namespace Flow.Launcher
public Task UninstallPluginAsync(PluginMetadata pluginMetadata, bool removePluginSettings = false) =>
PluginManager.UninstallPluginAsync(pluginMetadata, removePluginSettings);
+ public long StopWatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
+ Stopwatch.Debug($"|{className}.{methodName}|{message}", action);
+
+ public Task StopWatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
+ Stopwatch.DebugAsync($"|{className}.{methodName}|{message}", action);
+
+ public long StopWatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
+ Stopwatch.Normal($"|{className}.{methodName}|{message}", action);
+
+ public Task StopWatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
+ Stopwatch.NormalAsync($"|{className}.{methodName}|{message}", action);
+
#endregion
#region Private Methods
From f99859ad1eb4fc5f94077327d60f689b8507b16a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:38:17 +0800
Subject: [PATCH 0637/1442] Change api function names
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 8 ++++----
Flow.Launcher/PublicAPIInstance.cs | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 6d9e5f755..55f09dc3b 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -479,25 +479,25 @@ namespace Flow.Launcher.Plugin
/// Message will only be logged in Debug mode
///
/// The time taken to execute the method in milliseconds
- public long StopWatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "");
+ public long StopwatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "");
///
/// Log debug message of the time taken to execute a method asynchronously
/// Message will only be logged in Debug mode
///
/// The time taken to execute the method in milliseconds
- public Task StopWatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
+ public Task StopwatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
///
/// Log info message of the time taken to execute a method
///
/// The time taken to execute the method in milliseconds
- public long StopWatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "");
+ public long StopwatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "");
///
/// Log info message of the time taken to execute a method asynchronously
///
/// The time taken to execute the method in milliseconds
- public Task StopWatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
+ public Task StopwatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "");
}
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index b7aaef143..95ef6c9f3 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -432,16 +432,16 @@ namespace Flow.Launcher
public Task UninstallPluginAsync(PluginMetadata pluginMetadata, bool removePluginSettings = false) =>
PluginManager.UninstallPluginAsync(pluginMetadata, removePluginSettings);
- public long StopWatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
+ public long StopwatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
Stopwatch.Debug($"|{className}.{methodName}|{message}", action);
- public Task StopWatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
+ public Task StopwatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
Stopwatch.DebugAsync($"|{className}.{methodName}|{message}", action);
- public long StopWatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
+ public long StopwatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
Stopwatch.Normal($"|{className}.{methodName}|{message}", action);
- public Task StopWatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
+ public Task StopwatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
Stopwatch.NormalAsync($"|{className}.{methodName}|{message}", action);
#endregion
From 19aa42314b7d335768abe33733e9394429acdc56 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:38:33 +0800
Subject: [PATCH 0638/1442] Use api functions in ImageLoader
---
.../Image/ImageLoader.cs | 20 ++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 41a33104b..1483c5865 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -7,13 +7,20 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using Flow.Launcher.Infrastructure.Logger;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.Storage;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Infrastructure.Image
{
public static class ImageLoader
{
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
+ private static readonly string ClassName = nameof(ImageLoader);
+
private static readonly ImageCache ImageCache = new();
private static SemaphoreSlim storageLock { get; } = new SemaphoreSlim(1, 1);
private static BinaryStorage> _storage;
@@ -47,15 +54,14 @@ namespace Flow.Launcher.Infrastructure.Image
_ = Task.Run(async () =>
{
- await Stopwatch.NormalAsync("|ImageLoader.Initialize|Preload images cost", async () =>
+ await API.StopwatchLogInfoAsync(ClassName, "Preload images cost", async () =>
{
foreach (var (path, isFullImage) in usage)
{
await LoadAsync(path, isFullImage);
}
});
- Log.Info(
- $"|ImageLoader.Initialize|Number of preload images is <{ImageCache.CacheSize()}>, Images Number: {ImageCache.CacheSize()}, Unique Items {ImageCache.UniqueImagesInCache()}");
+ API.LogInfo(ClassName, $"Number of preload images is <{ImageCache.CacheSize()}>, Images Number: {ImageCache.CacheSize()}, Unique Items {ImageCache.UniqueImagesInCache()}");
});
}
@@ -71,7 +77,7 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (System.Exception e)
{
- Log.Exception($"|ImageLoader.SaveAsync|Failed to save image cache to file", e);
+ API.LogException(ClassName, "Failed to save image cache to file", e);
}
finally
{
@@ -166,8 +172,8 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (System.Exception e2)
{
- Log.Exception($"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e);
- Log.Exception($"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2);
+ API.LogException(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e);
+ API.LogException(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2);
ImageSource image = ImageCache[Constant.MissingImgIcon, false];
ImageCache[path, false] = image;
From 9bc27a4ecd16a52d2d05a7baee1d33e5555128fd Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Tue, 8 Apr 2025 23:41:15 +1000
Subject: [PATCH 0639/1442] New Crowdin updates (#3348)
---
Flow.Launcher/Languages/ar.xaml | 47 +++++-
Flow.Launcher/Languages/cs.xaml | 47 +++++-
Flow.Launcher/Languages/da.xaml | 47 +++++-
Flow.Launcher/Languages/de.xaml | 69 +++++++--
Flow.Launcher/Languages/es-419.xaml | 47 +++++-
Flow.Launcher/Languages/es.xaml | 47 +++++-
Flow.Launcher/Languages/fr.xaml | 47 +++++-
Flow.Launcher/Languages/he.xaml | 57 +++++--
Flow.Launcher/Languages/it.xaml | 47 +++++-
Flow.Launcher/Languages/ja.xaml | 47 +++++-
Flow.Launcher/Languages/ko.xaml | 53 ++++++-
Flow.Launcher/Languages/nb.xaml | 47 +++++-
Flow.Launcher/Languages/nl.xaml | 47 +++++-
Flow.Launcher/Languages/pl.xaml | 47 +++++-
Flow.Launcher/Languages/pt-br.xaml | 47 +++++-
Flow.Launcher/Languages/pt-pt.xaml | 53 ++++++-
Flow.Launcher/Languages/ru.xaml | 47 +++++-
Flow.Launcher/Languages/sk.xaml | 47 +++++-
Flow.Launcher/Languages/sr.xaml | 47 +++++-
Flow.Launcher/Languages/tr.xaml | 47 +++++-
Flow.Launcher/Languages/uk-UA.xaml | 47 +++++-
Flow.Launcher/Languages/vi.xaml | 47 +++++-
Flow.Launcher/Languages/zh-cn.xaml | 49 +++++-
Flow.Launcher/Languages/zh-tw.xaml | 47 +++++-
.../Languages/sk.xaml | 2 +-
.../Languages/ko.xaml | 2 +-
.../Languages/de.xaml | 4 +-
.../Languages/ar.xaml | 2 +
.../Languages/cs.xaml | 2 +
.../Languages/da.xaml | 2 +
.../Languages/de.xaml | 2 +
.../Languages/es-419.xaml | 2 +
.../Languages/es.xaml | 2 +
.../Languages/fr.xaml | 2 +
.../Languages/he.xaml | 2 +
.../Languages/it.xaml | 2 +
.../Languages/ja.xaml | 2 +
.../Languages/ko.xaml | 2 +
.../Languages/nb.xaml | 2 +
.../Languages/nl.xaml | 2 +
.../Languages/pl.xaml | 2 +
.../Languages/pt-br.xaml | 2 +
.../Languages/pt-pt.xaml | 2 +
.../Languages/ru.xaml | 2 +
.../Languages/sk.xaml | 2 +
.../Languages/sr.xaml | 2 +
.../Languages/tr.xaml | 2 +
.../Languages/uk-UA.xaml | 2 +
.../Languages/vi.xaml | 2 +
.../Languages/zh-cn.xaml | 2 +
.../Languages/zh-tw.xaml | 2 +
.../Languages/de.xaml | 4 +-
.../Languages/he.xaml | 2 +-
.../Languages/de.xaml | 2 +-
.../Languages/ar.xaml | 14 +-
.../Languages/cs.xaml | 14 +-
.../Languages/da.xaml | 14 +-
.../Languages/de.xaml | 20 ++-
.../Languages/es-419.xaml | 14 +-
.../Languages/es.xaml | 14 +-
.../Languages/fr.xaml | 14 +-
.../Languages/he.xaml | 14 +-
.../Languages/it.xaml | 14 +-
.../Languages/ja.xaml | 14 +-
.../Languages/ko.xaml | 14 +-
.../Languages/nb.xaml | 14 +-
.../Languages/nl.xaml | 14 +-
.../Languages/pl.xaml | 14 +-
.../Languages/pt-br.xaml | 14 +-
.../Languages/pt-pt.xaml | 18 ++-
.../Languages/ru.xaml | 14 +-
.../Languages/sk.xaml | 14 +-
.../Languages/sr.xaml | 14 +-
.../Languages/tr.xaml | 14 +-
.../Languages/uk-UA.xaml | 14 +-
.../Languages/vi.xaml | 14 +-
.../Languages/zh-cn.xaml | 14 +-
.../Languages/zh-tw.xaml | 14 +-
.../Languages/ar.xaml | 2 +-
.../Languages/cs.xaml | 2 +-
.../Languages/da.xaml | 2 +-
.../Languages/de.xaml | 8 +-
.../Languages/es-419.xaml | 2 +-
.../Languages/es.xaml | 2 +-
.../Languages/fr.xaml | 2 +-
.../Languages/he.xaml | 2 +-
.../Languages/it.xaml | 2 +-
.../Languages/ja.xaml | 2 +-
.../Languages/ko.xaml | 2 +-
.../Languages/nb.xaml | 2 +-
.../Languages/nl.xaml | 2 +-
.../Languages/pl.xaml | 2 +-
.../Languages/pt-br.xaml | 2 +-
.../Languages/pt-pt.xaml | 2 +-
.../Languages/ru.xaml | 9 +-
.../Languages/sk.xaml | 2 +-
.../Languages/sr.xaml | 2 +-
.../Languages/tr.xaml | 2 +-
.../Languages/uk-UA.xaml | 2 +-
.../Languages/vi.xaml | 2 +-
.../Languages/zh-cn.xaml | 2 +-
.../Languages/zh-tw.xaml | 2 +-
.../Properties/Resources.de-DE.resx | 8 +-
.../Properties/Resources.he-IL.resx | 2 +-
.../Properties/Resources.ko-KR.resx | 2 +-
.../Properties/Resources.pt-PT.resx | 140 +++++++++---------
.../Properties/Resources.sk-SK.resx | 2 +-
107 files changed, 1536 insertions(+), 263 deletions(-)
diff --git a/Flow.Launcher/Languages/ar.xaml b/Flow.Launcher/Languages/ar.xaml
index a57179da6..b5eafaae9 100644
--- a/Flow.Launcher/Languages/ar.xaml
+++ b/Flow.Launcher/Languages/ar.xaml
@@ -7,6 +7,11 @@
انقر فوق لا إذا كان مثبتاً بالفعل، وسوف يطلب منك تحديد المجلد الذي يحتوي على {1} القابل للتنفيذ
الرجاء اختيار الملف التنفيذي لـ {0}
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ تعذر تعيين مسار الملف التنفيذي لـ {0}، يرجى المحاولة من إعدادات Flow (قم بالتمرير إلى الأسفل).فشل في تهيئة الإضافاتالإضافات: {0} - فشل في التحميل وسيتم تعطيلها، يرجى الاتصال بمطور الإضافة للحصول على المساعدة
@@ -37,7 +42,7 @@
وضع اللعبتعليق استخدام مفاتيح التشغيل السريع.إعادة تعيين الموقع
- إعادة تعيين موضع نافذة البحث
+ Type here to searchالإعدادات
@@ -70,8 +75,6 @@
تفريغ الاستعلام الأخيرPreserve Last Action KeywordSelect Last Action Keyword
- ارتفاع ثابت للنافذة
- ارتفاع النافذة غير قابل للتعديل عن طريق السحب.الحد الأقصى للنتائج المعروضةيمكنك أيضًا تعديل هذا بسرعة باستخدام CTRL+Plus وCTRL+Minus.تجاهل مفاتيح التشغيل السريع في وضع ملء الشاشة
@@ -102,6 +105,15 @@
دائمًا معاينةفتح لوحة المعاينة دائمًا عند تنشيط Flow. اضغط على {0} للتبديل بين المعاينة وعدمها.تأثير الظل غير مسموح به بينما يتم تمكين تأثير التمويه في السمة الحالية
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortالبحث عن إضافة
@@ -118,6 +130,8 @@
كلمة الفعل الحاليةكلمة فعل جديدةتغيير كلمات الفعل
+ Plugin seach delay time
+ Change Plugin Seach Delay Timeالأولوية الحاليةأولوية جديدةالأولوية
@@ -131,6 +145,9 @@
إلغاء التثبيتFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ Defaultمتجر الإضافات
@@ -193,8 +210,20 @@
مخصصالساعةالتاريخ
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ بلا
+ Acrylic
+ Mica
+ Mica Altهذه السمة تدعم الوضعين (فاتح/داكن).هذه السمة تدعم الخلفية الضبابية الشفافة.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.مفتاح الاختصار
@@ -294,6 +323,9 @@
مجلد السجلاتمسح السجلاتهل أنت متأكد أنك تريد حذف جميع السجلات؟
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationمعالج الترحيبموقع بيانات المستخدميتم حفظ إعدادات المستخدم والإضافات المثبتة في مجلد بيانات المستخدم. قد يختلف هذا الموقع اعتمادًا على ما إذا كان في وضع النقل أم لا.
@@ -335,9 +367,16 @@
لا يمكن العثور على الإضافة المحددةكلمة المفتاح الجديدة لا يمكن أن تكون فارغةتم تعيين كلمة المفتاح الجديدة هذه إلى إضافة أخرى، يرجى اختيار كلمة أخرى
+ This new Action Keyword is the same as old, please choose a different oneنجاحاكتمل بنجاح
- أدخل كلمة المفتاح التي ترغب في استخدامها لبدء الإضافة. استخدم * إذا كنت لا ترغب في تحديد أي كلمة، وسيتم تشغيل الإضافة بدون كلمات مفتاحية.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeمفتاح اختصار الاستعلام المخصص
diff --git a/Flow.Launcher/Languages/cs.xaml b/Flow.Launcher/Languages/cs.xaml
index 92721b70a..806e9f203 100644
--- a/Flow.Launcher/Languages/cs.xaml
+++ b/Flow.Launcher/Languages/cs.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Herní režimPotlačit užívání klávesových zkratek.Obnovit pozici
- Obnovit pozici vyhledávacího okna
+ Type here to searchNastavení
@@ -70,8 +75,6 @@
Smazat poslední dotazPreserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.Počet zobrazených výsledkůToto nastavení můžete také rychle upravit pomocí CTRL + Plus a CTRL + Minus.Ignorovat klávesové zkratky v režimu celé obrazovky
@@ -102,6 +105,15 @@
Vždy zobrazit náhledPři aktivaci služby Flow vždy otevřete panel náhledu. Stisknutím klávesy {0} přepnete náhled.Stínový efekt není povolen, pokud je aktivní efekt rozostření
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortVyhledat plugin
@@ -118,6 +130,8 @@
Aktuální aktivační příkazNový aktivační příkazUpravit aktivační příkaz
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeAktuální prioritaNová prioritaPriorita
@@ -131,6 +145,9 @@
OdinstalovatFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultObchod s pluginy
@@ -193,8 +210,20 @@
VlastníHodinyDatum
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Klávesová zkratka
@@ -294,6 +323,9 @@
Složka s logyVymazat logyOpravdu chcete odstranit všechny logy?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationPrůvodceUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
Nepodařilo se najít zadaný pluginNový aktivační příkaz nemůže být prázdnýNový aktivační příkaz byl již přiřazen jinému pluginu, vyberte jiný aktivační příkaz
+ This new Action Keyword is the same as old, please choose a different oneÚspěšnéÚspěšně dokončeno
- Zadejte aktivační příkaz, který je nutný ke spuštění pluginu. Pokud nechcete zadávat aktivační příkaz, použijte * a plugin bude spuštěn bez aktivačního příkazu.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeVlastní klávesová zkratka pro vyhledávání
diff --git a/Flow.Launcher/Languages/da.xaml b/Flow.Launcher/Languages/da.xaml
index 629173f74..6055a79e1 100644
--- a/Flow.Launcher/Languages/da.xaml
+++ b/Flow.Launcher/Languages/da.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Game ModeSuspend the use of Hotkeys.Position Reset
- Reset search window position
+ Type here to searchIndstillinger
@@ -70,8 +75,6 @@
Empty last QueryPreserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.Maksimum antal resultater vistYou can also quickly adjust this by using CTRL+Plus and CTRL+Minus.Ignorer genvejstaster i fuldskærmsmode
@@ -102,6 +105,15 @@
Always PreviewAlways open preview panel when Flow activates. Press {0} to toggle preview.Shadow effect is not allowed while current theme has blur effect enabled
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSearch Plugin
@@ -118,6 +130,8 @@
Current action keywordNew action keywordChange Action Keywords
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeCurrent PriorityNew PriorityPriority
@@ -131,6 +145,9 @@
UninstallFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultPlugin Store
@@ -193,8 +210,20 @@
CustomClockDate
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Genvejstast
@@ -294,6 +323,9 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
Kan ikke finde det valgte pluginNyt nøgleord må ikke være tomtNyt nøgleord er tilknyttet et andet plugin, tilknyt venligst et andet nyt nøgeleord
+ This new Action Keyword is the same as old, please choose a different oneFortsætCompleted successfully
- Brug * hvis du ikke vil angive et nøgleord
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeTilpasset søgegenvejstast
diff --git a/Flow.Launcher/Languages/de.xaml b/Flow.Launcher/Languages/de.xaml
index 8a7e3498a..4fb441d8c 100644
--- a/Flow.Launcher/Languages/de.xaml
+++ b/Flow.Launcher/Languages/de.xaml
@@ -7,13 +7,18 @@
Klicken Sie auf „Nein“, wenn es bereits installiert ist, und Sie werden aufgefordert, den Ordner auszuwählen, der die ausführbare Datei {1} enthält
Bitte wählen Sie die ausführbare Datei {0} aus
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Der Pfad zur ausführbaren Datei {0} kann nicht festgelegt werden. Bitte versuchen Sie es in den Einstellungen von Flow (scrollen Sie nach unten).Plug-ins können nicht initialisiert werden
- Plug-ins: {0} - nicht geladen werden und wird deaktiviert, bitte kontaktiere Sie den Ersteller des Plug-ins für Hilfe
+ Plug-ins: {0} - nicht geladen werden und wird deaktiviert, bitte kontaktieren Sie den Ersteller des Plug-ins für HilfeHotkey "{0}" konnte nicht registriert werden. Der Hotkey ist möglicherweise von einem anderen Programm in Verwendung. Wechseln Sie zu einem anderen Hotkey oder beenden Sie das andere Programm.
- Failed to unregister hotkey "{0}". Please try again or see log for details
+ Registrierung des Hotkeys "{0}" konnte nicht aufgehoben werden. Bitte versuchen Sie es erneut oder lesen Sie das Log für DetailsFlow LauncherKonnte nicht gestartet werden {0}Flow Launcher Plug-in-Dateiformat ungültig
@@ -37,7 +42,7 @@
SpielmodusAussetzen der Verwendung von Hotkeys.Position zurücksetzen
- Position des Suchfensters zurücksetze
+ Type here to searchEinstellungen
@@ -45,9 +50,9 @@
Portabler ModusSpeichern Sie alle Einstellungen und Benutzerdaten in einem Ordner (nützlich bei Verwendung von Wechsellaufwerken oder Cloud-Diensten).Flow Launcher bei Systemstart starten
- Use logon task instead of startup entry for faster startup experience
- After uninstallation, you need to manually remove this task (Flow.Launcher Startup) via Task Scheduler
- Fehler bei Einstellungsstart bei Start
+ Log-on-Aufgabe anstelle des Starteintrags für schnelleres Startup-Erfahrung verwenden
+ Nach der Deinstallation müssen Sie diese Aufgabe (Flow.Launcher Startup) via Task-Scheduler manuell entfernen
+ Fehler bei Einstellungsstart beim StartFlow Launcher ausblenden, wenn Fokus verloren gehtVersionsbenachrichtigungen nicht zeigenPosition des Suchfensters
@@ -70,8 +75,6 @@
Letzte Abfrage leerenLetztes Aktions-Schlüsselwort beibehaltenLetztes Aktions-Schlüsselwort auswählen
- Feste Fensterhöhe
- Die Fensterhöhe ist durch Ziehen nicht anpassbar.Maximal gezeigte ErgebnisseSie können dies auch unter Verwendung von STRG+Plus und STRG+Minus schnell anpassen.Hotkeys im Vollbildmodus ignorieren
@@ -102,6 +105,15 @@
Immer VorschauVorschau-Panel immer öffnen, wenn Flow aktiviert ist. Drücken Sie {0}, um Vorschau umzuschalten.Schatteneffekt ist nicht erlaubt, während das aktuelle Theme den Unschärfe-Effekt aktiviert hat
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortPlug-in suchen
@@ -118,6 +130,8 @@
Aktuelles Action-SchlüsselwortNeues Aktions-SchlüsselwortAktions-Schlüsselwörter ändern
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeAktuelle PrioritätNeue PrioritätPriorität
@@ -129,8 +143,11 @@
VersionWebsiteDeinstallieren
- Fail to remove plugin settings
- Plugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Plug-in-Einstellungen können nicht entfernt werden
+ Plug-ins: {0} - Plug-in-Einstellungsdateien können nicht entfernt werden, bitte entfernen Sie diese manuell
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultPlug-in-Store
@@ -193,8 +210,20 @@
BenutzerdefiniertUhrDatum
+ Backdrop-Typ
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Keine
+ Acrylic
+ Mica
+ Mica AltDieses Theme unterstützt zwei Modi (hell/dunkel).Dieses Theme unterstützt Unschärfe und transparenten Hintergrund.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Hotkey
@@ -294,11 +323,14 @@
Ordner »Logs«Logs löschenSind Sie sicher, dass Sie alle Logs löschen wollen?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationAssistentSpeicherort für BenutzerdatenBenutzereinstellungen und installierte Plug-ins werden im Ordner für Benutzerdaten gespeichert. Dieser Speicherort kann variieren, je nachdem, ob sich das Programm im portablen Modus befindet oder nicht.Ordner öffnen
- Log Level
+ Log-EbeneDebugInfo
@@ -335,9 +367,16 @@
Das angegebene Plug-in kann nicht gefunden werdenNeues Aktions-Schlüsselwort darf nicht leer seinDieses neue Aktions-Schlüsselwort ist bereits einem anderen Plug-in zugewiesen, bitte wählen Sie ein anderes
+ Dieses neue Aktions-Schlüsselwort ist dasselbe wie das alte, bitte wählen Sie ein anderesErfolgErfolgreich abgeschlossen
- Geben Sie das Aktions-Schlüsselwort ein, das Sie verwenden möchten, um das Plug-in zu starten. Verwenden Sie *, wenn Sie keines angeben möchten, und das Plug-in wird ohne irgendwelche Aktions-Schlüsselwörter ausgelöst.
+ Geben Sie die Aktions-Schlüsselwörter ein, die Sie zum Starten des Plug-ins verwenden möchten, und trennen Sie sie durch Leerzeichen voneinander ab. Verwenden Sie *, wenn Sie keine spezifizieren möchten, und das Plug-in wird ohne jegliche Aktions-Schlüsselwörter ausgelöst.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeBenutzerdefinierter Abfrage-Hotkey
@@ -388,9 +427,9 @@ Wenn Sie bei der Eingabe eines Shortcuts ein '@'-Präfix hinzufügen, stimmt die
Bericht erfolgreich gesendetBericht konnte nicht gesendet werdenFlow Launcher hat einen Fehler
- Please open new issue in
- 1. Upload log file: {0}
- 2. Copy below exception message
+ Bitte öffnen Sie einen neuen Fall in
+ 1. Logdatei hochladen: {0}
+ 2. Kopieren Sie die Ausnahmemeldung unterhalbBitte warten Sie ...
diff --git a/Flow.Launcher/Languages/es-419.xaml b/Flow.Launcher/Languages/es-419.xaml
index 1ab69727b..23d58eca3 100644
--- a/Flow.Launcher/Languages/es-419.xaml
+++ b/Flow.Launcher/Languages/es-419.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Modo de juegoSuspender el uso de las teclas de acceso directo.Position Reset
- Reset search window position
+ Type here to searchAjustes
@@ -70,8 +75,6 @@
Borrar última consultaPreserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.Máximo de resultados mostradosYou can also quickly adjust this by using CTRL+Plus and CTRL+Minus.Ignorar atajos de teclado en modo pantalla completa
@@ -102,6 +105,15 @@
Always PreviewAlways open preview panel when Flow activates. Press {0} to toggle preview.El efecto de sombra no está permitido mientras el tema actual tenga el efecto de desenfoque habilitado
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSearch Plugin
@@ -118,6 +130,8 @@
Palabra clave actualNueva palabra claveCambiar palabras clave
+ Plugin seach delay time
+ Change Plugin Seach Delay TimePrioridad ActualNueva PrioridadPrioridad
@@ -131,6 +145,9 @@
UninstallFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultTienda de Plugins
@@ -193,8 +210,20 @@
CustomClockDate
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Tecla Rápida
@@ -294,6 +323,9 @@
Carpeta de registrosClear LogsAre you sure you want to delete all logs?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationAsistenteUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
No se puede encontrar el plugin especificadoLa nueva palabra clave no puede estar vacíaEsta palabra clave ya está asignada a otro plugin, por favor elija una diferente
+ This new Action Keyword is the same as old, please choose a different oneÉxitoCompletado con éxito
- Introduzca la palabra clave que desea utilizar para iniciar el plugin. Utilice * si no desea especificar ninguno, y el plugin se activará sin ninguna palabra clave.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeTecla de Acceso Personalizada
diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml
index 4cba4c8a7..8b3c42fa6 100644
--- a/Flow.Launcher/Languages/es.xaml
+++ b/Flow.Launcher/Languages/es.xaml
@@ -7,6 +7,11 @@
Haga clic en no si ya está instalado, y seleccione la carpeta que contiene el ejecutable {1}
Por favor, seleccione el ejecutable {0}
+
+ El ejecutable {0} seleccionado no es válido.
+ {2}{2}
+ Pulsar Sí, si desea seleccionar de nuevo el ejecutable {0}. Pulsar No, si desea descargar {1}
+ No se puede establecer la ruta del ejecutable {0}, por favor inténtelo desde la configuración de Flow (desplácese hacia abajo).Fallo al iniciar los complementosComplemento: {0} - no se pudo cargar y se desactivará, póngase en contacto con el creador del complemento para obtener ayuda
@@ -37,7 +42,7 @@
Modo JuegoSuspende el uso de atajos de teclado.Restablecer posición
- Restablece la posición de la ventana de búsqueda
+ Escribir aquí para buscarConfiguración
@@ -70,8 +75,6 @@
Limpiar la última consultaConservar última palabra clave de acciónSeleccionar última palabra clave de acción
- Altura de la ventana fija
- La altura de la ventana no se puede ajustar arrastrando el ratón.Número máximo de resultados mostradosTambién puede ajustarse rápidamente usando Ctrl+Más(+) y Ctrl+Menos(-).Ignorar atajos de teclado en modo pantalla completa
@@ -102,6 +105,15 @@
Mostrar siempre vista previaMuestra siempre el panel de vista previa al iniciar Flow. Pulsar {0} para mostrar/ocultar la vista previa.El efecto de sombra no está permitido si el tema actual tiene activado el efecto de desenfoque
+ Retardo de búsqueda
+ Retrasa un poco la búsqueda al escribir. Esto reduce los saltos en la interfaz y la carga de resultados.
+ Tiempo de retardo de búsqueda predeterminado
+ Tiempo de retardo predeterminado del complemento tras el que aparecerán los resultados de la búsqueda cuando se deje de escribir.
+ Muy largo
+ Largo
+ Normal
+ Corto
+ Muy cortoBuscar complemento
@@ -118,6 +130,8 @@
Palabra clave de acción actualNueva palabra clave de acciónCambia la palabra clave de acción
+ Tiempo de retardo de la búsqueda del complemento
+ Cambiar tiempo de retardo de la búsqueda del complementoPrioridad actualNueva prioridadPrioridad
@@ -131,6 +145,9 @@
DesinstalarFallo al eliminar la configuración del complementoComplementos: {0} - Fallo al eliminar los archivos de configuración del complemento, por favor elimínelos manualmente
+ Fallo al eliminar la caché del complemento
+ Complementos: {0} - Fallo al eliminar los archivos de caché del complemento, por favor elimínelos manualmente
+ PredeterminadoTienda complementos
@@ -193,8 +210,20 @@
PersonalizadaRelojFecha
+ Tipo de telón de fondo
+ Telón de fondo compatible a partir de Windows 11 build 22000 y superiores
+ Ninguno
+ Acrílico
+ Mica
+ Mica AltEste tema soporta dos modos (claro/oscuro).Este tema soporta fondo transparente desenfocado.
+ Mostrar marcador de posición
+ Mostrar marcador de posición cuando la consulta esté vacía
+ Texto del marcador de posición
+ Cambiar el texto del marcador de posición. La entrada vacía utilizará: {0}
+ Tamaño fijo de la ventana
+ El tamaño de la ventana no se puede ajustar mediante arrastre.Atajo de teclado
@@ -294,6 +323,9 @@
Carpeta de registrosEliminar registros¿Está seguro de que desea eliminar todos los registros?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationAsistenteUbicación de datos del usuarioLa configuración del usuario y los complementos instalados se guardan en la carpeta de datos del usuario. Esta ubicación puede variar dependiendo de si está en modo portable o no.
@@ -335,9 +367,16 @@
No se puede encontrar el complemento especificadoLa nueva palabra clave de acción no puede estar vacíaEsta nueva palabra clave de acción ya está asignada a otro complemento, por favor elija una diferente
+ Esta nueva palabra clave de acción es la misma que la anterior, por favor elija una diferenteCorrectoFinalizado correctamente
- Introduzca la palabra clave que desea utilizar para iniciar el complemento. Utilice * si no desea especificar ninguna, y el complemento se activará sin ninguna palabra clave.
+ Introduzca las palabras clave de acción que desea utilizar para iniciar el complemento y utilice espacios en blanco para separarlas. Utilice * si no desea especificar ninguna, para que el complemento se inicie sin ninguna palabra clave de acción.
+
+
+ Ajuste del tiempo de retardo de búsqueda
+ Seleccionar el tiempo de retardo de búsqueda que se desea utilizar para el complemento. Seleccionar "{0}" si no se desea especificar nada, y el complemento utilizará el tiempo de retardo de búsqueda predeterminado.
+ Tiempo de retardo de búsqueda actual
+ Nuevo tiempo de retardo de búsquedaAtajo de teclado de consulta personalizada
diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml
index d0d1d010d..e46e0dc9d 100644
--- a/Flow.Launcher/Languages/fr.xaml
+++ b/Flow.Launcher/Languages/fr.xaml
@@ -7,6 +7,11 @@
Cliquez sur non s'il est déjà installé, et vous serez invité à sélectionner le dossier qui contient l'exécutable {1}
Veuillez sélectionner l'exécutable {0}
+
+ L'exécutable {0} que vous avez sélectionné est invalide.
+ {2}{2}
+ Cliquez sur oui si vous souhaitez sélectionner l'exécutable {0} à nouveau. Cliquez sur non si vous souhaitez télécharger {1}.
+ Impossible de définir {0} comme chemin d'accès vers l'exécutable. Veuillez essayer à partir des paramètres de Flow (défiler vers le bas).Échec de l'initialisation des pluginsPlugins : {0} - n'ont pas pu être chargés et doivent être désactivés, veuillez contacter le créateur du plugin pour obtenir de l'aide
@@ -37,7 +42,7 @@
Mode jeuSuspend l'utilisation des raccourcis claviers.Réinitialiser la position
- Rétablir la position de la fenêtre de recherche
+ Tapez ici pour rechercherParamètres
@@ -70,8 +75,6 @@
Ne pas afficher la dernière rechercheConserver le mot clé de la dernière actionSélectionnez le mot clé de la dernière action
- Hauteur de fenêtre fixe
- La hauteur de la fenêtre n'est pas réglable par glissement.Résultats maximums à afficherVous pouvez également ajuster ce paramètre en utilisant CTRL+Plus ou CTRL+Moins.Ignore les raccourcis lorsqu'une application est en plein écran
@@ -102,6 +105,15 @@
Toujours prévisualiserToujours ouvrir le panneau d'aperçu lorsque Flow s'active. Appuyez sur {0} pour activer/désactiver l'aperçu.L'effet d'ombre n'est pas autorisé lorsque le thème actuel à un effet de flou activé
+ Délai de recherche
+ Attendre un certain temps pour effectuer une recherche lors de la saisie. Cela permet de réduire les sauts d'interface et la charge des résultats.
+ Délai de recherche par défaut
+ Délai par défaut du plugin après lequel les résultats de la recherche s'affichent lorsque la saisie est interrompue.
+ Très long
+ Long
+ Normal
+ Court
+ Très courtRechercher des plugins
@@ -118,6 +130,8 @@
Mot-clé d'action actuelNouveau mot-clé d'actionChanger les mots-clés d'action
+ Délai de recherche du plugin
+ Modifier le délai de recherche du pluginPriorité actuelleNouvelle prioritéPriorité
@@ -131,6 +145,9 @@
DésinstallerÉchec de la suppression des paramètres du pluginPlugins : {0} - Échec de la suppression des fichiers de configuration des plugins, veuillez les supprimer manuellement
+ Échec de la suppression du cache du plugin
+ Plugins : {0} - Échec de la suppression des fichiers cache des plugins, veuillez les supprimer manuellement
+ DéfautMagasin des Plugins
@@ -193,8 +210,20 @@
PersonnaliséHeureDate
+ Type d'arrière-plan
+ Arrière-plan pris en charge à partir de Windows 11 version 22000 et plus
+ Aucun
+ Acrylique
+ Mica
+ Mica AltCe thème prend en charge deux modes (clair/sombre).Ce thème prend en charge l'arrière-plan flou et transparent.
+ Afficher l'espace réservé
+ Afficher un espace réservé lorsque la requête est vide
+ Texte de l'espace réservé
+ Modifier le texte de l'espace réservé. Les entrées vides utiliseront : {0}
+ Taille de la fenêtre fixe
+ La taille de la fenêtre n'est pas réglable par glissement.Raccourcis
@@ -293,6 +322,9 @@
Répertoire des journauxEffacer le journalÊtes-vous sûr de vouloir supprimer tous les journaux ?
+ Vider les caches
+ Êtes-vous sûr de vouloir supprimer tous les caches ?
+ Échec de l'effacement d'une partie des dossiers et des fichiers. Veuillez consulter le fichier journal pour plus d'informationsAssistantEmplacement des données utilisateurLes paramètres utilisateur et les plugins installés sont enregistrés dans le dossier des données utilisateur. Cet emplacement peut varier selon que vous soyez en mode portable ou non.
@@ -334,9 +366,16 @@
Impossible de trouver le module spécifiLe nouveau mot-clé d'action doit être spécifiLe nouveau mot-clé d'action a été assigné à un autre module, veuillez en choisir un autre
+ Ce nouveau mot-clé d'action est identique à l'ancien, veuillez en choisir un autreAjoutTerminé avec succès
- Saisissez * si vous ne souhaitez pas utiliser de mot-clé spécifique
+ Saisissez les mots-clés d'action que vous souhaitez utiliser pour lancer le plugin et séparez-les par des espaces. Utilisez * si vous ne voulez en spécifier aucun, et le plugin sera déclenché sans aucun mot-clé d'action.
+
+
+ Réglage du délai de recherche
+ Sélectionnez le délai de recherche que vous souhaitez utiliser pour le plugin. Sélectionnez "{0}" si vous ne voulez pas en spécifier, et le plugin utilisera le délai de recherche par défaut.
+ Délai de recherche actuel
+ Nouveau délai de rechercheRequêtes personnalisées
diff --git a/Flow.Launcher/Languages/he.xaml b/Flow.Launcher/Languages/he.xaml
index c912052f1..38e943cda 100644
--- a/Flow.Launcher/Languages/he.xaml
+++ b/Flow.Launcher/Languages/he.xaml
@@ -7,6 +7,11 @@
אם זה כבר מותקן, לחץ על 'לא' ותתבקש לבחור את התיקיה המכילה את קובץ ההפעלה {1}
אנא בחר את קובץ ההפעלה {0}
+
+ קובץ ההפעלה {0} שבחרת אינו חוקי.
+ {2}{2}
+ לחץ על כן אם ברצונך, בחר את {0} ההפעלה הקודמת. לחץ על לא אם ברצונך להוריד את {1}
+ לא ניתן להגדיר נתיב הפעלה {0}, אנא נסה שוב בהגדרות Flow (גלול עד למטה).נכשל בהפעלת תוספיםתוספים: {0} - נכשלו בטעינה ויושבתו, אנא צור קשר עם יוצרי התוספים לקבלת עזרה
@@ -37,7 +42,7 @@
מצב משחקהשהה את השימוש במקשי קיצור.איפוס מיקום
- אפס את מיקום חלון החיפוש
+ הקלד כאן כדי לחפשהגדרות
@@ -70,8 +75,6 @@
נקה שאילתא אחרונהשמור מילת מפתח לפעולה האחרונהבחר מילת מפתח לפעולה האחרונה
- גובה חלון קבוע
- גובה החלון אינו ניתן להתאמה באמצעות גרירה.כמות תוצאות מרביתניתן גם להתאים במהירות באמצעות CTRL+פלוס ו-CTRL+מינוס.התעלם מקיצורי מקשים במצב מסך מלא
@@ -97,11 +100,20 @@
ללאנמוךRegular
- Search with Pinyin
+ חפש באמצעות PinyinAllows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.הצג תמיד תצוגה מקדימהפתח תמיד את לוח התצוגה המקדימה כאשר Flow מופעל. הקש על {0} כדי להחליף את התצוגה המקדימה.לא ניתן להחיל אפקט צל כאשר העיצוב הנוכחי מוגדר לאפקט טשטוש
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortחפש תוסף
@@ -118,6 +130,8 @@
מילת מפתח נוכחית לפעולהמילת מפתח חדשה לפעולהשנה מילות מפתח לפעולה
+ Plugin seach delay time
+ Change Plugin Seach Delay Timeעדיפות נוכחיתעדיפות חדשהעדיפות
@@ -131,6 +145,9 @@
הסר התקנהנכשל בהסרת הגדרות התוסףתוספים: {0} - נכשל בהסרת קבצי הגדרות התוסף, יש להסירם ידנית
+ נכשל בהסרת מטמון התוסף
+ תוספים: {0} - נכשל בהסרת קובצי מטמון התוסף, אנא הסר אותם ידנית
+ Defaultחנות תוספים
@@ -156,7 +173,7 @@
סיירחפש קבצים, תיקיות ובתוכן הקבציםחיפוש באינטרנט
- Search the web with different search engine support
+ חפש באינטרנט עם תמיכה במנועי חיפוש שוניםתוכנההפעל תוכנות כמנהל או כמשתמש אחרProcessKiller
@@ -193,8 +210,20 @@
מותאם אישיתשעוןתאריך
+ סוג רקע
+ התמיכה ב-Backdrop קיימת החל מ-Windows 11 build 22000 ומעלה
+ ללא
+ אקריליק
+ מיקה
+ Mica Altערכת נושא זאת תומך בשני מצבים (בהיר/כהה).ערכת נושא זו תומכת בטשטוש רקע שקוף.
+ הצג מציין מיקום
+ הצג מציין מיקום כאשר השאילתה ריקה
+ טקסט מציין מיקום
+ שנה את טקסט מציין המיקום. אם הקלט ריק, ייעשה שימוש ב: {0}
+ גודל חלון קבוע
+ לא ניתן להתאים את גודל החלון באמצעות גרירה.מקש קיצור
@@ -289,18 +318,21 @@
הערות שחרורטיפים לשימוש
- DevTools
+ כלי פיתוחתיקיית ההגדרותתיקיית יומני רישוםנקה יומני רישוםהאם אתה בטוח שברצונך למחוק את כל היומנים?
+ נקה נתוני מטמון
+ האם אתה בטוח שברצונך למחוק את כל הנתונים שבמטמון?
+ נכשל ניקוי חלק מהתיקיות והקבצים. עיין בלוג לקבלת מידע נוסףאשףמיקום נתוני משתמשהגדרות המשתמש והתוספים המותקנים נשמרים בתיקיית נתוני המשתמש. מיקום זה עשוי להשתנות אם התוכנה במצב נייד.פתח תיקיהLog Level
- Debug
- Info
+ ניפוי שגיאות
+ מידעבחר מנהל קבצים
@@ -335,9 +367,16 @@
לא ניתן למצוא את התוסף שצויןמילת הפעולה החדשה לא יכולה להיות ריקהמילת הפעולה החדשה כבר מוקצה לתוסף אחר, אנא בחר אחת שונה
+ מילת הפעולה החדשה זהה לישנה, נא לבחור מילת פעולה שונההצליחהושלם בהצלחה
- הזן את מילת הפעולה שברצונך להשתמש בה להפעלת התוסף. השתמש ב-* אם אינך רוצה לציין מילה כלשהי, והתוסף יופעל ללא צורך במילת פעולה.
+ הזן את מילות הפעולה שבהן תרצה להשתמש כדי להפעיל את התוסף, והשתמש ברווחים כדי להפריד ביניהן. השתמש ב-* אם אינך רוצה להגדיר כלל, והתוסף יופעל ללא מילות פעולה.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeמקש קיצור לשאילתה מותאמת אישית
diff --git a/Flow.Launcher/Languages/it.xaml b/Flow.Launcher/Languages/it.xaml
index e4d4d3e2c..fd34bf366 100644
--- a/Flow.Launcher/Languages/it.xaml
+++ b/Flow.Launcher/Languages/it.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Modalità giocoSospendere l'uso dei tasti di scelta rapida.Ripristina Posizione
- Ripristina posizione finestra di ricerca
+ Type here to searchImpostazioni
@@ -70,8 +75,6 @@
Cancella ultima ricercaPreserve Last Action KeywordSelect Last Action Keyword
- Altezza Finestra Fissa
- L'altezza della finestra non si può regolare trascinando.Numero massimo di risultati mostratiÈ anche possibile regolarlo rapidamente utilizzando CTRL+Più e CTRL+Meno.Ignora i tasti di scelta rapida in applicazione a schermo pieno
@@ -102,6 +105,15 @@
Mostra Sempre AnteprimaApri sempre il pannello di anteprima quando Flow si attiva. Premi {0} per attivare l'anteprima.L'effetto ombra non è consentito mentre il tema corrente ha un effetto di sfocatura abilitato
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortPlugin di ricerca
@@ -118,6 +130,8 @@
Parola chiave di azione correnteNuova parola chiave d'azioneCambia Keywords Azione
+ Plugin seach delay time
+ Change Plugin Seach Delay TimePriorità AttualeNuova PrioritàPriorità
@@ -131,6 +145,9 @@
DisinstallaFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultNegozio dei Plugin
@@ -193,8 +210,20 @@
PersonalizzatoOrologioData
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Vuoto
+ Acrylic
+ Mica
+ Mica AltQuesto tema supporta due (chiaro/scuro) varianti.Questo tema supporta lo sfondo trasparente blurrato.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Tasti scelta rapida
@@ -294,6 +323,9 @@
Cartella dei LogCancella i logSei sicuro di voler cancellare tutti i log?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardPosizione Dati UtenteLe impostazioni dell'utente e i plugin installati sono salvati nella cartella dati utente. Questa posizione può variare se è in modalità portable o no.
@@ -335,9 +367,16 @@
Impossibile trovare il plugin specificatoLa nuova parola chiave d'azione non può essere vuotaLa nuova parola chiave d'azione è stata assegnata ad un altro plugin, per favore sceglierne una differente
+ This new Action Keyword is the same as old, please choose a different oneSuccessoCompletato con successo
- Usa * se non vuoi specificare una parola chiave d'azione
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeTasti scelta rapida per ricerche personalizzate
diff --git a/Flow.Launcher/Languages/ja.xaml b/Flow.Launcher/Languages/ja.xaml
index 28c334667..e6f2223cd 100644
--- a/Flow.Launcher/Languages/ja.xaml
+++ b/Flow.Launcher/Languages/ja.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
ゲームモードホットキーの使用を一時停止します。位置のリセット
- 検索ウィンドウの位置をリセットします。
+ Type here to search設定
@@ -70,8 +75,6 @@
前回のクエリを消去Preserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.結果の最大表示件数CTRL+PlusとCTRL+Minusを使用すれば、簡単に調整することもできます。ウィンドウがフルスクリーン時にホットキーを無効にする
@@ -102,6 +105,15 @@
常にプレビューするFlow が有効になったとき、常にプレビューパネルを開きます。 {0} を押してプレビューの表示/非表示を切り替えます。現在のテーマでぼかしの効果が有効になっている場合、影の効果を有効にすることはできません
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSearch Plugin
@@ -118,6 +130,8 @@
Current action keywordNew action keywordChange Action Keywords
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeCurrent PriorityNew Priority重要度
@@ -131,6 +145,9 @@
アンインストールFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ Defaultプラグインストア
@@ -193,8 +210,20 @@
カスタム時刻日付
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.ホットキー
@@ -294,6 +323,9 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
プラグインが見つかりません新しいアクションキーボードを空にすることはできません新しいアクションキーボードは他のプラグインに割り当てられています。他のアクションキーボードを指定してください
+ This new Action Keyword is the same as old, please choose a different one成功しましたCompleted successfully
- アクションキーボードを指定しない場合、* を使用してください
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay time
diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml
index d9da26bcb..3aee3f5e4 100644
--- a/Flow.Launcher/Languages/ko.xaml
+++ b/Flow.Launcher/Languages/ko.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
게임 모드단축키 사용을 일시중단합니다.창 위치 초기화
- 검색창 위치 초기화
+ 검색어 입력설정
@@ -45,8 +50,8 @@
포터블 모드모든 설정이 폴더안에 들어갑니다. USB 드라이브나 클라우드로 사용 가능합니다.시스템 시작 시 Flow Launcher 실행
- Use logon task instead of startup entry for faster startup experience
- After uninstallation, you need to manually remove this task (Flow.Launcher Startup) via Task Scheduler
+ 더 빠른 시작을 위해 시작 프로그램 항목 대신 로그온 Task 사용
+ Flow Launcher를 제거한 후에는 작업 스케줄러에서 이 작업(Flow.Launcher Startup)을 수동으로 삭제해야 합니다Error setting launch on startup포커스 잃으면 Flow Launcher 숨김새 버전 알림 끄기
@@ -70,8 +75,6 @@
직전 쿼리 지우기Preserve Last Action KeywordSelect Last Action Keyword
- 창 높이 고정
- 드래그로 창 높이를 조정하지 않습니다.표시할 결과 수Ctrl + '+'키와 Ctrl + '-'키로도 빠르게 조정할 수 있습니다전체화면 모드에서는 단축키 무시
@@ -89,7 +92,7 @@
자동 업데이트선택시작 시 Flow Launcher 숨김
- Flow Launcher search window is hidden in the tray after starting up.
+ Flowr Launcher가 트레이에 숨겨진 상태로 시작합니다.트레이 아이콘 숨기기트레이에서 아이콘을 숨길 경우, 검색창 우클릭으로 설정창을 열 수 있습니다.쿼리 검색 정밀도
@@ -102,6 +105,15 @@
항상 미리보기Flow 사용시 항상 미리보기 패널을 열어둡니다. {0} 키를 눌러 프리뷰창을 켜고 끌 수 있습니다.반투명 흐림 효과를 사용하는 경우, 그림자 효과를 쓸 수 없습니다.
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very short플러그인 검색
@@ -118,6 +130,8 @@
현재 액션 키워드새 액션 키워드액션 키워드 변경
+ Plugin seach delay time
+ Change Plugin Seach Delay Time현재 중요도:새 중요도:중요도
@@ -131,6 +145,9 @@
제거Fail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ Default플러그인 스토어
@@ -193,8 +210,20 @@
사용자 정의시계날짜
+ 배경 효과 타입
+ Backdrop supported starting from Windows 11 build 22000 and above
+ 없음
+ 아크릴
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ 안내 텍스트 표시
+ 입력 내용이 없을때 입력창 위치를 알 수 있는 텍스트를 표시합니다
+ 안내 텍스트
+ 안내 텍스트를 변경하세요. 아무것도 입력하지 않으면 다음을 사용합니다: "{0}"
+ Fixed Window Size
+ The window size is not adjustable by dragging.단축키
@@ -294,6 +323,9 @@
로그 폴더로그 삭제정말 모든 로그를 삭제하시겠습니까?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more information마법사사용자 데이터 위치사용자 설정과 설치된 플러그인은 사용자 데이터 폴더에 저장됩니다. 이 위치는 휴대용 모드 활성화 여부에 따라 달라질 수 있습니다.
@@ -335,9 +367,16 @@
플러그인을 찾을 수 없습니다.새 액션 키워드를 입력하세요.새 액션 키워드가 할당된 플러그인이 이미 있습니다. 다른 액션 키워드를 입력하세요.
+ This new Action Keyword is the same as old, please choose a different one성공성공적으로 완료했습니다.
- 플러그인을 시작하는데 필요한 액션 키워드를 입력하세요. 액션 키워드를 지정하지 않으려면 *를 사용하세요. 이 경우 키워드를 입력하지 않아도 동작합니다.
+ 플러그인을 실행할 때 사용할 액션 키워드를 입력하세요. 여러 개를 입력할 경우 공백으로 구분하세요. 아무 키워드도 지정하지 않으려면 * 를 입력하세요. 이 경우 액션 키워드 없이도 플러그인이 실행됩니다.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay time사용자지정 쿼리 단축키
diff --git a/Flow.Launcher/Languages/nb.xaml b/Flow.Launcher/Languages/nb.xaml
index a37a204e1..b78bcb7d7 100644
--- a/Flow.Launcher/Languages/nb.xaml
+++ b/Flow.Launcher/Languages/nb.xaml
@@ -7,6 +7,11 @@
Klikk nei hvis det allerede er installert, og du vil bli bedt om å velge mappen som inneholder {1} kjørbar fil
Velg den kjørbare filen for {0}
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Kan ikke angi {0} kjørbar bane, prøv fra Flows innstillinger (bla ned til bunnen).Mislykkes i å initialisere programtilleggProgramtillegg: {0} - mislykkes å lastes inn og vil bli deaktivert, vennligst kontakt utvikleren av programtillegget for hjelp
@@ -37,7 +42,7 @@
SpillmodusStopp bruken av hurtigtaster.Tilbakestilling av posisjon
- Tilbakestill posisjonen til søkevinduet
+ Type here to searchInnstillinger
@@ -70,8 +75,6 @@
Tøm siste spørringPreserve Last Action KeywordSelect Last Action Keyword
- Fast vindushøyde
- Vindushøyden kan ikke justeres ved å dra.Maksimalt antall resultater vistDu kan også raskt justere dette ved å bruke CTRL+Plus og CTRL+Minus.Ignorer hurtigtaster i fullskjermmodus
@@ -102,6 +105,15 @@
Alltid forhåndsvisningÅpne alltid forhåndsvisningspanel når Flow aktiveres. Trykk på {0} for å velge forhåndsvisning.Skyggeeffekt er ikke tillatt mens gjeldende tema har uskarphet-effekt aktivert
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSøk etter programtillegg
@@ -118,6 +130,8 @@
Nåværende handlingsnøkkelordNytt handlingsnøkkelordEndre handlingsnøkkelord
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeGjeldende prioritetNy prioritetPrioritet
@@ -131,6 +145,9 @@
AvinstallerFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultProgramtillegg butikk
@@ -193,8 +210,20 @@
EgendefinertKlokkeDato
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Ingen
+ Acrylic
+ Mica
+ Mica AltDette temaet støtter to (lys/mørk) moduser.Dette temaet støtter uskarp gjennomsiktig bakgrunn.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Hurtigtast
@@ -294,6 +323,9 @@
LoggmappeTøm loggerEr du sikker på at du vil slette alle loggene?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationVeiviserPlassering av brukerdataBrukerinnstillinger og installerte programtillegg lagres i brukerens datamappe. Denne plasseringen kan variere avhengig av om den er i portabel modus eller ikke.
@@ -335,9 +367,16 @@
Kan ikke finne spesifisert programtilleggNytt handlingsnøkkelord kan ikke være tomDet nye nøkkelordet for handling er allerede tilordnet et annet programtillegg, velg et annet
+ This new Action Keyword is the same as old, please choose a different oneVellykketFullført vellykket
- Skriv inn handlingsnøkkelord du vil bruke for å starte programtillegget. Bruk * hvis du ikke ønsker å spesifisere noen, og utvidelsen vil bli utløst uten noen handlingsord.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeHurtigtast for egendefinert spørring
diff --git a/Flow.Launcher/Languages/nl.xaml b/Flow.Launcher/Languages/nl.xaml
index 64adccd94..ce3406142 100644
--- a/Flow.Launcher/Languages/nl.xaml
+++ b/Flow.Launcher/Languages/nl.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
SpelmodusStop het gebruik van Sneltoetsen.Positie resetten
- Positie zoekvenster resetten
+ Type here to searchInstellingen
@@ -70,8 +75,6 @@
Laatste zoekopdracht verwijderenPreserve Last Action KeywordSelect Last Action Keyword
- Vaste venster hoogte
- De vensterhoogte is niet aanpasbaar door te slepen.Laat maximale resultaten zienJe kunt dit ook snel aanpassen met CTRL+Plus en CTRL+Minus.Negeer sneltoetsen in vol scherm modus
@@ -102,6 +105,15 @@
Altijd voorbeeldOpen altijd het voorbeeld paneel wanneer Flow activeert. Druk op {0} om voorbeeld te schakelen.Schaduw effect is niet toegestaan omdat het huidige thema een vervagingseffect heeft
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortPlug-ins zoeken
@@ -118,6 +130,8 @@
Huidige actie sneltoetsNieuw actie sneltoetsWijzig actie-sneltoets
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeHuidige PrioriteitNieuwe PrioriteitPrioriteit
@@ -131,6 +145,9 @@
VerwijderenFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultPlugin Winkel
@@ -193,8 +210,20 @@
AangepastKlokDatum
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltDit thema ondersteunt twee (licht/donker) modi.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Sneltoets
@@ -294,6 +323,9 @@
Log MapLogbestanden wissenWeet u zeker dat u alle logbestanden wilt verwijderen?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardGegevenslocatie van gebruikerGebruikersinstellingen en geïnstalleerde plug-ins worden opgeslagen in de gebruikersgegevensmap. Deze locatie kan variëren afhankelijk van of het in draagbare modus is of niet.
@@ -335,9 +367,16 @@
Kan plugin niet vindenNieuwe actie sneltoets moet ingevuld wordenNieuwe actie sneltoets is toegewezen aan een andere plugin, wijs een nieuwe actie sneltoets aan
+ This new Action Keyword is the same as old, please choose a different oneSuccesvolSuccesvol afgerond
- Gebruik * wanneer je geen nieuwe actie sneltoets wilt specificeren
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeCustom Query Sneltoets
diff --git a/Flow.Launcher/Languages/pl.xaml b/Flow.Launcher/Languages/pl.xaml
index 06204395c..12af37c3e 100644
--- a/Flow.Launcher/Languages/pl.xaml
+++ b/Flow.Launcher/Languages/pl.xaml
@@ -7,6 +7,11 @@
Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy poproszony o wybranie folderu zawierającego plik wykonywalny {1}
Wybierz plik wykonywalny {0}
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Nie można ustawić ścieżki do pliku wykonywalnego {0}. Spróbuj ponownie w ustawieniach Flow (przewiń na sam dół).Nie udało się zainicjować wtyczekWtyczki: {0} – nie udało się ich wczytać i zostaną wyłączone. Skontaktuj się z twórcą wtyczki, aby uzyskać pomoc
@@ -37,7 +42,7 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Tryb graniaWstrzymaj używanie skrótów.Resetowanie pozycji
- Zresetuj pozycję okna wyszukiwania
+ Type here to searchUstawienia
@@ -70,8 +75,6 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Puste ostatnie zapytanieZachowaj ostatnie słowo kluczowe akcjiWybierz ostatnie słowo kluczowe akcji
- Stała wysokość okna
- Wysokość okna nie jest regulowana poprzez przeciąganie.Maksymalna liczba wynikówMożesz to również szybko dostosować używając CTRL+Plus i CTRL+Minus.Ignoruj skróty klawiszowe w trybie pełnoekranowym
@@ -102,6 +105,15 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Zawsze podglądZawsze otwieraj panel podglądu, gdy aktywowany jest Flow. Naciśnij {0}, aby przełączyć podgląd.Efekt cienia jest niedozwolony, gdy bieżący motyw ma włączony efekt rozmycia
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSzukaj wtyczek
@@ -118,6 +130,8 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Bieżące słowo kluczowe akcjiNowe słowo kluczowe akcjiZmień słowa kluczowe akcji
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeObecny PriorytetNowy PriorytetPriorytet
@@ -131,6 +145,9 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
OdinstalowywanieNie udało się usunąć ustawień wtyczkiWtyczki: {0} – nie udało się usunąć plików ustawień wtyczek, usuń je ręcznie
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultSklep z wtyczkami
@@ -193,8 +210,20 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
NiestandardowaZegarData
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Brak
+ Acrylic
+ Mica
+ Mica AltTen motyw obsługuje dwa tryby (jasny/ciemny).Ten motyw obsługuje rozmyte przezroczyste tło.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Skrót klawiszowy
@@ -294,6 +323,9 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Folder dziennikaWyczyść logiCzy na pewno chcesz usunąć wszystkie logi?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationKreatorLokalizacja danych użytkownikaUstawienia użytkownika i zainstalowane wtyczki są zapisywane w folderze danych użytkownika. Ta lokalizacja może się różnić w zależności od tego, czy aplikacja jest w trybie przenośnym, czy nie.
@@ -335,9 +367,16 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Nie można odnaleźć podanej wtyczkiNowy wyzwalacz nie może być pustyTen wyzwalacz został już przypisany do innej wtyczki, musisz podać inny wyzwalacz.
+ This new Action Keyword is the same as old, please choose a different oneSukcesZakończono pomyślnie
- Użyj * jeżeli nie chcesz podawać wyzwalacza
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeSkrót klawiszowy niestandardowych zapyta
diff --git a/Flow.Launcher/Languages/pt-br.xaml b/Flow.Launcher/Languages/pt-br.xaml
index 62293b1a1..d0040d799 100644
--- a/Flow.Launcher/Languages/pt-br.xaml
+++ b/Flow.Launcher/Languages/pt-br.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Modo GamerSuspender o uso de Teclas de Atalho.Redefinição de Posição
- Redefinir posição da janela de busca
+ Type here to searchConfigurações
@@ -70,8 +75,6 @@
Limpar última consultaPreserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.Máximo de resultados mostradosVocê também pode ajustar isso rapidamente usando CTRL+Mais e CTRL+Menos.Ignorar atalhos em tela cheia
@@ -102,6 +105,15 @@
Sempre Pré-visualizarSempre abrir o painel de pré-visualização quando o Flow é ativado. Pressione {0} para ativar ou desativar a pré-visualização.O efeito de sombra não é permitido enquanto o tema atual tem o efeito de desfoque ativado
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortBuscar Plugin
@@ -118,6 +130,8 @@
Palavra-chave de ação atualNova palavra-chave de açãoAlterar Palavras-chave de Ação
+ Plugin seach delay time
+ Change Plugin Seach Delay TimePrioridade atualNova PrioridadePrioridade
@@ -131,6 +145,9 @@
DesinstalarFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultLoja de Plugins
@@ -193,8 +210,20 @@
PersonalizadoRelógioData
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Atalho
@@ -294,6 +323,9 @@
Pasta de RegistroLimpar RegistrosTem certeza que quer excluir todos os registros?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationAssistenteUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
Não foi possível encontrar o plugin especificadoA nova palavra-chave da ação não pode ser vaziaA nova palavra-chave da ação já foi atribuída a outro plugin, por favor tente outra
+ This new Action Keyword is the same as old, please choose a different oneSucessoConcluído com sucesso
- Use * se não quiser especificar uma palavra-chave de ação
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeAtalho de Consulta Personalizada
diff --git a/Flow.Launcher/Languages/pt-pt.xaml b/Flow.Launcher/Languages/pt-pt.xaml
index bad37f688..9dc520cbd 100644
--- a/Flow.Launcher/Languages/pt-pt.xaml
+++ b/Flow.Launcher/Languages/pt-pt.xaml
@@ -7,6 +7,11 @@
Clique "Não" se já tiver instalado e, de seguida, ser-lhe-á solicitada a pasta que contém o executável {1}.
Por favor, selecione o executável {0}
+
+ O executável {0} é inválido.
+ {2}{2}
+ Clique Sim se quiser escolher o novo executável {0}. Clique Não se quiser descarregar {1}.
+ Não foi possível definir o caminho do executável {0}. Experimente definir o caminho nas definições (desloque até ao fundo).Falha ao iniciar os pluginsPlugin: {0} - não foi possível iniciar e será desativado. Contacte o criador do plugin para obter ajuda.
@@ -37,7 +42,7 @@
Modo de jogoSuspender utilização das teclas de atalhoRepor posição
- Repor posição da janela de pesquisa
+ Escreva aqui para pesquisarDefinições
@@ -70,8 +75,6 @@
Limpar última consultaManter palavra-chave da última açãoSelecionar palavra-chave da última ação
- Altura fixa de janela
- Não é possível ajustar o tamanho da janela por arrasto.Número máximo de resultadosTambém pode ajustar rapidamente através do atalho Ctrl+ e Ctrl-.Ignorar teclas de atalho se em ecrã completo
@@ -102,6 +105,15 @@
Pré-visualizar sempreAbrir painel de pré-visualização ao ativar Flow Launcher. Prima {0} para comutar a pré-visualização.O efeito sombra não é permitido com este tema porque o efeito desfocar está ativo
+ Atraso da pesquisa
+ Tempo a esperar após a digitação. Esta definição melhora o carregamento dos resultados.
+ Tempo de espera padrão
+ O valor padrão a esperar, antes de iniciar a pesquisa após terminar a digitação.
+ Muito longo
+ Longo
+ Normal
+ Curto
+ Muito curtoPesquisar plugins
@@ -118,6 +130,8 @@
Palavra-chave atualNova palavra-chaveAlterar palavras-chave
+ Tempo de espera do plugin
+ Alterar tempo de espera do pluginPrioridade atualNova prioridadePrioridade
@@ -131,6 +145,9 @@
DesinstalarFalha ao remover as definições do pluginPlugin: {0} - Falha ao remover o ficheiro de definições do plugin. Experimente remover manualmente.
+ Falha ao limpar a cache do plugin
+ Plugin: {0} - Falha ao remover os ficheiros em cache do plugin. Experimente remover manualmente.
+ PadrãoLoja de plugins
@@ -193,8 +210,20 @@
PersonalizadaRelógioData
+ Tipo de fundo
+ Esta opção apenas está disponível em sistemas após Windows 11 Build 22000
+ Nenhuma
+ Acrílico
+ Mica
+ Mica alternativoEste tema tem suporte a dois modos (claro/escuro).Este tema tem suporte a fundo transparente desfocado.
+ Mostrar marcador de posição
+ Mostrar marcador de posição se a consulta estiver vazia
+ Texto do marcador
+ O texto do marcador de posição. Se vazio, será utilizado: {0}
+ Janela com tamanho fixo
+ Não pode ajustar o tamanho da janela por arrasto.Tecla de atalho
@@ -293,13 +322,16 @@
Pasta de registosLimpar registosTem a certeza de que deseja remover todos os registos?
+ Limpar cache
+ Tem a certeza de que pretende limpar todas as caches?
+ Não foi possível limpar todas as pastas e ficheiros. Consulte o ficheiro de registo para mais informações.AssistenteLocalização dos dados do utilizadorAs definições e os plugins instalados são guardados na pasta de dados do utilizador. A localização pode variar, tendo em conta se a aplicação está instalada ou no modo portátilAbrir pasta
- Log Level
- Debug
- Info
+ Nível de registo
+ Depuração
+ InformaçãoSelecione o gestor de ficheiros
@@ -334,9 +366,16 @@
Plugin não encontradoA nova palavra-chave não pode estar vaziaEsta palavra-chave já está associada a um plugin. Por favor escolha outra.
+ A palavra-chave escolhida é igual à anterior. Por favor escolha outra.SucessoTerminado com sucesso
- Introduza a palavra-chave a utilizar para iniciar o plugin. Utilize * se não quiser utilizar esta funcionalidade e o plugin não será ativado com palavras-chave.
+ Introduza as palavras-chave que pretende utilizar para iniciar o plugin e um espaço vazio caso queira mais do que uma. Utilize * se não quiser especificar uma palavra-chave e o plugin será ativado sem palavras-chave.
+
+
+ Definição do tempo de espera
+ Selecione o tempo de espera que pretende utilizar com este plugin. Selecione "{0}" se não o quiser especificar e, desta forma, o plugin irá utilizar o tempo de espera padrão.
+ Tempo de espera atual
+ Novo tempo de esperaTecla de atalho personalizada
diff --git a/Flow.Launcher/Languages/ru.xaml b/Flow.Launcher/Languages/ru.xaml
index a56a770da..c38855474 100644
--- a/Flow.Launcher/Languages/ru.xaml
+++ b/Flow.Launcher/Languages/ru.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Игровой режимПриостановить использование горячих клавиш.Сброс положения
- Сброс положения окна поиска
+ Type here to searchНастройки
@@ -70,8 +75,6 @@
Очистить последний запросPreserve Last Action KeywordSelect Last Action Keyword
- Фиксированная высота окна
- The window height is not adjustable by dragging.Максимальное количество результатовВы также можете быстро настроить это с помощью CTRL+плюс и CTRL+минус.Игнорировать горячие клавиши в полноэкранном режиме
@@ -102,6 +105,15 @@
Всегда предпросмотрВсегда открывать панель предварительного просмотра при запуске Flow. Нажмите {0}, чтобы переключить предварительный просмотр.Эффект тени не допускается, если в текущей теме включён эффект размытия
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortПоиск плагина
@@ -118,6 +130,8 @@
Ключевое слово текущего действияКлючевое слово нового действияИзменить ключевое слово действия
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeТекущий приоритетНовый приоритетПриоритет
@@ -131,6 +145,9 @@
УдалитьFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultМагазин плагинов
@@ -193,8 +210,20 @@
СвояЧасыДата
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Горячая клавиша
@@ -294,6 +323,9 @@
Папка журналаОчистить журналВы уверены, что хотите удалить все журналы?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationМастерUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
Не удалось найти заданный плагинНовая горячая клавиша не может быть пустойНовая горячая клавиша уже используется другим плагином. Пожалуйста, задайте новую
+ This new Action Keyword is the same as old, please choose a different oneУспешноВыполнено успешно
- Введите горячую клавишу, которое вы хотите использовать для запуска плагина. Используйте *, если вы не хотите ничего указывать, и плагин будет запускаться без каких-либо горячих клавиш.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeЗадаваемые горячие клавиши для запросов
diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml
index 332528b2b..0f07387c6 100644
--- a/Flow.Launcher/Languages/sk.xaml
+++ b/Flow.Launcher/Languages/sk.xaml
@@ -7,6 +7,11 @@
Ak už ho máte nainštalovaný, kliknite na nie, a budete vyzvaný na zadanie cesty k priečinku spustiteľného súboru {1}
Vyberte spustiteľný súbor {0}
+
+ Vybrali ste nesprávny spustiteľný súbor {0}.
+ {2}{2}
+ Ak chcete znovu vybrať spustiteľný súbor {0}, kliknite na Áno. Kliknutím na Nie sa stiahne {1}.
+ Nie je možné nastaviť cestu ku spustiteľnému súboru {0}, skúste to v nastaveniach Flowu (prejdite nadol).Nepodarilo sa inicializovať pluginyPluginy: {0} – nepodarilo sa načítať a mal by byť zakázaný, na pomoc kontaktujte autora pluginu
@@ -37,7 +42,7 @@
Herný režimPozastaviť používanie klávesových skratiek.Resetovať pozíciu
- Resetovať pozíciu vyhľadávacieho okna
+ Zadajte text na vyhľadávanieNastavenia
@@ -70,8 +75,6 @@
VymazaťPonechať posledný akčný príkazOznačiť posledný akčný príkaz
- Pevná výška okna
- Výška okna sa nedá nastaviť ťahaním.Maximum výsledkovTúto hodnotu môžete rýchlo upraviť aj pomocou klávesových skratiek CTRL + znamienko plus (+) a CTRL + znamienko mínus (-).Ignorovať klávesové skratky v režime na celú obrazovku
@@ -102,6 +105,15 @@
Vždy zobraziť náhľadPri aktivácii Flowu vždy otvoriť panel s náhľadom. Stlačením klávesu {0} prepnete náhľad.Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostrenia
+ Oneskorenie vyhľadávania
+ Pri písaní sa na chvíľu oneskorí vyhľadávanie. Tým sa zníži skákanie rozhrania a načítanie výsledkov.
+ Predvolené oneskorenie vyhľadávania
+ Predvolené oneskorenie pluginu, po ktorom sa zobrazia výsledky vyhľadávania po zastavení písania.
+ Veľmi dlhé
+ Dlhé
+ Normálne
+ Krátke
+ Veľmi krátkeVyhľadať plugin
@@ -118,6 +130,8 @@
Aktuálny aktivačný príkazNový aktivačný príkazUpraviť aktivačný príkaz
+ Oneskorenie vyhľadávania pomocou pluginu
+ Zmení oneskorenie vyhľadávania pomocou pluginuAktuálna prioritaNová prioritaPriorita
@@ -131,6 +145,9 @@
OdinštalovaťNepodarilo sa odstrániť nastavenia pluginuPluginy: {0} – Nepodarilo sa odstrániť súbory s nastaveniami pluginu, odstráňte ich manuálne
+ Nepodarilo sa odstrániť vyrovnávaciu pamäť pluginu
+ Pluginy: {0} – Nepodarilo sa odstrániť vyrovnávaciu pamäť pluginu, odstráňte ju manuálne
+ PredvolenéRepozitár pluginov
@@ -193,8 +210,20 @@
VlastnéHodinyDátum
+ Typ pozadia
+ Backdrop je podporovaný od Windows 11 zostava 22000 a novších
+ Žiadna
+ Acrylic
+ Mica
+ Mica AltTento motív podporuje 2 režimy (svetlý/tmavý).Tento motív podporuje rozostrenie priehľadného pozadia.
+ Zobraziť zástupný text
+ Zobrazí zástupný text v prázdnom vyhľadávacom poli
+ Zástupný text
+ Zobrazí zástupný text. V prázdnom poli sa zobrazí: {0}
+ Pevná veľkosť okna
+ Veľkosť okna sa nedá nastaviť ťahaním.Klávesové skratky
@@ -294,6 +323,9 @@
Priečinok s logmiVymazať logyNaozaj chcete odstrániť všetky logy?
+ Vymazať vyrovnávaciu pamäť
+ Naozaj chcete vymazať všetky vyrovnávacie pamäte?
+ Nepodarilo sa odstrániť niektoré priečinky a súbory. Pre viac informácií si pozrite súbor loguSprievodcaCesta k používateľskému priečinkuNastavenia používateľa a nainštalované pluginy sa ukladajú do používateľského priečinka. Toto umiestnenie sa môže líšiť v závislosti od toho, či je v prenosnom režime alebo nie.
@@ -335,9 +367,16 @@
Nepodarilo sa nájsť zadaný pluginNový aktivačný príkaz nemôže byť prázdnyNový aktivačný príkaz už bol priradený inému pluginu, prosím, zvoľte iný aktivačný príkaz
+ Tento nový aktivačný príkaz je rovnaký ako starý, vyberte inýÚspešnéÚspešne dokončené
- Zadajte aktivačný príkaz, ktorý je potrebný na spustenie pluginu. Ak nechcete zadať aktivačný príkaz, použite * a plugin bude spustený bez aktivačného príkazu.
+ Zadajte aktivačné príkazy, ktoré chcete používať na spustenie pluginu a oddeľte ich medzerou. Ak nechcete zadať aktivačný príkaz, použite * a plugin bude spustený bez aktivačného príkazu.
+
+
+ Nastavenie oneskoreného vyhľadávania
+ Vyberte oneskorenie vyhľadávania, ktoré chcete použiť pre plugin. Ak vyberiete "{0}", plugin použije predvolené oneskorenie vyhľadávania.
+ Aktuálne oneskorenie vyhľadávania
+ Nové oneskorenie vyhľadávaniaKlávesová skratka vlastného vyhľadávania
diff --git a/Flow.Launcher/Languages/sr.xaml b/Flow.Launcher/Languages/sr.xaml
index b244c4660..1d1eb9120 100644
--- a/Flow.Launcher/Languages/sr.xaml
+++ b/Flow.Launcher/Languages/sr.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Game ModeSuspend the use of Hotkeys.Position Reset
- Reset search window position
+ Type here to searchPodešavanja
@@ -70,8 +75,6 @@
Isprazni poslednji UpitPreserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.Maksimum prikazanih rezultataYou can also quickly adjust this by using CTRL+Plus and CTRL+Minus.Ignoriši prečice u fullscreen režimu
@@ -102,6 +105,15 @@
Always PreviewAlways open preview panel when Flow activates. Press {0} to toggle preview.Shadow effect is not allowed while current theme has blur effect enabled
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSearch Plugin
@@ -118,6 +130,8 @@
Current action keywordNew action keywordChange Action Keywords
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeCurrent PriorityNew PriorityPriority
@@ -131,6 +145,9 @@
UninstallFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultPlugin Store
@@ -193,8 +210,20 @@
CustomClockDate
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Prečica
@@ -294,6 +323,9 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardUser Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
Navedeni plugin nije moguće pronaćiPrečica za novu radnju ne može da bude praznaPrečica za novu radnju je dodeljena drugom plugin-u, molim Vas dodelite drugu prečicu
+ This new Action Keyword is the same as old, please choose a different oneUspešnoCompleted successfully
- Koristite * ako ne želite da navedete prečicu za radnju
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeprečica za ručno dodat upit
diff --git a/Flow.Launcher/Languages/tr.xaml b/Flow.Launcher/Languages/tr.xaml
index 5d550ebed..b9b5d351e 100644
--- a/Flow.Launcher/Languages/tr.xaml
+++ b/Flow.Launcher/Languages/tr.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Oyun ModuKısayol tuşlarının kullanımını durdurun.Pencere Konumunu Sıfırla
- Arama penceresinin konumunu sıfırla
+ Type here to searchAyarlar
@@ -70,8 +75,6 @@
Sorgu Kutusunu TemizlePreserve Last Action KeywordSelect Last Action Keyword
- Sabit Pencere Yükseliği
- Pencere yüksekliği sürükleme ile ayarlanamaz.Maksimum Sonuç SayısıBunu CTRL + ve CTRL - kısayollarıyla da ayarlayabilirsiniz.Tam Ekran Modunda Kısayol Tuşunu Gözardı Et
@@ -102,6 +105,15 @@
ÖnizlemeÖnizleme panelini her zaman aç. Önizlemeyi bu ayardan bağımsız {0} kısayolu ile açıp kapatabilirsiniz.Mevcut temada bulanıklık efekti etkinken gölgelendirme efektine izin verilmez
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortEklenti Ara
@@ -118,6 +130,8 @@
Geçerli anahtar kelimeYeni anahtar kelimeAnahtar kelimeyi değiştir
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeMevcut öncelikYeni ÖncelikÖncelik
@@ -131,6 +145,9 @@
KaldırFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultEklenti Mağazası
@@ -193,8 +210,20 @@
ÖzelSaatTarih
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Hiçbiri
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Kısayol Tuşu
@@ -294,6 +323,9 @@
Günlük KlasörüGünlükleri TemizleTüm günlük kayıtlarını silmek istediğinize emin misiniz?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationKurulum SihirbazıKullanıcı Verisi DiziniKullanıcı ayarları ve yüklü eklentiler bu klasörde saklanır. Klasörün konumu taşınabilir moda bağlı olarak değişebilir.
@@ -335,9 +367,16 @@
Belirtilen eklenti bulunamadıYeni anahtar kelime boş olamazYeni anahtar kelime başka bir eklentiye atanmış durumda. Lütfen başka bir anahtar kelime seçin.
+ This new Action Keyword is the same as old, please choose a different oneBaşarılıBaşarıyla tamamlandı
- Herhangi bir anahtar kelime belirlemek istemiyorsanız * kullanın
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeÖzel Sorgu Kısayolları
diff --git a/Flow.Launcher/Languages/uk-UA.xaml b/Flow.Launcher/Languages/uk-UA.xaml
index 95a746a51..427511c66 100644
--- a/Flow.Launcher/Languages/uk-UA.xaml
+++ b/Flow.Launcher/Languages/uk-UA.xaml
@@ -7,6 +7,11 @@
Клацніть Ні, якщо воно вже встановлене, і вам буде запропоновано вибрати теку, яка містить виконуваник {1}
Будласка оберіть виконуваник {0}
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Не вдається встановити шлях до виконуваника {0}, будласка спробуйте в налаштуваннях Flow (прокрутіть вниз до кінця).Невдача ініціалізації плагінівПлагіни: {0} - не вдалося підвантажити і буде вимкнено, зверніться за допомогою до автора плагіна
@@ -37,7 +42,7 @@
Режим гриПризупинити використання гарячих клавіш.Скидання позиції
- Скинути положення вікна пошуку
+ Type here to searchНалаштування
@@ -70,8 +75,6 @@
Очистити останній запитPreserve Last Action KeywordSelect Last Action Keyword
- Фіксована висота вікна
- Висота вікна не регулюється перетягуванням.Максимальна кількість результатівВи також можете швидко налаштувати цей параметр за допомогою клавіш CTRL+Плюс чи CTRL+Мінус.Ігнорувати гарячі клавіші в повноекранному режимі
@@ -102,6 +105,15 @@
Завжди переглядатиЗавжди відкривати панель попереднього перегляду при активації Flow. Натисніть {0}, щоб переключити попередній перегляд.Ефект тіні не дозволено, коли поточна тема має ефект розмиття
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortПлагін для пошуку
@@ -118,6 +130,8 @@
Поточна гаряча клавішаНова гаряча клавішаЗмінити гарячі клавіши
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeПоточний пріоритетНовий пріоритетПріоритет
@@ -131,6 +145,9 @@
ВидалитиFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultМагазин плагінів
@@ -193,8 +210,20 @@
КористувацькаГодинникДата
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Нема
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.Ця тема підтримує розмитий прозорий фон.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Гаряча клавіша
@@ -294,6 +323,9 @@
Тека журналуОчистити журналиВи впевнені, що хочете видалити всі журнали?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationЧаклунРозташування даних користувачаНалаштування користувача та встановлені плагіни зберігаються у теці даних користувача. Це місце може змінюватися залежно від того, чи перебуває програма в портативному режимі, чи ні.
@@ -335,9 +367,16 @@
Не вдалося знайти вказаний плагінНова гаряча клавіша не може бути порожньоюНова гаряча клавіша вже використовується іншим плагіном. Будь ласка, вкажіть нову
+ This new Action Keyword is the same as old, please choose a different oneУспішноУспішно завершено
- Введіть гарячу клавішу, яку ви хочете використовувати для запуску плагіна. Використовуйте * у разі, якщо ви не хочете ставити конкретну гарячу клавішу.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timeЗадані гарячі клавіші для запитів
diff --git a/Flow.Launcher/Languages/vi.xaml b/Flow.Launcher/Languages/vi.xaml
index 17e421e16..6223efc00 100644
--- a/Flow.Launcher/Languages/vi.xaml
+++ b/Flow.Launcher/Languages/vi.xaml
@@ -7,6 +7,11 @@
Hãy chọn không nếu nó đã được cài đặt, và bạn sẽ được hỏi chọn thư mục chứa chương trình thực thi {1}
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
Chế độ trò chơiTạm dừng sử dụng phím nóng.Đặt lại vị trí
- Đặt lại vị trí của cửa sổ tìm kiếm
+ Type here to searchCài đặt
@@ -70,8 +75,6 @@
Trống truy vấn cuối cùngPreserve Last Action KeywordSelect Last Action Keyword
- Giữ nguyên chiều cao cửa sổ
- Chiều cao cửa sổ không thể thay đổi bằng cách kéo.Số kết quả tối đaCó thể thiết lập nhanh chóng bằng CTRL+Plus và CTRL+Minus.Bỏ qua phím nóng khi cửa sổ ở chế độ toàn màn hình
@@ -102,6 +105,15 @@
Luôn xem trướcLuôn mở bảng xem trước khi Flow kích hoạt. Nhấn {0} để chuyển đổi chế độ xem trước.Hiệu ứng đổ bóng không được phép nếu chủ đề hiện tại bật hiệu ứng làm mờ
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortPlugin tìm kiếm
@@ -118,6 +130,8 @@
Từ hành động hiện tạiTừ hành động mớiThay đổi từ hành động
+ Plugin seach delay time
+ Change Plugin Seach Delay TimeƯu tiên hiện tạiƯu tiên mớiƯu tiên
@@ -131,6 +145,9 @@
Gỡ cài đặtFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ DefaultTải tiện ích mở rộng
@@ -193,8 +210,20 @@
Tùy chỉnhGiờNgày
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ Không
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.Phím tắt
@@ -296,6 +325,9 @@
Thư mục nhật kýXóa tệp nhật kýBạn có chắc chắn muốn xóa tất cả nhật ký không?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more informationWizardVị trí dữ liệu người dùngThiết đặt người dùng và plugin đã cài đặt sẽ được lưu trong thư mục dữ liệu người dùng. Vị trí này có thể thay đổi tùy thuộc vào việc nó có ở chế độ di động hay không.
@@ -337,9 +369,16 @@
Không thể tìm thấy plugin được chỉ địnhTừ khóa hành động mới không được để trốngTừ khóa hành động mới này đã được gán cho một plugin khác, vui lòng chọn một plugin khác
+ This new Action Keyword is the same as old, please choose a different oneThành côngĐã hoàn tất thành công
- Sử dụng * nếu bạn muốn xác định từ khóa hành động.
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay timePhím nóng truy vấn tùy chỉnh
diff --git a/Flow.Launcher/Languages/zh-cn.xaml b/Flow.Launcher/Languages/zh-cn.xaml
index d9966d757..3d302da5b 100644
--- a/Flow.Launcher/Languages/zh-cn.xaml
+++ b/Flow.Launcher/Languages/zh-cn.xaml
@@ -7,6 +7,11 @@
如果已安装,请单击“否”,系统将提示您选择包含 {1} 可执行文件的文件夹
请选择 {0} 可执行文件
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ 无法设置 {0} 可执行路径,请尝试从 Flow 的设置中设置(向下滚动到底部)。无法初始化插件插件:{0} - 无法加载并将被禁用,请联系插件创建者寻求帮助
@@ -37,7 +42,7 @@
游戏模式暂停使用热键。重置位置
- 重置搜索窗口位置
+ Type here to search设置
@@ -70,8 +75,6 @@
清空上次搜索关键字Preserve Last Action KeywordSelect Last Action Keyword
- 固定窗口高度
- 窗口高度不能通过拖动来调整。最大结果显示个数您也可以通过使用 CTRL+ "+" 和 CTRL+ "-" 来快速调整它。全屏模式下忽略热键
@@ -102,6 +105,15 @@
始终打开预览Flow 启动时总是打开预览面板。按 {0} 以切换预览。当前主题已启用模糊效果,不允许启用阴影效果
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very short搜索插件
@@ -118,6 +130,8 @@
当前触发关键字新触发关键字更改触发关键字
+ Plugin seach delay time
+ Change Plugin Seach Delay Time当前优先级新优先级优先级
@@ -131,6 +145,9 @@
卸载Fail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ Default插件商店
@@ -193,8 +210,20 @@
自定义时钟日期
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ 无
+ Acrylic
+ Mica
+ Mica Alt该主题支持两种(浅色/深色)模式。该主题支持模糊透明背景。
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.热键
@@ -294,6 +323,9 @@
日志目录清除日志你确定要删除所有的日志吗?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more information向导用户数据位置用户设置和已安装的插件保存在用户数据文件夹中。此位置可能因是否处于便携模式而异。
@@ -335,9 +367,16 @@
找不到指定的插件新触发关键字不能为空此触发关键字已经被指派给其他插件了,请换一个关键字
+ This new Action Keyword is the same as old, please choose a different one成功成功完成
- 如果你不想设置触发关键字,可以使用*代替
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay time自定义查询热键
@@ -371,7 +410,7 @@
更新是否
- 背景
+ 后台版本
diff --git a/Flow.Launcher/Languages/zh-tw.xaml b/Flow.Launcher/Languages/zh-tw.xaml
index 01b667e72..cecad8e0d 100644
--- a/Flow.Launcher/Languages/zh-tw.xaml
+++ b/Flow.Launcher/Languages/zh-tw.xaml
@@ -7,6 +7,11 @@
Click no if it's already installed, and you will be prompted to select the folder that contains the {1} executable
Please select the {0} executable
+
+ Your selected {0} executable is invalid.
+ {2}{2}
+ Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).Fail to Init PluginsPlugins: {0} - fail to load and would be disabled, please contact plugin creator for help
@@ -37,7 +42,7 @@
遊戲模式暫停使用快捷鍵。重設位置
- 重設搜尋視窗位置
+ Type here to search設定
@@ -70,8 +75,6 @@
清空上次搜尋關鍵字Preserve Last Action KeywordSelect Last Action Keyword
- Fixed Window Height
- The window height is not adjustable by dragging.最大結果顯示個數You can also quickly adjust this by using CTRL+Plus and CTRL+Minus.全螢幕模式下忽略快捷鍵
@@ -102,6 +105,15 @@
一律預覽當 Flow 啟動時,一律開啟預覽面板。按下 {0} 可切換預覽。Shadow effect is not allowed while current theme has blur effect enabled
+ Search Delay
+ Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Default Search Delay Time
+ Plugin default delay time after which search results appear when typing is stopped.
+ Very long
+ Long
+ Normal
+ Short
+ Very shortSearch Plugin
@@ -118,6 +130,8 @@
目前觸發關鍵字新觸發關鍵字更改觸發關鍵字
+ Plugin seach delay time
+ Change Plugin Seach Delay Time目前優先新增優先優先
@@ -131,6 +145,9 @@
解除安裝Fail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manually
+ Fail to remove plugin cache
+ Plugins: {0} - Fail to remove plugin cache files, please remove them manually
+ Default插件商店
@@ -193,8 +210,20 @@
Custom時鐘日期
+ Backdrop Type
+ Backdrop supported starting from Windows 11 build 22000 and above
+ None
+ Acrylic
+ Mica
+ Mica AltThis theme supports two(light/dark) modes.This theme supports Blur Transparent Background.
+ Show placeholder
+ Display placeholder when query is empty
+ Placeholder text
+ Change placeholder text. Input empty will use: {0}
+ Fixed Window Size
+ The window size is not adjustable by dragging.快捷鍵
@@ -294,6 +323,9 @@
日誌資料夾清除日誌請確認要刪除所有日誌嗎?
+ Clear Caches
+ Are you sure you want to delete all caches?
+ Failed to clear part of folders and files. Please see log file for more information嚮導User Data LocationUser settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.
@@ -335,9 +367,16 @@
找不到指定的插件新觸發關鍵字不能為空白新觸發關鍵字已經被指派給另一個插件,請設定其他關鍵字。
+ This new Action Keyword is the same as old, please choose a different one成功成功完成
- 如果不想設定觸發關鍵字,可以使用*代替
+ Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+
+
+ Search Delay Time Setting
+ Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
+ Current search delay time
+ New search delay time自定義快捷鍵查詢
diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/sk.xaml
index 4cdd4c934..d8d3a586f 100644
--- a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/sk.xaml
@@ -2,7 +2,7 @@
Kalkulačka
- Spracúva matematické operácie.(Skúste 5*3-2 vo flowlauncheri)
+ Spracúva matematické operácie. (Skúste 5*3-2 vo Flow Launcheri)Nie je číslo (NaN)Nesprávny alebo neúplný výraz (Nezabudli ste na zátvorky?)Kopírovať výsledok do schránky
diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
index 41a4abfcf..cc78c9a9a 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
@@ -4,6 +4,6 @@
Activate {0} plugin action keyword플러그인 인디케이터
- 플러그인의 액션 키워드 제안을 제공합니다
+ 사용중인 플러그인들의 전체 액션 키워드 목록을 보여줍니다
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/de.xaml
index df162af92..47ea31cce 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/de.xaml
@@ -13,8 +13,8 @@
Plugin wird installiert{0} herunterladen und installierenPlug-in-Deinstallation
- Keep plugin settings
- Do you want to keep the settings of the plugin for the next usage?
+ Plug-in-Einstellungen beibehalten
+ Möchten Sie die Einstellungen des Plug-ins für die nächste Nutzung beibehalten?Plug-in {0} erfolgreich installiert. Flow wird neu gestartet, bitte warten Sie ...Die Metadaten-Datei plugin.json in der entpackten Zip-Datei kann nicht gefunden werden.Fehler: Ein Plug-in, welches die gleiche oder eine höhere Version mit {0} hat, ist bereits vorhanden.
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
index 4104bd757..04619239d 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
@@ -8,4 +8,6 @@
قتل عمليات {0}قتل جميع الأمثلة
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
index 4dc11fcec..d621b63c4 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
@@ -8,4 +8,6 @@
ukončit {0} procesůukončit všechny instance
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
index 8697818dc..766d170a4 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
@@ -8,4 +8,6 @@
{0} Prozesse beendenAlle Instanzen beenden
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
index 2dd0745c3..9b4a20a69 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
@@ -8,4 +8,6 @@
terminar {0} procesostermina todas las instancias
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
index 27fda1db7..ab788075e 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
@@ -8,4 +8,6 @@
finalizar {0} procesosfinalizar todas las instancias
+ Colocar procesos con ventanas visibles en la parte superior
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
index ec880406a..7064de1fe 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
@@ -8,4 +8,6 @@
Tuer {0} processusTuer toutes les instances
+ Placer les processus dont les fenêtres sont visibles en haut de la page
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
index 018435eca..8567b5412 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
@@ -8,4 +8,6 @@
סגור {0} תהליכיםסגור את כל המופעים
+ הצב תהליכים עם חלונות גלויים בחלק העליון
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
index 1ea52e741..1333fe573 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
@@ -8,4 +8,6 @@
termina {0} processitermina tutte le istanze
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
index a19c958b4..c3d1f6d08 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
@@ -8,4 +8,6 @@
{0} 프로세스 종료모든 인스턴스 종료
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
index f06121887..1210818bf 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
@@ -8,4 +8,6 @@
terminer {0} processesterminer alle forekomstene
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
index c4cc85463..cfcd71c37 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Zet processen met zichtbare vensters bovenaan
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
index a111f8776..650f14657 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
@@ -8,4 +8,6 @@
zamknij {0} procesówzamknij wszystkie instancje
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
index b5c75f2d9..944a883c9 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
@@ -8,4 +8,6 @@
terminar {0} processosterminar todas as instâncias
+ Colocar processos com janelas visíveis por cima
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
index 26963bddb..0e2bef052 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
@@ -8,4 +8,6 @@
удалить {0} процессовудалить все экземпляры
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
index bfa4792e4..2b06d3bbe 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
@@ -8,4 +8,6 @@
ukončiť {0} procesovukončiť všetky inštancie
+ Zobraziť procesy s viditeľným oknom navrchu
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
index e23f43875..02dab46ba 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
@@ -8,4 +8,6 @@
вбити {0} процесіввбити всі екземпляри
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
index 0bf065ee1..89fd67635 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
@@ -8,4 +8,6 @@
Buộc tắt các tiến trình {0}Tắt tất cả phên bản
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
index 160ca5f96..15e717c79 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
@@ -8,4 +8,6 @@
杀死 {0} 进程杀死所有实例
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
index c4cc85463..8563f49a0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
@@ -8,4 +8,6 @@
kill {0} processeskill all instances
+ Put processes with visible windows on the top
+
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
index 662765760..14e228b2a 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
@@ -34,8 +34,8 @@
Blendet Programme mit gängigen Uninstaller-Namen aus, wie unins000.exeIn Programmbeschreibung suchenFlow wird in Programmbeschreibung suchen
- Hide duplicated apps
- Hide duplicated Win32 programs that are already in the UWP list
+ Duplizierte Apps ausblenden
+ Duplizierte Win32-Programme ausblenden, die bereits in der UWP-Liste sindSuffixeMaximale Tiefe
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
index 0e8b2f1d5..af272fb46 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
@@ -84,7 +84,7 @@
סייר מותאם אישיתארגומנטים
- You can customize the explorer used for opening the container folder by inputing the Environmental Variable of the explorer you want to use. It will be useful to use CMD to test whether the Environmental Variable is available.
+ באפשרותך להתאים אישית את הסייר שבו נעשה שימוש לפתיחת תיקיית המכולה על ידי הזנת משתנה הסביבה של הסייר שברצונך להשתמש בו. כדאי לבדוק באמצעות CMD אם משתנה הסביבה זמין.הזן את הארגומנטים שברצונך להוסיף לסייר המותאם אישית שלך. %s עבור ספריית האב, %f עבור הנתיב המלא (זמין רק עבור win32). בדוק באתר הסייר לפרטים נוספים.
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.Shell/Languages/de.xaml
index 77a3fed47..dcfc82e0a 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Languages/de.xaml
@@ -6,7 +6,7 @@
Drücken Sie eine beliebige Taste, um dieses Fenster zu schließen ...Eingabeaufforderung nach Befehlsausführung nicht schließenImmer als Administrator ausführen
- Use Windows Terminal
+ Windows-Terminal verwendenAls anderer Benutzer ausführenShellErmöglicht das Ausführen von Systembefehlen aus Flow Launcher
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ar.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ar.xaml
index 529be9f45..ccc50678e 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ar.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ar.xaml
@@ -2,8 +2,9 @@
- أمر
+ اسم البرنامجوصف
+ أمرإيقاف التشغيلإعادة التشغيل
@@ -27,6 +28,8 @@
تبديل وضع اللعبةSet the Flow Launcher Theme
+ تعدي
+
إيقاف تشغيل الكمبيوترإعادة تشغيل الكمبيوتر
@@ -59,6 +62,15 @@
هل أنت متأكد أنك تريد إعادة تشغيل الكمبيوتر مع خيارات التمهيد المتقدمة؟هل أنت متأكد أنك تريد تسجيل الخروج؟
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ إعادة تعيين
+ Confirm
+ إلغاء
+ Please enter a non-empty command keyword
+
أوامر النظاميوفر أوامر متعلقة بالنظام، مثل إيقاف التشغيل، القفل، الإعدادات، وما إلى ذلك.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/cs.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/cs.xaml
index 1a42ce51b..de35c9592 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/cs.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/cs.xaml
@@ -2,8 +2,9 @@
- Příkaz
+ JménoPopis
+ PříkazShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Editovat
+
Vypnout počítačRestartovat počítač
@@ -59,6 +62,15 @@
Opravdu chcete restartovat počítač s rozšířenými možnostmi spouštění?Opravdu se chcete odhlásit?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Potvrdit
+ Zrušit
+ Please enter a non-empty command keyword
+
Systémové příkazyPoskytuje příkazy související se systémem, jako je vypnutí, uzamčení počítače atd.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/da.xaml
index 172adfd2f..91230e7e3 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/da.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/da.xaml
@@ -2,8 +2,9 @@
- Command
+ NameDescription
+ CommandShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Rediger
+
Shutdown ComputerRestart Computer
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+ Annuller
+ Please enter a non-empty command keyword
+
System CommandsProvides System related commands. e.g. shutdown, lock, settings etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/de.xaml
index cdd0e0348..794e949ad 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/de.xaml
@@ -2,8 +2,9 @@
- Befehl
+ NameBeschreibung
+ BefehlHerunterfahrenNeu starten
@@ -25,7 +26,9 @@
Flow Launcher-TippsFlow Launcher UserData-OrdnerSpielmodus umschalten
- Set the Flow Launcher Theme
+ Flow Launcher-Theme festlegen
+
+ BearbeitenComputer herunterfahren
@@ -48,7 +51,7 @@
Besuchen Sie die Dokumentation von Flow Launcher für mehr Hilfe und Tipps zur VerwendungDen Ort öffnen, an dem die Einstellungen von Flow Launcher gespeichert sindSpielmodus umschalten
- Quickly change the Flow Launcher theme
+ Das Flow-Launcher-Theme schnell ändernErfolg
@@ -56,9 +59,18 @@
Alle anwendbaren Plug-in-Daten neu geladenSind Sie sicher, dass Sie den Computer herunterfahren wollen?Sind Sie sicher, dass Sie den Computer neu starten wollen?
- Soll der Computer wirklich mit erweiterten Startoptionen neu gestartet werden?
+ Sind Sie sicher, dass Sie den Computer mit erweiterten Boot-Optionen neu starten wollen?Sind Sie sicher, dass Sie sich ausloggen wollen?
+ Befehls-Schlüsselwort-Einstellung
+ Benutzerdefiniertes Befehls-Schlüsselwort
+ Geben Sie ein Schlüsselwort ein, um nach dem Befehl zu suchen: {0}. Dieses Schlüsselwort wird verwendet, um Ihre Anfrage abzugleichen.
+ Befehls-Schlüsselwort
+ Zurücksetzen
+ Bestätigen
+ Abbrechen
+ Bitte geben Sie ein nicht-leeres Befehls-Schlüsselwort ein
+
SystembefehleBietet systembezogene Befehle, z. B. Herunterfahren, Sperren, Einstellungen etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/es-419.xaml
index 99eec60fa..ac4040dca 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/es-419.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/es-419.xaml
@@ -2,8 +2,9 @@
- Command
+ NameDescription
+ CommandShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Editar
+
Shutdown ComputerRestart Computer
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+ Cancelar
+ Please enter a non-empty command keyword
+
System CommandsProvides System related commands. e.g. shutdown, lock, settings etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/es.xaml
index 2139738f7..5f3688ab8 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/es.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/es.xaml
@@ -2,8 +2,9 @@
- Comando
+ NombreDescripción
+ ComandoApagarReiniciar
@@ -27,6 +28,8 @@
Cambiar a Modo JuegoEstablecer el tema de Flow Launcher
+ Editar
+
Apaga el equipoReinicia el equipo
@@ -59,6 +62,15 @@
¿Está seguro de que desea reiniciar el equipo con opciones de arranque avanzadas?¿Está seguro de que desea cerrar la sesión?
+ Configuración de la palabra clave de comando
+ Palabra clave de comando personalizada
+ Introducir una palabra clave para buscar el comando: {0}. Esta palabra clave se utiliza para que coincida con la búsqueda.
+ Palabra clave de comando
+ Restablecer
+ Confirmar
+ Cancelar
+ Por favor, introducir una palabra clave de comando no vacía
+
Comandos del sistemaProporciona comandos relacionados con el sistema. Por ejemplo, apagar, bloquear, configurar, etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/fr.xaml
index 727a9a6ad..5419bd8e2 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/fr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/fr.xaml
@@ -2,8 +2,9 @@
- Commande
+ NomDescription
+ CommandeArrêterRedémarrer
@@ -27,6 +28,8 @@
Basculer le mode de jeuDéfinir le thème Flow Launcher
+ Modifier
+
Éteindre l'ordinateurRedémarrer l'ordinateur
@@ -59,6 +62,15 @@
Êtes-vous sûr de vouloir redémarrer l'ordinateur avec les options de démarrage avancées ?Êtes-vous sûr de vouloir vous déconnecter ?
+ Réglage du mot-clé de commande
+ Mot-clé de commande personnalisé
+ Entrez un mot-clé pour rechercher la commande : {0}. Ce mot-clé est utilisé pour répondre à votre requête.
+ Mot-clé de commande
+ Réinitialiser
+ Confirmer
+ Annuler
+ Veuillez saisir un mot-clé de commande non vide
+
Commandes systèmeFournit des commandes liées au système. Par exemple, arrêt, verrouillage, paramètres, etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
index acc3f3b59..86688a130 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
@@ -2,8 +2,9 @@
- פקודה
+ שםתיאור
+ פקודהכיבויהפעלה מחדש
@@ -27,6 +28,8 @@
מצב משחקSet the Flow Launcher Theme
+ ערו
+
כבה את המחשבהפעל מחדש את המחשב
@@ -59,6 +62,15 @@
האם אתה בטוח שברצונך להפעיל מחדש את המחשב עם אפשרויות אתחול מתקדמות?האם אתה בטוח שברצונך להתנתק?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ אפס
+ אישו
+ ביטול
+ Please enter a non-empty command keyword
+
פקודות מערכתמספק פקודות הקשורות למערכת, כגון כיבוי, נעילה, הגדרות ועוד.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/it.xaml
index b464cab28..be31e4e52 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/it.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/it.xaml
@@ -2,8 +2,9 @@
- Comando
+ NomeDescrizione
+ ComandoSpegniRiavvia
@@ -27,6 +28,8 @@
Attiva/Disattiva Modalità Di GiocoSet the Flow Launcher Theme
+ Modifica
+
Spegni il computerRiavvia il Computer
@@ -59,6 +62,15 @@
Sei sicuro di voler riavviare il computer con le Opzioni di Avvio Avanzate?Sei sicuro di volerti disconettere?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Resetta
+ Conferma
+ Annulla
+ Please enter a non-empty command keyword
+
Comandi di SistemaFornisce comandi relativi al sistema, ad esempio spegnimento, blocco, impostazioni ecc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
index cff426d4e..bc7dff59f 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
@@ -2,8 +2,9 @@
- コマンド
+ Name説明
+ コマンドShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ 編
+
コンピュータをシャットダウンするコンピュータを再起動する
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+
+ Please enter a non-empty command keyword
+
システムコマンドシステム関連のコマンドを提供します。例:シャットダウン、ロック、設定など
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
index d9b568e14..f2049038f 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
@@ -2,8 +2,9 @@
- 명령어
+ Name설명
+ 명령어ShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ 편집
+
시스템 종료시스템 재시작
@@ -59,6 +62,15 @@
고급 부팅 옵션으로 시스템을 다시 시작하시겠습니까?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ 확인
+ 취소
+ Please enter a non-empty command keyword
+
시스템 명령어시스템 종료, 컴퓨터 잠금, 설정 등과 같은 시스템 관련 명령어를 제공합니다
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/nb.xaml
index a531189fe..072fd623d 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/nb.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/nb.xaml
@@ -2,8 +2,9 @@
- Kommando
+ NavnBeskrivelse
+ KommandoSlå avStart på nytt
@@ -27,6 +28,8 @@
Vis/Skjul spillmodusSet the Flow Launcher Theme
+ Rediger
+
Slår av datamaskinStart datamaskinen på nytt
@@ -59,6 +62,15 @@
Er du sikker på at du vil starte datamaskinen på nytt med avanserte oppstartsalternativer?Er du sikker på at du vil logge av?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Tilbakestill
+ Bekreft
+ Avbryt
+ Please enter a non-empty command keyword
+
SystemkommandoerGir systemrelaterte kommandoer, f.eks. slå av, lås, innstillinger osv.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/nl.xaml
index e0e4d46a8..9d1d54076 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/nl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/nl.xaml
@@ -2,8 +2,9 @@
- Opdracht
+ NameBeschrijving
+ OpdrachtShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Bewerken
+
Computer afsluitenComputer opnieuw opstarten
@@ -59,6 +62,15 @@
Weet u zeker dat u de computer wilt herstarten met geavanceerde opstartopties?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Herstellen
+ Confirm
+ Annuleer
+ Please enter a non-empty command keyword
+
SysteemopdrachtenVoorziet in systeem gerelateerde opdrachten. bijv.: afsluiten, vergrendelen, instellingen, enz.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pl.xaml
index bbb3bec88..c09a447d2 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pl.xaml
@@ -2,8 +2,9 @@
- Komenda
+ NazwaOpis
+ KomendaWyłącz komputerRestart
@@ -27,6 +28,8 @@
Przełącz tryb grySet the Flow Launcher Theme
+ Edytuj
+
Wyłącz komputerUruchom ponownie komputer
@@ -59,6 +62,15 @@
Czy na pewno chcesz ponownie uruchomić komputer z Zaawansowanymi opcjami rozruchu?Czy na pewno chcesz się wylogować?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Zresetuj
+ Potwierdź
+ Anuluj
+ Please enter a non-empty command keyword
+
Komendy systemoweWykonywanie komend systemowych, np. wyłącz, zablokuj komputer, otwórz ustawienia itp.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-br.xaml
index b356f6bc7..a19ab39d6 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-br.xaml
@@ -2,8 +2,9 @@
- Comando
+ NomeDescrição
+ ComandoShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Editar
+
Desligar o ComputadorReiniciar o Computador
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+ Cancelar
+ Please enter a non-empty command keyword
+
System CommandsProvides System related commands. e.g. shutdown, lock, settings etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-pt.xaml
index aa7217c01..9e0e39066 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/pt-pt.xaml
@@ -2,8 +2,9 @@
- Comando
+ NomeDescrição
+ ComandoDesligarReiniciar
@@ -25,7 +26,9 @@
Dicas Flow LauncherPasta de dados do utilizador Flow LauncherComutar modo de jogo
- Set the Flow Launcher Theme
+ Definir tema Flow Launcher
+
+ EditarDesligar computador
@@ -48,7 +51,7 @@
Aceda à documentação para mais informações e dicas de utilizaçãoAbrir localização onde as definições do Flow Launcher estão guardadasComutar modo de jogo
- Quickly change the Flow Launcher theme
+ Alterar rapidamente o tema da aplicaçãoSucesso
@@ -59,6 +62,15 @@
Tem certeza de que deseja reiniciar o computador com as opções avançadas de arranque?Tem certeza de que deseja terminar a sessão?
+ Definição de palavra-chave
+ Palavra-chave personalizada
+ Indique a palavra-chave para pesquisar o comando: {0}. A aplavra-chave será usada para correspondência com a consulta.
+ Palavra-chave
+ Repor
+ Confirmar
+ Cancelar
+ Não pode indicar uma palavra-chave vazia
+
Comandos do sistemaDisponibiliza os comandos relacionados com o sistema tais como: desligar, bloquear, reiniciar...
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ru.xaml
index 4547274f8..796cda69d 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ru.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ru.xaml
@@ -2,8 +2,9 @@
- Command
+ NameDescription
+ CommandShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Редактировать
+
Shutdown ComputerRestart Computer
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+ Отменить
+ Please enter a non-empty command keyword
+
System CommandsProvides System related commands. e.g. shutdown, lock, settings etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml
index 0f8894288..087ff9f05 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml
@@ -2,8 +2,9 @@
- Príkaz
+ NázovPopis
+ PríkazVypnúťReštartovať
@@ -27,6 +28,8 @@
Prepnúť herný režimNastaviť motív pre Flow Laucher
+ Upraviť
+
Vypnúť počítačReštartovať počítač
@@ -59,6 +62,15 @@
Naozaj chcete počítač reštartovať s pokročilými možnosťami spúšťania?Naozaj sa chcete odhlásiť?
+ Nastavenia kľúčového slova príkazu
+ Vlastné kľúčové slovo príkazu
+ Na vyhľadanie príkazu zadajte kľúčové slovo: {0}. Toto kľúčové slovo sa použije na vyhľadnie príkazu.
+ Kľúčové slovo príkazu
+ Resetovať
+ Potvrdiť
+ Zrušiť
+ Prosím, zadajte neprázdne kľúčové slovo príkazu
+
Systémové príkazyPoskytuje príkazy súvisiace so systémom ako je vypnutie, uzamknutie počítača atď.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sr.xaml
index d04a783d0..f5a2f1b30 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sr.xaml
@@ -2,8 +2,9 @@
- Command
+ NameDescription
+ CommandShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Izmeni
+
Shutdown ComputerRestart Computer
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ Confirm
+ Otkaži
+ Please enter a non-empty command keyword
+
System CommandsProvides System related commands. e.g. shutdown, lock, settings etc.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/tr.xaml
index 93973913f..18f7f63f5 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/tr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/tr.xaml
@@ -2,8 +2,9 @@
- Komut
+ NameAçıklama
+ KomutShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Düzenle
+
Bilgisayarı KapatYeniden Başlat
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Sıfırla
+ Onayla
+ İptal
+ Please enter a non-empty command keyword
+
Sistem KomutlarıSistem ile ilgili komutlara erişim sağlar. ör. shutdown, lock, settings vb.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/uk-UA.xaml
index 57c83e1a5..19d69511b 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/uk-UA.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/uk-UA.xaml
@@ -2,8 +2,9 @@
- Команда
+ НазваОпис
+ КомандаВимкнутиПерезавантажити
@@ -27,6 +28,8 @@
Перемкнути режим гриSet the Flow Launcher Theme
+ Редагувати
+
Вимкнути комп'ютерПерезавантажити комп'ютер
@@ -59,6 +62,15 @@
Ви впевнені, що хочете перезавантажити комп'ютер за допомогою додаткових параметрів завантаження?Ви впевнені, що хочете вийти з системи?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Скинути
+ Підтвердити
+ Скасувати
+ Please enter a non-empty command keyword
+
Системні командиНадає команди, пов'язані з системою, наприклад, вимкнення, блокування, налаштування тощо.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/vi.xaml
index 8d0bc43c0..dae12c501 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/vi.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/vi.xaml
@@ -2,8 +2,9 @@
- Lệnh
+ TênMô Tả
+ LệnhShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ Sửa
+
shutdown máy tínhKhởi động lại máy tính
@@ -59,6 +62,15 @@
Bạn có chắc chắn muốn khởi động lại máy tính bằng Advanced Boot Options không?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Đặt lại
+ Xác nhận
+ Hủy
+ Please enter a non-empty command keyword
+
Lệnh hệ thốngCung cấp các lệnh liên quan đến Hệ thống. ví dụ. tắt máy, khóa, cài đặt, v.v.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-cn.xaml
index e08f312b1..745129130 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-cn.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-cn.xaml
@@ -2,8 +2,9 @@
- 命令
+ 名称描述
+ 命令关机重启
@@ -27,6 +28,8 @@
切换游戏模式Set the Flow Launcher Theme
+ 编辑
+
关闭电脑重启这台电脑
@@ -59,6 +62,15 @@
您确定要以高级启动选项重启吗?您确定要注销吗?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ 重置
+ 确认
+ 取消
+ Please enter a non-empty command keyword
+
系统命令提供操作系统相关的命令,如关机、锁定、设置等。
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-tw.xaml
index d43496466..573aefcbd 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-tw.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/zh-tw.xaml
@@ -2,8 +2,9 @@
- 命令
+ 名稱描述
+ 命令ShutdownRestart
@@ -27,6 +28,8 @@
Toggle Game ModeSet the Flow Launcher Theme
+ 編輯
+
電腦關機電腦重新啟動
@@ -59,6 +62,15 @@
Are you sure you want to restart the computer with Advanced Boot Options?Are you sure you want to log off?
+ Command Keyword Setting
+ Custom Command Keyword
+ Enter a keyword to search for command: {0}. This keyword is used to match your query.
+ Command Keyword
+ Reset
+ 確認
+ 取消
+ Please enter a non-empty command keyword
+
系統命令系統相關的命令。例如,關機,鎖定,設定等
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ar.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ar.xaml
index 6e92178db..cefb5d1d1 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ar.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ar.xaml
@@ -17,7 +17,7 @@
كلمة مفتاحية للعملالرابطبحث
- استخدام الإكمال التلقائي لاستعلام البحث:
+ Use Search Query Autocompleteبيانات الإكمال التلقائي من:يرجى اختيار بحث على الويبهل أنت متأكد أنك تريد حذف {0}؟
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/cs.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/cs.xaml
index 849f27f05..ca98581c3 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/cs.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/cs.xaml
@@ -17,7 +17,7 @@
Aktivační příkazURLHledat
- Používejte automatické dokončování vyhledávaných výrazů:
+ Use Search Query AutocompleteAutomatické doplnění údajů z:Vyberte webové vyhledáváníOpravdu chcete odstranit {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/da.xaml
index 2a7d4aa32..b1113acb7 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/da.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/da.xaml
@@ -17,7 +17,7 @@
Action KeywordURLSearch
- Use Search Query Autocomplete:
+ Use Search Query AutocompleteAutocomplete Data from:Please select a web searchAre you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/de.xaml
index 0c72b11bf..2a7dca596 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/de.xaml
@@ -17,8 +17,8 @@
Aktions-SchlüsselwortURLSuche
- Autovervollständigung von Suchanfragen verwenden:
- Daten automatisch vervollständigen aus:
+ Autovervollständigung von Suchanfragen verwenden
+ Autovervollständigung der Daten aus:Bitte wählen Sie eine Websuche ausSind Sie sicher, dass Sie {0} löschen wollen?Wenn Sie Flow eine Suche nach einer bestimmten Website hinzufügen möchten, geben Sie zunächst eine Dummy-Textzeichenfolge in die Suchleiste dieser Website ein und starten Sie die Suche. Kopieren Sie jetzt den Inhalt der Adressleiste des Browsers und fügen Sie ihn in das URL-Feld unten ein. Ersetzen Sie Ihre Testzeichenfolge durch {q}. Zum Beispiel, wenn Sie auf Netflix nach casino suchen, steht in der Adressleiste
@@ -30,8 +30,8 @@
https://www.netflix.com/search?q={q}
- Copy URL
- Copy search URL to clipboard
+ URL kopieren
+ Such-URL in Zwischenablage kopierenTitel
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es-419.xaml
index 517ac0918..3ce22bb78 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es-419.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es-419.xaml
@@ -17,7 +17,7 @@
Palabra claveURLBuscar
- Autocompletar la búsqueda:
+ Use Search Query AutocompleteAutocompletar datos de:Por favor, seleccione una búsqueda¿Seguro que desea eliminar {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es.xaml
index e6e4a94d2..7f14b59c6 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/es.xaml
@@ -17,7 +17,7 @@
Palabra clave de acciónURLBusca en
- Usar autocompletado en consultas de búsqueda:
+ Usar autocompletado en consultas de búsquedaAutocompletar datos desde:Por favor, seleccione una búsqueda web¿Está seguro de que desea eliminar {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/fr.xaml
index c6b1b145c..f04cfb48a 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/fr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/fr.xaml
@@ -17,7 +17,7 @@
Mot-clé d'actionURLRechercher sur
- Utiliser la saisie automatique de la requête de recherche :
+ Utiliser la fonction d'auto-complétion des requêtes de rechercheSaisir automatiquement les données à partir de :Veuillez sélectionner une recherche webÊtes-vous sûr de vouloir supprimer {0} ?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/he.xaml
index 630287983..78ee7ca7d 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/he.xaml
@@ -17,7 +17,7 @@
מילת מפתח לפעולהכתובת URLחיפו
- השתמש בהשלמה אוטומטית לשאילתות חיפוש:
+ השתמש בהשלמה אוטומטית לשאילתת חיפושהשלמה אוטומטית מתוך:בחר שירות חיפוש אינטרנטיהאם אתה בטוח שברצונך למחוק את {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/it.xaml
index 26c1e8459..db2a4dfeb 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/it.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/it.xaml
@@ -17,7 +17,7 @@
Parola ChiaveURLCerca
- Usa Autocompletamento Ricerca:
+ Use Search Query AutocompleteAutocompleta i dati da:Seleziona una ricerca webSei sicuro di voler eliminare {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
index 85ce0e282..9ae628853 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
@@ -17,7 +17,7 @@
キーワードURL検索
- 検索サジェスチョンを有効にする
+ Use Search Query AutocompleteAutocomplete Data from:web検索を選択してくださいAre you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
index 5ab5fffa3..3ac9f6a6c 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
@@ -17,7 +17,7 @@
액션 키워드URL검색
- 검색 쿼리 자동완성 사용:
+ Use Search Query Autocomplete자동완성 데이터 출처:웹 검색을 선택하세요Are you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nb.xaml
index 4bba382a9..9f793c43f 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nb.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nb.xaml
@@ -17,7 +17,7 @@
Nøkkelord for handlingNettadresseSøk
- Bruk autofullføring av søkespørring:
+ Use Search Query AutocompleteAutofullfør data fra:Vennligst velg et websøkEr du sikker på at du ønsker å slette {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nl.xaml
index a48d99487..a18710324 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/nl.xaml
@@ -17,7 +17,7 @@
Action KeywordURLSearch
- Use Search Query Autocomplete:
+ Use Search Query AutocompleteAutocomplete Data from:Please select a web searchAre you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pl.xaml
index 499351343..d693a3f28 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pl.xaml
@@ -17,7 +17,7 @@
WyzwalaczAdres URLSzukaj
- Pokazuj podpowiedzi wyszukiwania
+ Use Search Query AutocompleteAutouzupełnianie danych z:Musisz wybrać coś z listyCzy jesteś pewien że chcesz usunąć {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-br.xaml
index d4135c795..6f0d7fcc9 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-br.xaml
@@ -17,7 +17,7 @@
Action KeywordURLSearch
- Use Search Query Autocomplete:
+ Use Search Query AutocompleteAutocomplete Data from:Please select a web searchAre you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-pt.xaml
index 16969dac7..1a2476a2c 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/pt-pt.xaml
@@ -17,7 +17,7 @@
Palavra-chave de açãoURLPesquisar
- Utilizar conclusão automática da consulta:
+ Utilizar conclusão automática para as consultasPreencher dados a partir de:Selecione uma pesquisa webTem a certeza de que deseja eliminar {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ru.xaml
index c59182290..1fd9aca96 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ru.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ru.xaml
@@ -1,4 +1,4 @@
-
+
Search Source Setting
@@ -17,7 +17,7 @@
Action KeywordURLSearch
- Use Search Query Autocomplete:
+ Use Search Query AutocompleteAutocomplete Data from:Please select a web searchAre you sure you want to delete {0}?
@@ -28,8 +28,9 @@
Then replace casino with {q}.
Thus, the generic formula for a search on Netflix is https://www.netflix.com/search?q={q}
- Скопировать URL-адрес
- Скопировать URL поиска в буфер обмена
+
+ Copy URL
+ Copy search URL to clipboardTitle
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sk.xaml
index 44b765c58..1afcdb360 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sk.xaml
@@ -17,7 +17,7 @@
Aktivačný príkazAdresa URLHľadať
- Použiť automatické dokončovanie výrazov vyhľadávania:
+ Použiť automatické dokončovanie výrazov vyhľadávaniaAutomatické dokončovanie údajov z:Vyberte webové vyhľadávanieNaozaj chcete odstrániť {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sr.xaml
index 5f1803655..06707b4af 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/sr.xaml
@@ -17,7 +17,7 @@
Action KeywordURLSearch
- Use Search Query Autocomplete:
+ Use Search Query AutocompleteAutocomplete Data from:Please select a web searchAre you sure you want to delete {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/tr.xaml
index 1506b753b..aaad035a0 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/tr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/tr.xaml
@@ -17,7 +17,7 @@
Anahtar KelimeURLAra:
- Arama önerilerini etkinleştir
+ Use Search Query AutocompleteAutocomplete Data from:Lütfen bir web araması seçin{0} bağlantısını silmek istediğinize emin misiniz?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/uk-UA.xaml
index beb085d28..5536a7e68 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/uk-UA.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/uk-UA.xaml
@@ -17,7 +17,7 @@
Ключове слово діїURLПошук
- Використовувати автозаповнення пошукового запиту:
+ Use Search Query AutocompleteАвтозаповнення даних з:Будь ласка, виберіть пошуковий запит в ІнтернетіВи впевнені, що хочете видалити {0}?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/vi.xaml
index e3105283f..731275c5e 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/vi.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/vi.xaml
@@ -17,7 +17,7 @@
Từ khóa hành độngĐịa chỉ URLTìm kiếm
- Sử dụng Tự động hoàn thành truy vấn tìm kiếm:
+ Use Search Query AutocompleteTự động hoàn thành dữ liệu từ:Vui lòng chọn tìm kiếm trên webBạn có chắc chắn muốn xóa {0} không?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-cn.xaml
index d3df223cc..375a741d0 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-cn.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-cn.xaml
@@ -17,7 +17,7 @@
触发关键字打开链接搜索
- 启用搜索建议
+ Use Search Query Autocomplete自动补全数据:请选择一项您确定要删除 {0} 吗?
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-tw.xaml
index eb58a4ec0..727b2f4a9 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-tw.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/zh-tw.xaml
@@ -17,7 +17,7 @@
觸發關鍵字網址搜尋
- 啟用搜尋建議
+ Use Search Query Autocomplete從以下位置自動填入資料:請選擇一項你確認要刪除{0}嗎
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
index dcc74d520..5f8d9a6df 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.de-DE.resx
@@ -275,7 +275,7 @@
Hardware und Sound
- Startseite
+ HomepageMixed Reality
@@ -2161,7 +2161,7 @@
Erweiterte Druckereinrichtung
- Change default printer
+ Standard-Drucker ändernEdit environment variables for your account
@@ -2416,7 +2416,7 @@
Erweiterte Sharing-Einstellungen verwalten
- Change battery settings
+ Akku-Einstellungen ändernDiesen Computer umbenennen
@@ -2479,7 +2479,7 @@
Find and fix bluescreen problems
- Hear a tone when keys are pressed
+ Einen Ton hören, wenn Tasten gedrückt werdenBrowsing-Historie löschen
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
index 55ac42dd3..faa8c2dcc 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
@@ -432,7 +432,7 @@
Area Personalization
- Client service for NetWare
+ שירות לקוח עבור NetWareArea Control Panel (legacy settings)
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.ko-KR.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.ko-KR.resx
index c7c1854b7..ab69a2a31 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.ko-KR.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.ko-KR.resx
@@ -1203,7 +1203,7 @@
Area Gaming
- Windows 설정을 검색하는 플러그 인
+ Windows 설정을 검색하는 플러그인Windows Settings
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.pt-PT.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.pt-PT.resx
index e7f8e1683..39062bbb8 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.pt-PT.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.pt-PT.resx
@@ -1797,13 +1797,13 @@
Mostrar ficheiros e pastas ocultas
- Change Windows To Go start-up options
+ Mudar as configurações de início do Windows Portátil
- See which processes start up automatically when you start Windows
+ Veja quais processos se iniciam automaticamente quando o Windows inicia
- Tell if an RSS feed is available on a website
+ Informar se um feed RSS está disponível em um siteAdicionar relógios para diferentes fusos horários
@@ -1815,7 +1815,7 @@
Personalizar botões do rato
- Set tablet buttons to perform certain tasks
+ Definir botões do tablet para executar certas tarefasVer tipos de letra instalados
@@ -1869,13 +1869,13 @@
Ver digitalizadores e câmaras
- Microsoft IME Register Word (Japanese)
+ Registro do Word Microsoft IME (japonês)Restaurar ficheiros com o Histórico de ficheiros
- Turn On-Screen keyboard on or off
+ Ativar ou desativar o teclado na telaBloquear ou permitir cookies de terceiros
@@ -1887,7 +1887,7 @@
Criar uma unidade de recuperação
- Microsoft New Phonetic Settings
+ Configurações do Microsoft New PhoneticGerer relatório de saúde do sistema
@@ -1899,16 +1899,16 @@
Cópia de segurança e restauro (Windows 7)
- Preview, delete, show or hide fonts
+ Pré-visualizar, excluir, mostrar ou ocultar fontes
- Microsoft Quick Settings
+ Configurações Rápidas da MicrosoftVer histórico de fiabilidade
- Access RemoteApp and desktops
+ Acessar o RemoteApp e desktopsConfigurar fontes de dados ODBC
@@ -1926,7 +1926,7 @@
Opções SimpleFast do Microsoft Pinyin
- Change what closing the lid does
+ Mudar o que fechar a tampa fazDesativar animações desnecessárias
@@ -1947,7 +1947,7 @@
Ver ações recomendadas para manter o sistema a funcionar nas melhores condições
- Alterar a frequência de piscar do cursor
+ Alterar frequência de intermitência do cursorAdicionar ou remover programas
@@ -1959,13 +1959,13 @@
Configurar propriedades avançadas do perfil de utilizador
- Start or stop using AutoPlay for all media and devices
+ Inicie ou pare de usar o AutoPlay para todas as mídias e dispositivosAlterar definições de manutenção automática
- Specify single- or double-click to open
+ Especificar se um clique ou dois são necessários para abrirUtilizadores que podem utilizar o ambiente de trabalho remoto
@@ -1995,13 +1995,13 @@
Analisar estado do teclado
- Control the computer without the mouse or keyboard
+ Controle o computador sem o mouse ou tecladoAlterar ou remover um programa
- Change multi-touch gesture settings
+ Alterar configurações de gestos multi-toqueConfigurar origens ODBC (64 bits)
@@ -2013,13 +2013,13 @@
Alterar página inicial
- Group similar windows on the taskbar
+ Agrupar janelas semelhantes na barra de tarefas
- Change Windows SideShow settings
+ Alterar configurações do Windows SideShow
- Use audio description for video
+ Usar descrição de áudio para vídeosAlterar nome do grupo de trabalho
@@ -2028,13 +2028,13 @@
Encontrar e corrigir problemas de impressão
- Change when the computer sleeps
+ Mudar quando o computador dormeConfigurar uma rede privada (VPN)
- Accommodate learning abilities
+ Acomodar habilidades de aprendizagemConfigurar uma ligação telefónica
@@ -2046,7 +2046,7 @@
Como alterar a palavra-passe do Windows
- Tornar mais fácil ver o ponteiro do rato
+ Tornar mais fácil de ver o ponteiro do mouseConfigurar o iniciador iSCSI
@@ -2067,7 +2067,7 @@
Substituir sons por pistas visuais
- Change temporary Internet file settings
+ Alterar configurações de arquivo de Internet temporáriasEstabelecer ligação à Internet
@@ -2085,16 +2085,16 @@
Guardar cópias de segurança dos ficheiros no Histórico de Ficheiros
- View current accessibility settings
+ Ver configurações de acessibilidade atuais
- Change tablet pen settings
+ Alterar configurações da canetaAlterar modo de funcionamento do rato
- Show how much RAM is on this computer
+ Mostrar quanta memória RAM este computador temEditar plano de energia
@@ -2115,7 +2115,7 @@
Ampliar partes do ecrão com o Magnificador
- Change the file type associated with a file extension
+ Alterar o tipo de arquivo associado a uma extensão de arquivoVer registo de eventos
@@ -2133,17 +2133,17 @@
Alterar definições de poupança de energia
- Optimise for blindness
+ Otimizar para cegueira
- Turn Windows features on or off
+ Ative ou desative os recursos do Windows
- Show which operating system your computer is running
+ Mostra qual sistema operacional o seu computador está executandoVer serviços locais
@@ -2152,7 +2152,7 @@
Gerir pastas de trabalho
- Encrypt your offline files
+ Criptografe seus arquivos offlineTreinar o computador para reconhecer a sua voz
@@ -2173,43 +2173,43 @@
Alterar definições ddo clique do rato
- Change advanced colour management settings for displays, scanners and printers
+ Alterar configurações avançadas de gerenciamento de cores para telas, scanners e impressoras
- Let Windows suggest Ease of Access settings
+ Permitir que o Windows sugira Facilidade de Acesso
- Clear disk space by deleting unnecessary files
+ Limpar espaço em disco excluindo arquivos desnecessáriosVer dispositivos e impressoras
- Private Character Editor
+ Editor de Caracteres Privados
- Record steps to reproduce a problem
+ Registrar as etapas para reproduzir um problema
- Adjust the appearance and performance of Windows
+ Ajustar a aparência e o desempenho do Windows
- Settings for Microsoft IME (Japanese)
+ Configurações para o Microsoft IME (japonês)
- Invite someone to connect to your PC and help you, or offer to help someone else
+ Convide alguém para se conectar ao seu PC e ajudá-lo, ou ofereça para ajudar outra pessoa
- Run programs made for previous versions of Windows
+ Execute programas feitos para versões anteriores do Windows
- Choose the order of how your screen rotates
+ Escolha a ordem de como a tela gira
- Change how Windows searches
+ Alterar como o Windows pesquisa
- Set flicks to perform certain tasks
+ Defina gestos para realizar certas açõesAlterar tipo de conta
@@ -2221,64 +2221,64 @@
Alterar Configurações de Controlo da Conta do Utilizador
- Turn on easy access keys
+ Ativar teclas de acesso fácil
- Identify and repair network problems
+ Identificar e reparar problemas de rede
- Find and fix networking and connection problems
+ Encontrar e corrigir problemas de rede e conexão
- Play CDs or other media automatically
+ Reproduzir CDs ou outras mídias automaticamente
- View basic information about your computer
+ Ver informações básicas sobre seu computador
- Choose how you open links
+ Escolha como abrir os links
- Allow Remote Assistance invitations to be sent from this computer
+ Permitir que convites de assistência remota sejam enviados a partir deste computadorGestor de tarefas
- Turn flicks on or off
+ Ativar ou desativar gestosAdicionar um idioma
- View network status and tasks
+ Ver status de rede e tarefas
- Turn Magnifier on or off
+ Ativar ou desativar a lupa
- See the name of this computer
+ Ver o nome deste computadorVer ligações de rede
- Perform recommended maintenance tasks automatically
+ Executar tarefas recomendadas de manutenção automaticamente
- Manage disk space used by your offline files
+ Gerir espaço de disco utilizado pelos ficheiros locais
- Turn High Contrast on or off
+ Ativar ou desativar modo de alto contraste
- Change the way time is displayed
+ Alterar modo de exibição da hora
- Change how web pages are displayed in tabs
+ Alterar modo de exibição das páginas web nos separadores
- Change the way dates and lists are displayed
+ Alterar modo de exibição das datas e das listasGerir dispositivos de áudio
@@ -2293,37 +2293,37 @@
Apagar cookies ou ficheiros temporários
- Specify which hand you write with
+ Especificar a mão com a qual escreve
- Change touch input settings
+ Alterar definições do painel de toque
- How to change the size of virtual memory
+ Como alterar tamanho da memória virtual
- Hear text read aloud with Narrator
+ Utilizar Narrador para ouvir os textos
- Set up USB game controllers
+ Configurar controladores de jogos USB
- Show which domain your computer is on
+ Mostrar o domínio ao qual o computador pertence
- View all problem reports
+ Ver todos os relatórios de erro
- 16-Bit Application Support
+ Suporte a aplicações 16-bit
- Set up dialling rules
+ Configurar regras de marcaçãoAtivar ou desativar cookies da sessão
- Give administrative rights to a domain user
+ Conceder direitos de administrador a um domínioChoose when to turn off display
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.sk-SK.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.sk-SK.resx
index f47b9ada3..5b4dea6a9 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.sk-SK.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.sk-SK.resx
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- O aplikácii
+ O systémeArea System
From 24d43ed84bc29edd373ea1a513f4ef740828cce5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:46:02 +0800
Subject: [PATCH 0640/1442] Use api functions in Program plugin
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index a50868b69..f03040d68 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -6,7 +6,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.Program.Programs;
using Flow.Launcher.Plugin.Program.Views;
@@ -14,7 +13,6 @@ using Flow.Launcher.Plugin.Program.Views.Models;
using Flow.Launcher.Plugin.SharedCommands;
using Microsoft.Extensions.Caching.Memory;
using Path = System.IO.Path;
-using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
namespace Flow.Launcher.Plugin.Program
{
@@ -32,6 +30,8 @@ namespace Flow.Launcher.Plugin.Program
internal static PluginInitContext Context { get; private set; }
+ private static readonly string ClassName = nameof(Main);
+
private static readonly List emptyResults = new();
private static readonly MemoryCacheOptions cacheOptions = new() { SizeLimit = 1560 };
@@ -109,7 +109,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (OperationCanceledException)
{
- Log.Debug("|Flow.Launcher.Plugin.Program.Main|Query operation cancelled");
+ Context.API.LogDebug(ClassName, "Query operation cancelled");
return emptyResults;
}
finally
@@ -188,7 +188,7 @@ namespace Flow.Launcher.Plugin.Program
var _win32sCount = 0;
var _uwpsCount = 0;
- await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", async () =>
+ await Context.API.StopwatchLogInfoAsync(ClassName, "Preload programs cost", async () =>
{
var pluginCacheDirectory = Context.CurrentPluginMetadata.PluginCacheDirectoryPath;
FilesFolders.ValidateDirectory(pluginCacheDirectory);
@@ -253,8 +253,8 @@ namespace Flow.Launcher.Plugin.Program
_uwpsCount = _uwps.Count;
_uwpsLock.Release();
});
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32sCount}>");
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwpsCount}>");
+ Context.API.LogInfo(ClassName, $"Number of preload win32 programs <{_win32sCount}>");
+ Context.API.LogInfo(ClassName, $"Number of preload uwps <{_uwpsCount}>");
var cacheEmpty = _win32sCount == 0 || _uwpsCount == 0;
@@ -295,7 +295,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (Exception e)
{
- Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Win32 programs", e);
+ Context.API.LogException(ClassName, "Failed to index Win32 programs", e);
}
finally
{
@@ -320,7 +320,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (Exception e)
{
- Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Uwp programs", e);
+ Context.API.LogException(ClassName, "Failed to index Uwp programs", e);
}
finally
{
@@ -332,12 +332,12 @@ namespace Flow.Launcher.Plugin.Program
{
var win32Task = Task.Run(async () =>
{
- await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|Win32Program index cost", IndexWin32ProgramsAsync);
+ await Context.API.StopwatchLogInfoAsync(ClassName, "Win32Program index cost", IndexWin32ProgramsAsync);
});
var uwpTask = Task.Run(async () =>
{
- await Stopwatch.NormalAsync("|Flow.Launcher.Plugin.Program.Main|UWPProgram index cost", IndexUwpProgramsAsync);
+ await Context.API.StopwatchLogInfoAsync(ClassName, "UWPProgram index cost", IndexUwpProgramsAsync);
});
await Task.WhenAll(win32Task, uwpTask).ConfigureAwait(false);
From 1af9d061f741735b015b880c754bfc5ef9226bb7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 8 Apr 2025 21:53:00 +0800
Subject: [PATCH 0641/1442] Use api functions in other places
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 6 ++++--
Flow.Launcher.Core/Plugin/PluginsLoader.cs | 10 +++++++---
Flow.Launcher/App.xaml.cs | 7 ++++---
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 0ee268f5c..4c85fb061 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -23,6 +23,8 @@ namespace Flow.Launcher.Core.Plugin
///
public static class PluginManager
{
+ private static readonly string ClassName = nameof(PluginManager);
+
private static IEnumerable _contextMenuPlugins;
public static List AllPlugins { get; private set; }
@@ -194,7 +196,7 @@ namespace Flow.Launcher.Core.Plugin
{
try
{
- var milliseconds = await Stopwatch.DebugAsync($"|PluginManager.InitializePlugins|Init method time cost for <{pair.Metadata.Name}>",
+ var milliseconds = await API.StopwatchLogDebugAsync(ClassName, $"Init method time cost for <{pair.Metadata.Name}>",
() => pair.Plugin.InitAsync(new PluginInitContext(pair.Metadata, API)));
pair.Metadata.InitTime += milliseconds;
@@ -266,7 +268,7 @@ namespace Flow.Launcher.Core.Plugin
try
{
- var milliseconds = await Stopwatch.DebugAsync($"|PluginManager.QueryForPlugin|Cost for {metadata.Name}",
+ var milliseconds = await API.StopwatchLogDebugAsync(ClassName, $"Cost for {metadata.Name}",
async () => results = await pair.Plugin.QueryAsync(query, token).ConfigureAwait(false));
token.ThrowIfCancellationRequested();
diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs
index 495a4c1ab..1010d9f08 100644
--- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs
+++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs
@@ -11,12 +11,17 @@ using Flow.Launcher.Infrastructure.Logger;
#pragma warning restore IDE0005
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
-using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
namespace Flow.Launcher.Core.Plugin
{
public static class PluginsLoader
{
+ private static readonly string ClassName = nameof(PluginsLoader);
+
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
public static List Plugins(List metadatas, PluginsSettings settings)
{
var dotnetPlugins = DotNetPlugins(metadatas);
@@ -59,8 +64,7 @@ namespace Flow.Launcher.Core.Plugin
foreach (var metadata in metadatas)
{
- var milliseconds = Stopwatch.Debug(
- $"|PluginsLoader.DotNetPlugins|Constructor init cost for {metadata.Name}", () =>
+ var milliseconds = API.StopwatchLogDebug(ClassName, $"Constructor init cost for {metadata.Name}", () =>
{
Assembly assembly = null;
IAsyncPlugin plugin = null;
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 81938612c..90fefe0a6 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -21,7 +21,6 @@ using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch;
namespace Flow.Launcher
{
@@ -35,6 +34,8 @@ namespace Flow.Launcher
#region Private Fields
+ private static readonly string ClassName = nameof(App);
+
private static bool _disposed;
private MainWindow _mainWindow;
private readonly MainViewModel _mainVM;
@@ -136,7 +137,7 @@ namespace Flow.Launcher
private async void OnStartup(object sender, StartupEventArgs e)
{
- await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
+ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () =>
{
// Because new message box api uses MessageBoxEx window,
// if it is created and closed before main window is created, it will cause the application to exit.
@@ -313,7 +314,7 @@ namespace Flow.Launcher
_disposed = true;
}
- Stopwatch.Normal("|App.Dispose|Dispose cost", () =>
+ API.StopwatchLogInfo(ClassName, "Dispose cost", () =>
{
Log.Info("|App.Dispose|Begin Flow Launcher dispose ----------------------------------------------------");
From 47743e6362469684e432b790649b419b96d0d543 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 09:31:02 +0800
Subject: [PATCH 0642/1442] Set max result lower limit to 1
---
.../ViewModels/SettingsViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
index d2b85e687..407300924 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
@@ -524,7 +524,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
}
}
- public int MaxResultLowerLimit => 100;
+ public int MaxResultLowerLimit => 1;
public int MaxResultUpperLimit => 100000;
public int MaxResult
From 49dc657becdac6f23f66c3ee4060165ff5b9838e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:12:32 +0800
Subject: [PATCH 0643/1442] Fix build issue
---
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index 5dec8b953..3eb74dd74 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.BrowserBookmark.Commands;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Flow.Launcher.Plugin.BrowserBookmark.Views;
@@ -10,6 +9,7 @@ using System.IO;
using System.Threading.Channels;
using System.Threading.Tasks;
using System.Threading;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Plugin.BrowserBookmark;
@@ -35,7 +35,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
_context.CurrentPluginMetadata.PluginCacheDirectoryPath,
"FaviconCache");
- Helper.ValidateDirectory(_faviconCacheDir);
+ FilesFolders.ValidateDirectory(_faviconCacheDir);
LoadBookmarksIfEnabled();
}
From 9c07989edf4f42766922317b639e710ec33d6e35 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:14:07 +0800
Subject: [PATCH 0644/1442] Improve code quality
---
.../ChromiumBookmarkLoader.cs | 4 +-
.../ContextMenu.cs | 21 +++-----
.../DirectoryInfo/DirectoryInfoSearch.cs | 7 ++-
.../Search/WindowsIndex/WindowsIndex.cs | 8 +--
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 13 ++---
Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 49 ++++++++++---------
Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 7 +--
7 files changed, 51 insertions(+), 58 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
index 282876472..27bcbd9a9 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
@@ -2,7 +2,6 @@
using System.IO;
using System.Text.Json;
using System;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.BrowserBookmark.Models;
using Microsoft.Data.Sqlite;
@@ -116,8 +115,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
else
{
- Log.Error(
- $"ChromiumBookmarkLoader: EnumerateFolderBookmark: type property not found for {subElement.GetString()}");
+ Main._context.API.LogError(ClassName, $"type property not found for {subElement.GetString()}");
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
index 3f3b7cb58..f6de65e90 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
@@ -2,13 +2,12 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using System.Linq;
using System.Threading.Tasks;
using System.Windows;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
-using System.Linq;
using Flow.Launcher.Plugin.Explorer.Helper;
using Flow.Launcher.Plugin.Explorer.ViewModels;
@@ -470,22 +469,16 @@ namespace Flow.Launcher.Plugin.Explorer
private void LogException(string message, Exception e)
{
- Log.Exception($"|Flow.Launcher.Plugin.Folder.ContextMenu|{message}", e);
+ Context.API.LogException(nameof(Main), message, e);
}
- private bool CanRunAsDifferentUser(string path)
+ private static bool CanRunAsDifferentUser(string path)
{
- switch (Path.GetExtension(path))
+ return Path.GetExtension(path) switch
{
- case ".exe":
- case ".bat":
- case ".msi":
- return true;
-
- default:
- return false;
-
- }
+ ".exe" or ".bat" or ".msi" => true,
+ _ => false,
+ };
}
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
index 9fd495f49..1a0d3bd15 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
@@ -1,10 +1,9 @@
-using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Plugin.SharedCommands;
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
+using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
{
@@ -76,7 +75,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
}
catch (Exception e)
{
- Log.Exception(nameof(DirectoryInfoSearch), "Error occurred while searching path", e);
+ Main.Context.API.LogException(nameof(DirectoryInfoSearch), "Error occurred while searching path", e);
throw;
}
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs
index 66230937c..2aeb421e0 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs
@@ -1,6 +1,4 @@
-using Flow.Launcher.Infrastructure.Logger;
-using Microsoft.Search.Interop;
-using System;
+using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
@@ -9,11 +7,13 @@ using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading;
using Flow.Launcher.Plugin.Explorer.Exceptions;
+using Microsoft.Search.Interop;
namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
{
internal static class WindowsIndex
{
+ private static readonly string ClassName = nameof(WindowsIndex);
// Reserved keywords in oleDB
private static Regex _reservedPatternMatcher = new(@"^[`\@\@\#\#\*\^,\&\&\/\\\$\%_;\[\]]+$", RegexOptions.Compiled);
@@ -33,7 +33,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
}
catch (OleDbException e)
{
- Log.Exception($"|WindowsIndex.ExecuteWindowsIndexSearchAsync|Failed to execute windows index search query: {indexQueryString}", e);
+ Main.Context.API.LogException(ClassName, $"Failed to execute windows index search query: {indexQueryString}", e);
yield break;
}
await using var dataReader = dataReaderAttempt;
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index a50868b69..acfa0655e 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -6,7 +6,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.Program.Programs;
using Flow.Launcher.Plugin.Program.Views;
@@ -20,6 +19,8 @@ namespace Flow.Launcher.Plugin.Program
{
public class Main : ISettingProvider, IAsyncPlugin, IPluginI18n, IContextMenu, IAsyncReloadable, IDisposable
{
+ private static readonly string ClassName = nameof(Main);
+
private const string Win32CacheName = "Win32";
private const string UwpCacheName = "UWP";
@@ -109,7 +110,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (OperationCanceledException)
{
- Log.Debug("|Flow.Launcher.Plugin.Program.Main|Query operation cancelled");
+ Context.API.LogDebug(ClassName, "Query operation cancelled");
return emptyResults;
}
finally
@@ -253,8 +254,8 @@ namespace Flow.Launcher.Plugin.Program
_uwpsCount = _uwps.Count;
_uwpsLock.Release();
});
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32sCount}>");
- Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwpsCount}>");
+ Context.API.LogInfo(ClassName, "Number of preload win32 programs <{_win32sCount}>");
+ Context.API.LogInfo(ClassName, "Number of preload uwps <{_uwpsCount}>");
var cacheEmpty = _win32sCount == 0 || _uwpsCount == 0;
@@ -295,7 +296,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (Exception e)
{
- Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Win32 programs", e);
+ Context.API.LogException(ClassName, "Failed to index Win32 programs", e);
}
finally
{
@@ -320,7 +321,7 @@ namespace Flow.Launcher.Plugin.Program
}
catch (Exception e)
{
- Log.Exception("|Flow.Launcher.Plugin.Program.Main|Failed to index Uwp programs", e);
+ Context.API.LogException(ClassName, "Failed to index Uwp programs", e);
}
finally
{
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
index 53479b81f..97ff61304 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
@@ -8,7 +8,6 @@ using System.Threading.Tasks;
using WindowsInput;
using WindowsInput.Native;
using Flow.Launcher.Infrastructure.Hotkey;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
using Control = System.Windows.Controls.Control;
using Keys = System.Windows.Forms.Keys;
@@ -17,8 +16,11 @@ namespace Flow.Launcher.Plugin.Shell
{
public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu
{
+ private static readonly string ClassName = nameof(Main);
+
+ internal PluginInitContext Context { get; private set; }
+
private const string Image = "Images/shell.png";
- private PluginInitContext context;
private bool _winRStroked;
private readonly KeyboardSimulator _keyboardSimulator = new KeyboardSimulator(new InputSimulator());
@@ -88,7 +90,7 @@ namespace Flow.Launcher.Plugin.Shell
}
catch (Exception e)
{
- Log.Exception($"|Flow.Launcher.Plugin.Shell.Main.Query|Exception when query for <{query}>", e);
+ Context.API.LogException(ClassName, $"Exception when query for <{query}>", e);
}
return results;
}
@@ -102,14 +104,14 @@ namespace Flow.Launcher.Plugin.Shell
{
if (m.Key == cmd)
{
- result.SubTitle = string.Format(context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value);
+ result.SubTitle = string.Format(Context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value);
return null;
}
var ret = new Result
{
Title = m.Key,
- SubTitle = string.Format(context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value),
+ SubTitle = string.Format(Context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value),
IcoPath = Image,
Action = c =>
{
@@ -139,7 +141,7 @@ namespace Flow.Launcher.Plugin.Shell
{
Title = cmd,
Score = 5000,
- SubTitle = context.API.GetTranslation("flowlauncher_plugin_cmd_execute_through_shell"),
+ SubTitle = Context.API.GetTranslation("flowlauncher_plugin_cmd_execute_through_shell"),
IcoPath = Image,
Action = c =>
{
@@ -164,7 +166,7 @@ namespace Flow.Launcher.Plugin.Shell
.Select(m => new Result
{
Title = m.Key,
- SubTitle = string.Format(context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value),
+ SubTitle = string.Format(Context.API.GetTranslation("flowlauncher_plugin_cmd_cmd_has_been_executed_times"), m.Value),
IcoPath = Image,
Action = c =>
{
@@ -211,7 +213,7 @@ namespace Flow.Launcher.Plugin.Shell
info.FileName = "cmd.exe";
}
- info.ArgumentList.Add($"{(_settings.LeaveShellOpen ? "/k" : "/c")} {command} {(_settings.CloseShellAfterPress ? $"&& echo {context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")} && pause > nul /c" : "")}");
+ info.ArgumentList.Add($"{(_settings.LeaveShellOpen ? "/k" : "/c")} {command} {(_settings.CloseShellAfterPress ? $"&& echo {Context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")} && pause > nul /c" : "")}");
break;
}
@@ -234,7 +236,7 @@ namespace Flow.Launcher.Plugin.Shell
else
{
info.ArgumentList.Add("-Command");
- info.ArgumentList.Add($"{command}\\; {(_settings.CloseShellAfterPress ? $"Write-Host '{context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")}'\\; [System.Console]::ReadKey()\\; exit" : "")}");
+ info.ArgumentList.Add($"{command}\\; {(_settings.CloseShellAfterPress ? $"Write-Host '{Context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")}'\\; [System.Console]::ReadKey()\\; exit" : "")}");
}
break;
}
@@ -255,7 +257,7 @@ namespace Flow.Launcher.Plugin.Shell
info.ArgumentList.Add("-NoExit");
}
info.ArgumentList.Add("-Command");
- info.ArgumentList.Add($"{command}\\; {(_settings.CloseShellAfterPress ? $"Write-Host '{context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")}'\\; [System.Console]::ReadKey()\\; exit" : "")}");
+ info.ArgumentList.Add($"{command}\\; {(_settings.CloseShellAfterPress ? $"Write-Host '{Context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close")}'\\; [System.Console]::ReadKey()\\; exit" : "")}");
break;
}
@@ -309,13 +311,13 @@ namespace Flow.Launcher.Plugin.Shell
{
var name = "Plugin: Shell";
var message = $"Command not found: {e.Message}";
- context.API.ShowMsg(name, message);
+ Context.API.ShowMsg(name, message);
}
catch (Win32Exception e)
{
var name = "Plugin: Shell";
var message = $"Error running the command: {e.Message}";
- context.API.ShowMsg(name, message);
+ Context.API.ShowMsg(name, message);
}
}
@@ -350,14 +352,14 @@ namespace Flow.Launcher.Plugin.Shell
public void Init(PluginInitContext context)
{
- this.context = context;
+ Context = context;
_settings = context.API.LoadSettingJsonStorage();
context.API.RegisterGlobalKeyboardCallback(API_GlobalKeyboardEvent);
}
bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state)
{
- if (!context.CurrentPluginMetadata.Disabled && _settings.ReplaceWinR)
+ if (!Context.CurrentPluginMetadata.Disabled && _settings.ReplaceWinR)
{
if (keyevent == (int)KeyEvent.WM_KEYDOWN && vkcode == (int)Keys.R && state.WinPressed)
{
@@ -380,10 +382,9 @@ namespace Flow.Launcher.Plugin.Shell
// show the main window and set focus to the query box
_ = Task.Run(() =>
{
- context.API.ShowMainWindow();
- context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}");
+ Context.API.ShowMainWindow();
+ Context.API.ChangeQuery($"{Context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}");
});
-
}
public Control CreateSettingPanel()
@@ -393,12 +394,12 @@ namespace Flow.Launcher.Plugin.Shell
public string GetTranslatedPluginTitle()
{
- return context.API.GetTranslation("flowlauncher_plugin_cmd_plugin_name");
+ return Context.API.GetTranslation("flowlauncher_plugin_cmd_plugin_name");
}
public string GetTranslatedPluginDescription()
{
- return context.API.GetTranslation("flowlauncher_plugin_cmd_plugin_description");
+ return Context.API.GetTranslation("flowlauncher_plugin_cmd_plugin_description");
}
public List LoadContextMenus(Result selectedResult)
@@ -407,8 +408,8 @@ namespace Flow.Launcher.Plugin.Shell
{
new()
{
- Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"),
- AsyncAction = async c =>
+ Title = Context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"),
+ Action = c =>
{
Execute(ShellCommand.RunAsDifferentUser, PrepareProcessStartInfo(selectedResult.Title));
return true;
@@ -418,7 +419,7 @@ namespace Flow.Launcher.Plugin.Shell
},
new()
{
- Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_administrator"),
+ Title = Context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_administrator"),
Action = c =>
{
Execute(Process.Start, PrepareProcessStartInfo(selectedResult.Title, true));
@@ -429,10 +430,10 @@ namespace Flow.Launcher.Plugin.Shell
},
new()
{
- Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"),
+ Title = Context.API.GetTranslation("flowlauncher_plugin_cmd_copy"),
Action = c =>
{
- context.API.CopyToClipboard(selectedResult.Title);
+ Context.API.CopyToClipboard(selectedResult.Title);
return true;
},
IcoPath = "Images/copy.png",
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
index 94a9d0348..043eb7a19 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
@@ -6,7 +6,6 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Windows.Win32;
using Windows.Win32.Foundation;
@@ -19,6 +18,8 @@ namespace Flow.Launcher.Plugin.Sys
{
public class Main : IPlugin, ISettingProvider, IPluginI18n
{
+ private static readonly string ClassName = nameof(Main);
+
private readonly Dictionary KeywordTitleMappings = new()
{
{"Shutdown", "flowlauncher_plugin_sys_shutdown_computer_cmd"},
@@ -106,7 +107,7 @@ namespace Flow.Launcher.Plugin.Sys
{
if (!KeywordTitleMappings.TryGetValue(key, out var translationKey))
{
- Log.Error("Flow.Launcher.Plugin.Sys.Main", $"Title not found for: {key}");
+ _context.API.LogError(ClassName, $"Title not found for: {key}");
return "Title Not Found";
}
@@ -117,7 +118,7 @@ namespace Flow.Launcher.Plugin.Sys
{
if (!KeywordDescriptionMappings.TryGetValue(key, out var translationKey))
{
- Log.Error("Flow.Launcher.Plugin.Sys.Main", $"Description not found for: {key}");
+ _context.API.LogError(ClassName, $"Description not found for: {key}");
return "Description Not Found";
}
From 4e1d4ab7afcddeaa39f0b1aeca0639e401a5e933 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:18:44 +0800
Subject: [PATCH 0645/1442] Remove unused project reference
---
.../Flow.Launcher.Plugin.WebSearch.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj
index c2d0a46a0..73726ab37 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj
@@ -51,7 +51,6 @@
-
From 1aeaaf2fc24d32d67d994f84b2e84b555fb8c367 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:30:50 +0800
Subject: [PATCH 0646/1442] Add keyevent in Plugin project & Improve Shell
plugin code quality
---
Flow.Launcher.Infrastructure/NativeMethods.txt | 5 -----
.../Hotkey => Flow.Launcher.Plugin}/KeyEvent.cs | 7 ++++++-
Flow.Launcher.Plugin/NativeMethods.txt | 7 ++++++-
.../Flow.Launcher.Plugin.Shell.csproj | 1 -
Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 7 +++----
5 files changed, 15 insertions(+), 12 deletions(-)
rename {Flow.Launcher.Infrastructure/Hotkey => Flow.Launcher.Plugin}/KeyEvent.cs (61%)
diff --git a/Flow.Launcher.Infrastructure/NativeMethods.txt b/Flow.Launcher.Infrastructure/NativeMethods.txt
index 363ecb9d0..18b206022 100644
--- a/Flow.Launcher.Infrastructure/NativeMethods.txt
+++ b/Flow.Launcher.Infrastructure/NativeMethods.txt
@@ -11,11 +11,6 @@ GetModuleHandle
GetKeyState
VIRTUAL_KEY
-WM_KEYDOWN
-WM_KEYUP
-WM_SYSKEYDOWN
-WM_SYSKEYUP
-
EnumWindows
DwmSetWindowAttribute
diff --git a/Flow.Launcher.Infrastructure/Hotkey/KeyEvent.cs b/Flow.Launcher.Plugin/KeyEvent.cs
similarity index 61%
rename from Flow.Launcher.Infrastructure/Hotkey/KeyEvent.cs
rename to Flow.Launcher.Plugin/KeyEvent.cs
index 95bb25837..321f17cc1 100644
--- a/Flow.Launcher.Infrastructure/Hotkey/KeyEvent.cs
+++ b/Flow.Launcher.Plugin/KeyEvent.cs
@@ -1,7 +1,12 @@
using Windows.Win32;
-namespace Flow.Launcher.Infrastructure.Hotkey
+namespace Flow.Launcher.Plugin
{
+ ///
+ /// Enumeration of key events for
+ ///
+ /// and
+ ///
public enum KeyEvent
{
///
diff --git a/Flow.Launcher.Plugin/NativeMethods.txt b/Flow.Launcher.Plugin/NativeMethods.txt
index e3e2b705e..0596691cc 100644
--- a/Flow.Launcher.Plugin/NativeMethods.txt
+++ b/Flow.Launcher.Plugin/NativeMethods.txt
@@ -1,3 +1,8 @@
EnumThreadWindows
GetWindowText
-GetWindowTextLength
\ No newline at end of file
+GetWindowTextLength
+
+WM_KEYDOWN
+WM_KEYUP
+WM_SYSKEYDOWN
+WM_SYSKEYUP
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj
index 8f443214b..c7ea7cdd5 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj
@@ -37,7 +37,6 @@
-
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
index 97ff61304..b149884d7 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
@@ -7,7 +7,6 @@ using System.Linq;
using System.Threading.Tasks;
using WindowsInput;
using WindowsInput.Native;
-using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Plugin.SharedCommands;
using Control = System.Windows.Controls.Control;
using Keys = System.Windows.Forms.Keys;
@@ -22,7 +21,7 @@ namespace Flow.Launcher.Plugin.Shell
private const string Image = "Images/shell.png";
private bool _winRStroked;
- private readonly KeyboardSimulator _keyboardSimulator = new KeyboardSimulator(new InputSimulator());
+ private readonly KeyboardSimulator _keyboardSimulator = new(new InputSimulator());
private Settings _settings;
@@ -55,7 +54,7 @@ namespace Flow.Launcher.Plugin.Shell
{
basedir = Path.GetDirectoryName(excmd);
var dirName = Path.GetDirectoryName(cmd);
- dir = (dirName.EndsWith("/") || dirName.EndsWith(@"\")) ? dirName : cmd.Substring(0, dirName.Length + 1);
+ dir = (dirName.EndsWith("/") || dirName.EndsWith(@"\")) ? dirName : cmd[..(dirName.Length + 1)];
}
if (basedir != null)
@@ -321,7 +320,7 @@ namespace Flow.Launcher.Plugin.Shell
}
}
- private bool ExistInPath(string filename)
+ private static bool ExistInPath(string filename)
{
if (File.Exists(filename))
{
From c035b65517befa0b3df89560f51a6447781b1937 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:31:53 +0800
Subject: [PATCH 0647/1442] Fix code documents issue
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 273676bfb..ff0f1ba4a 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -372,6 +372,7 @@ namespace Flow.Launcher.Plugin
///
public bool SetCurrentTheme(ThemeData theme);
+ ///
/// Save all Flow's plugins caches
///
void SavePluginCaches();
@@ -404,6 +405,7 @@ namespace Flow.Launcher.Plugin
///
Task SaveCacheBinaryStorageAsync(string cacheName, string cacheDirectory) where T : new();
+ ///
/// Load image from path. Support local, remote and data:image url.
/// If image path is missing, it will return a missing icon.
///
@@ -418,6 +420,7 @@ namespace Flow.Launcher.Plugin
///
ValueTask LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true);
+ ///
/// Update the plugin manifest
///
///
From e07beb22613a7d7c1d4cf7670d52d99546137e89 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:33:22 +0800
Subject: [PATCH 0648/1442] Add dispose
---
Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
index b149884d7..0d395c053 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs
@@ -13,7 +13,7 @@ using Keys = System.Windows.Forms.Keys;
namespace Flow.Launcher.Plugin.Shell
{
- public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu
+ public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu, IDisposable
{
private static readonly string ClassName = nameof(Main);
@@ -442,5 +442,10 @@ namespace Flow.Launcher.Plugin.Shell
return results;
}
+
+ public void Dispose()
+ {
+ Context.API.RemoveGlobalKeyboardCallback(API_GlobalKeyboardEvent);
+ }
}
}
From 46712f287ffdd188687850875acf884ad54b4a9e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:37:42 +0800
Subject: [PATCH 0649/1442] Improve api documents
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 40 +++++++++++++++++--
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index ff0f1ba4a..6f17f57f5 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -142,15 +142,47 @@ namespace Flow.Launcher.Plugin
List GetAllPlugins();
///
- /// Register a callback for Global Keyboard Event
+ /// Registers a callback function for global keyboard events.
///
- ///
+ ///
+ /// The callback function to invoke when a global keyboard event occurs.
+ ///
+ /// Parameters:
+ ///
+ /// int: The type of (key down, key up, etc.)
+ /// int: The virtual key code of the pressed/released key
+ /// : The state of modifier keys (Ctrl, Alt, Shift, etc.)
+ ///
+ ///
+ ///
+ /// Returns: true to allow normal system processing of the key event,
+ /// or false to intercept and prevent default handling.
+ ///
+ ///
+ ///
+ /// This callback will be invoked for all keyboard events system-wide.
+ /// Use with caution as intercepting system keys may affect normal system operation.
+ ///
public void RegisterGlobalKeyboardCallback(Func callback);
-
+
///
/// Remove a callback for Global Keyboard Event
///
- ///
+ ///
+ /// The callback function to invoke when a global keyboard event occurs.
+ ///
+ /// Parameters:
+ ///
+ /// int: The type of (key down, key up, etc.)
+ /// int: The virtual key code of the pressed/released key
+ /// : The state of modifier keys (Ctrl, Alt, Shift, etc.)
+ ///
+ ///
+ ///
+ /// Returns: true to allow normal system processing of the key event,
+ /// or false to intercept and prevent default handling.
+ ///
+ ///
public void RemoveGlobalKeyboardCallback(Func callback);
///
From f71e7461c6cf83cababdd18d6c4f8f766aa20aa5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:38:52 +0800
Subject: [PATCH 0650/1442] Remove unused project reference
---
Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
index 266c24170..dbc36ad42 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj
@@ -39,7 +39,6 @@
-
From 826bc42536432f8b5afe07bee6f34a7db7b7c7f2 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:44:26 +0800
Subject: [PATCH 0651/1442] Improve code quality
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +-
.../Programs/UWPPackage.cs | 19 +++++-----
.../Programs/Win32.cs | 37 +++++++++----------
3 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index acfa0655e..99fa44257 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -275,7 +275,7 @@ namespace Flow.Launcher.Plugin.Program
static void WatchProgramUpdate()
{
Win32.WatchProgramUpdate(_settings);
- _ = UWPPackage.WatchPackageChange();
+ _ = UWPPackage.WatchPackageChangeAsync();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
index bf100ed7e..cb33250e1 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs
@@ -8,7 +8,6 @@ using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using Windows.ApplicationModel;
using Windows.Management.Deployment;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.Program.Logger;
using Flow.Launcher.Plugin.SharedModels;
using System.Threading.Channels;
@@ -290,9 +289,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
}
- private static Channel PackageChangeChannel = Channel.CreateBounded(1);
+ private static readonly Channel PackageChangeChannel = Channel.CreateBounded(1);
- public static async Task WatchPackageChange()
+ public static async Task WatchPackageChangeAsync()
{
if (Environment.OSVersion.Version.Major >= 10)
{
@@ -403,13 +402,13 @@ namespace Flow.Launcher.Plugin.Program.Programs
if (!Main._settings.EnableDescription || string.IsNullOrWhiteSpace(Description) || Name.Equals(Description))
{
title = Name;
- matchResult = StringMatcher.FuzzySearch(query, Name);
+ matchResult = Main.Context.API.FuzzySearch(query, Name);
}
else
{
title = $"{Name}: {Description}";
- var nameMatch = StringMatcher.FuzzySearch(query, Name);
- var descriptionMatch = StringMatcher.FuzzySearch(query, Description);
+ var nameMatch = Main.Context.API.FuzzySearch(query, Name);
+ var descriptionMatch = Main.Context.API.FuzzySearch(query, Description);
if (descriptionMatch.Score > nameMatch.Score)
{
for (int i = 0; i < descriptionMatch.MatchData.Count; i++)
@@ -477,7 +476,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
var contextMenus = new List
{
- new Result
+ new()
{
Title = api.GetTranslation("flowlauncher_plugin_program_open_containing_folder"),
Action = _ =>
@@ -496,9 +495,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
contextMenus.Add(new Result
{
Title = api.GetTranslation("flowlauncher_plugin_program_run_as_administrator"),
- Action = _ =>
+ Action = c =>
{
- Task.Run(() => Launch(true)).ConfigureAwait(false);
+ _ = Task.Run(() => Launch(true)).ConfigureAwait(false);
return true;
},
IcoPath = "Images/cmd.png",
@@ -539,7 +538,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
ProgramLogger.LogException($"|UWP|LogoPathFromUri|{Location}" +
$"|{UserModelId} 's logo uri is null or empty: {Location}",
- new ArgumentException("uri"));
+ new ArgumentException(null, nameof(uri)));
return string.Empty;
}
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index 06be2a628..a87b002d4 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -6,7 +6,6 @@ using System.Security;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.Program.Logger;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.SharedModels;
@@ -73,7 +72,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
private const string ExeExtension = "exe";
private string _uid = string.Empty;
- private static readonly Win32 Default = new Win32()
+ private static readonly Win32 Default = new()
{
Name = string.Empty,
Description = string.Empty,
@@ -92,7 +91,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
if (candidates.Count == 0)
return null;
- var match = candidates.Select(candidate => StringMatcher.FuzzySearch(query, candidate))
+ var match = candidates.Select(candidate => Main.Context.API.FuzzySearch(query, candidate))
.MaxBy(match => match.Score);
return match?.IsSearchPrecisionScoreMet() ?? false ? match : null;
@@ -112,14 +111,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
resultName.Equals(Description))
{
title = resultName;
- matchResult = StringMatcher.FuzzySearch(query, resultName);
+ matchResult = Main.Context.API.FuzzySearch(query, resultName);
}
else
{
// Search in both
title = $"{resultName}: {Description}";
- var nameMatch = StringMatcher.FuzzySearch(query, resultName);
- var descriptionMatch = StringMatcher.FuzzySearch(query, Description);
+ var nameMatch = Main.Context.API.FuzzySearch(query, resultName);
+ var descriptionMatch = Main.Context.API.FuzzySearch(query, Description);
if (descriptionMatch.Score > nameMatch.Score)
{
for (int i = 0; i < descriptionMatch.MatchData.Count; i++)
@@ -219,27 +218,27 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
var contextMenus = new List
{
- new Result
+ new()
{
Title = api.GetTranslation("flowlauncher_plugin_program_run_as_different_user"),
- Action = _ =>
+ Action = c =>
{
var info = new ProcessStartInfo
{
FileName = FullPath, WorkingDirectory = ParentDirectory, UseShellExecute = true
};
- Task.Run(() => Main.StartProcess(ShellCommand.RunAsDifferentUser, info));
+ _ = Task.Run(() => Main.StartProcess(ShellCommand.RunAsDifferentUser, info));
return true;
},
IcoPath = "Images/user.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ee"),
},
- new Result
+ new()
{
Title = api.GetTranslation("flowlauncher_plugin_program_run_as_administrator"),
- Action = _ =>
+ Action = c =>
{
var info = new ProcessStartInfo
{
@@ -249,14 +248,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
UseShellExecute = true
};
- Task.Run(() => Main.StartProcess(Process.Start, info));
+ _ = Task.Run(() => Main.StartProcess(Process.Start, info));
return true;
},
IcoPath = "Images/cmd.png",
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe7ef"),
},
- new Result
+ new()
{
Title = api.GetTranslation("flowlauncher_plugin_program_open_containing_folder"),
Action = _ =>
@@ -296,7 +295,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
return Name;
}
- private static List Watchers = new List();
+ private static readonly List Watchers = new();
private static Win32 Win32Program(string path)
{
@@ -402,7 +401,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
var data = parser.ReadFile(path);
var urlSection = data["InternetShortcut"];
var url = urlSection?["URL"];
- if (String.IsNullOrEmpty(url))
+ if (string.IsNullOrEmpty(url))
{
return program;
}
@@ -418,12 +417,12 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
var iconPath = urlSection?["IconFile"];
- if (!String.IsNullOrEmpty(iconPath))
+ if (!string.IsNullOrEmpty(iconPath))
{
program.IcoPath = iconPath;
}
}
- catch (Exception e)
+ catch (Exception)
{
// Many files do not have the required fields, so no logging is done.
}
@@ -474,7 +473,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
var extension = Path.GetExtension(path)?.ToLowerInvariant();
if (!string.IsNullOrEmpty(extension))
{
- return extension.Substring(1); // remove dot
+ return extension[1..]; // remove dot
}
else
{
@@ -785,7 +784,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
_ = Task.Run(MonitorDirectoryChangeAsync);
}
- private static Channel indexQueue = Channel.CreateBounded(1);
+ private static readonly Channel indexQueue = Channel.CreateBounded(1);
public static async Task MonitorDirectoryChangeAsync()
{
From d4c9626cbf5f62fda084db5f6949b636b8da9265 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:54:20 +0800
Subject: [PATCH 0652/1442] Improve code quality & Remove unused project
reference
---
...low.Launcher.Plugin.PluginIndicator.csproj | 2 -
.../Main.cs | 41 ++++++++++++++-----
2 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj
index 21d964c11..1e662de9e 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj
+++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj
@@ -41,8 +41,6 @@
-
-
diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
index aea0d77a1..05e8d960f 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
@@ -1,20 +1,20 @@
using System.Collections.Generic;
using System.Linq;
-using Flow.Launcher.Core.Plugin;
namespace Flow.Launcher.Plugin.PluginIndicator
{
public class Main : IPlugin, IPluginI18n
{
- private PluginInitContext context;
+ internal PluginInitContext Context { get; private set; }
public List Query(Query query)
{
+ var nonGlobalPlugins = GetNonGlobalPlugins();
var results =
- from keyword in PluginManager.NonGlobalPlugins.Keys
- let plugin = PluginManager.NonGlobalPlugins[keyword].Metadata
- let keywordSearchResult = context.API.FuzzySearch(query.Search, keyword)
- let searchResult = keywordSearchResult.IsSearchPrecisionScoreMet() ? keywordSearchResult : context.API.FuzzySearch(query.Search, plugin.Name)
+ from keyword in nonGlobalPlugins.Keys
+ let plugin = nonGlobalPlugins[keyword].Metadata
+ let keywordSearchResult = Context.API.FuzzySearch(query.Search, keyword)
+ let searchResult = keywordSearchResult.IsSearchPrecisionScoreMet() ? keywordSearchResult : Context.API.FuzzySearch(query.Search, plugin.Name)
let score = searchResult.Score
where (searchResult.IsSearchPrecisionScoreMet()
|| string.IsNullOrEmpty(query.Search)) // To list all available action keywords
@@ -22,32 +22,51 @@ namespace Flow.Launcher.Plugin.PluginIndicator
select new Result
{
Title = keyword,
- SubTitle = string.Format(context.API.GetTranslation("flowlauncher_plugin_pluginindicator_result_subtitle"), plugin.Name),
+ SubTitle = string.Format(Context.API.GetTranslation("flowlauncher_plugin_pluginindicator_result_subtitle"), plugin.Name),
Score = score,
IcoPath = plugin.IcoPath,
AutoCompleteText = $"{keyword}{Plugin.Query.TermSeparator}",
Action = c =>
{
- context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeparator}");
+ Context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeparator}");
return false;
}
};
return results.ToList();
}
+ private Dictionary GetNonGlobalPlugins()
+ {
+ var nonGlobalPlugins = new Dictionary();
+ foreach (var plugin in Context.API.GetAllPlugins())
+ {
+ foreach (var actionKeyword in plugin.Metadata.ActionKeywords)
+ {
+ // Skip global keywords
+ if (actionKeyword == Plugin.Query.GlobalPluginWildcardSign) continue;
+
+ // Skip dulpicated keywords
+ if (nonGlobalPlugins.ContainsKey(actionKeyword)) continue;
+
+ nonGlobalPlugins.Add(actionKeyword, plugin);
+ }
+ }
+ return nonGlobalPlugins;
+ }
+
public void Init(PluginInitContext context)
{
- this.context = context;
+ Context = context;
}
public string GetTranslatedPluginTitle()
{
- return context.API.GetTranslation("flowlauncher_plugin_pluginindicator_plugin_name");
+ return Context.API.GetTranslation("flowlauncher_plugin_pluginindicator_plugin_name");
}
public string GetTranslatedPluginDescription()
{
- return context.API.GetTranslation("flowlauncher_plugin_pluginindicator_plugin_description");
+ return Context.API.GetTranslation("flowlauncher_plugin_pluginindicator_plugin_description");
}
}
}
From 17cf74e313cba0f5a0de4b6b3cc5e51bc1f22fc2 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 12:57:28 +0800
Subject: [PATCH 0653/1442] Add obsolete warning
---
Flow.Launcher.Infrastructure/UI/EnumBindingSource.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Infrastructure/UI/EnumBindingSource.cs b/Flow.Launcher.Infrastructure/UI/EnumBindingSource.cs
index 350c892cf..f9504e6d9 100644
--- a/Flow.Launcher.Infrastructure/UI/EnumBindingSource.cs
+++ b/Flow.Launcher.Infrastructure/UI/EnumBindingSource.cs
@@ -3,6 +3,7 @@ using System.Windows.Markup;
namespace Flow.Launcher.Infrastructure.UI
{
+ [Obsolete("EnumBindingSourceExtension is obsolete. Use with Flow.Launcher.Localization NuGet package instead.")]
public class EnumBindingSourceExtension : MarkupExtension
{
private Type _enumType;
From c41d02127206047641b5e258366dfb1f4d2ee4ab Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:01:29 +0800
Subject: [PATCH 0654/1442] Add obsolete warning
---
Flow.Launcher.Core/Resource/LocalizationConverter.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Core/Resource/LocalizationConverter.cs b/Flow.Launcher.Core/Resource/LocalizationConverter.cs
index 81600e023..fdda33926 100644
--- a/Flow.Launcher.Core/Resource/LocalizationConverter.cs
+++ b/Flow.Launcher.Core/Resource/LocalizationConverter.cs
@@ -6,6 +6,7 @@ using System.Windows.Data;
namespace Flow.Launcher.Core.Resource
{
+ [Obsolete("LocalizationConverter is obsolete. Use with Flow.Launcher.Localization NuGet package instead.")]
public class LocalizationConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
From da8a69038a3a9091c67340f5d98bea229f78844b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:05:43 +0800
Subject: [PATCH 0655/1442] Improve code quality
---
.../Resource/LocalizedDescriptionAttribute.cs | 10 ++++++---
.../Resource/TranslationConverter.cs | 14 ++++++++----
.../SettingsPanePluginStoreViewModel.cs | 4 ++--
.../SettingsPanePluginsViewModel.cs | 4 ++--
.../Search/ResultManager.cs | 22 +++++++++----------
5 files changed, 31 insertions(+), 23 deletions(-)
diff --git a/Flow.Launcher.Core/Resource/LocalizedDescriptionAttribute.cs b/Flow.Launcher.Core/Resource/LocalizedDescriptionAttribute.cs
index 52a232334..3e1a19a76 100644
--- a/Flow.Launcher.Core/Resource/LocalizedDescriptionAttribute.cs
+++ b/Flow.Launcher.Core/Resource/LocalizedDescriptionAttribute.cs
@@ -1,15 +1,19 @@
using System.ComponentModel;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.Resource
{
public class LocalizedDescriptionAttribute : DescriptionAttribute
{
- private readonly Internationalization _translator;
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
private readonly string _resourceKey;
public LocalizedDescriptionAttribute(string resourceKey)
{
- _translator = InternationalizationManager.Instance;
_resourceKey = resourceKey;
}
@@ -17,7 +21,7 @@ namespace Flow.Launcher.Core.Resource
{
get
{
- string description = _translator.GetTranslation(_resourceKey);
+ string description = API.GetTranslation(_resourceKey);
return string.IsNullOrWhiteSpace(description) ?
string.Format("[[{0}]]", _resourceKey) : description;
}
diff --git a/Flow.Launcher.Core/Resource/TranslationConverter.cs b/Flow.Launcher.Core/Resource/TranslationConverter.cs
index ebab99e5b..eb0032758 100644
--- a/Flow.Launcher.Core/Resource/TranslationConverter.cs
+++ b/Flow.Launcher.Core/Resource/TranslationConverter.cs
@@ -1,19 +1,25 @@
using System;
using System.Globalization;
using System.Windows.Data;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.Resource
{
public class TranslationConverter : IValueConverter
{
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var key = value.ToString();
- if (String.IsNullOrEmpty(key))
- return key;
- return InternationalizationManager.Instance.GetTranslation(key);
+ if (string.IsNullOrEmpty(key)) return key;
+ return API.GetTranslation(key);
}
- public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) =>
+ throw new InvalidOperationException();
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
index 84d8a2ff9..fd2c8e09f 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
@@ -32,7 +32,7 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
public bool SatisfiesFilter(PluginStoreItemViewModel plugin)
{
return string.IsNullOrEmpty(FilterText) ||
- StringMatcher.FuzzySearch(FilterText, plugin.Name).IsSearchPrecisionScoreMet() ||
- StringMatcher.FuzzySearch(FilterText, plugin.Description).IsSearchPrecisionScoreMet();
+ App.API.FuzzySearch(FilterText, plugin.Name).IsSearchPrecisionScoreMet() ||
+ App.API.FuzzySearch(FilterText, plugin.Description).IsSearchPrecisionScoreMet();
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 4958bb7b7..b89e970e9 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -106,8 +106,8 @@ public partial class SettingsPanePluginsViewModel : BaseModel
public List FilteredPluginViewModels => PluginViewModels
.Where(v =>
string.IsNullOrEmpty(FilterText) ||
- StringMatcher.FuzzySearch(FilterText, v.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet() ||
- StringMatcher.FuzzySearch(FilterText, v.PluginPair.Metadata.Description).IsSearchPrecisionScoreMet()
+ App.API.FuzzySearch(FilterText, v.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet() ||
+ App.API.FuzzySearch(FilterText, v.PluginPair.Metadata.Description).IsSearchPrecisionScoreMet()
)
.ToList();
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
index 1add84765..5c4accdc0 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
@@ -1,16 +1,14 @@
-using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Plugin.SharedCommands;
-using System;
+using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
-using Flow.Launcher.Plugin.Explorer.Search.Everything;
-using System.Windows.Input;
-using Path = System.IO.Path;
using System.Windows.Controls;
+using System.Windows.Input;
+using Flow.Launcher.Plugin.Explorer.Search.Everything;
using Flow.Launcher.Plugin.Explorer.Views;
+using Flow.Launcher.Plugin.SharedCommands;
using Peter;
+using Path = System.IO.Path;
namespace Flow.Launcher.Plugin.Explorer.Search
{
@@ -66,7 +64,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
CreateFolderResult(Path.GetFileName(result.FullPath), result.FullPath, result.FullPath, query, result.Score, result.WindowsIndexed),
ResultType.File =>
CreateFileResult(result.FullPath, query, result.Score, result.WindowsIndexed),
- _ => throw new ArgumentOutOfRangeException()
+ _ => throw new ArgumentOutOfRangeException(null)
};
}
@@ -99,7 +97,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
IcoPath = path,
SubTitle = subtitle,
AutoCompleteText = GetAutoCompleteText(title, query, path, ResultType.Folder),
- TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
+ TitleHighlightData = Context.API.FuzzySearch(query.Search, title).MatchData,
CopyText = path,
Preview = new Result.PreviewInfo
{
@@ -164,7 +162,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
return false;
},
Score = score,
- TitleToolTip = InternationalizationManager.Instance.GetTranslation("plugin_explorer_plugin_ToolTipOpenDirectory"),
+ TitleToolTip = Main.Context.API.GetTranslation("plugin_explorer_plugin_ToolTipOpenDirectory"),
SubTitleToolTip = path,
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = path, WindowsIndexed = windowsIndexed }
};
@@ -286,7 +284,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
FilePath = filePath,
},
AutoCompleteText = GetAutoCompleteText(title, query, filePath, ResultType.File),
- TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
+ TitleHighlightData = Context.API.FuzzySearch(query.Search, title).MatchData,
Score = score,
CopyText = filePath,
PreviewPanel = new Lazy(() => new PreviewPanel(Settings, filePath)),
@@ -319,7 +317,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
return true;
},
- TitleToolTip = InternationalizationManager.Instance.GetTranslation("plugin_explorer_plugin_ToolTipOpenContainingFolder"),
+ TitleToolTip = Main.Context.API.GetTranslation("plugin_explorer_plugin_ToolTipOpenContainingFolder"),
SubTitleToolTip = filePath,
ContextData = new SearchResult { Type = ResultType.File, FullPath = filePath, WindowsIndexed = windowsIndexed }
};
From f5de5d70dbede5d276e311489b06fcec01656c42 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:08:28 +0800
Subject: [PATCH 0656/1442] Fix log message issue
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 99fa44257..54e59d1be 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -254,9 +254,8 @@ namespace Flow.Launcher.Plugin.Program
_uwpsCount = _uwps.Count;
_uwpsLock.Release();
});
- Context.API.LogInfo(ClassName, "Number of preload win32 programs <{_win32sCount}>");
- Context.API.LogInfo(ClassName, "Number of preload uwps <{_uwpsCount}>");
-
+ Context.API.LogInfo(ClassName, $"Number of preload win32 programs <{_win32sCount}>");
+ Context.API.LogInfo(ClassName, $"Number of preload uwps <{_uwpsCount}>");
var cacheEmpty = _win32sCount == 0 || _uwpsCount == 0;
if (cacheEmpty || _settings.LastIndexTime.AddHours(30) < DateTime.Now)
From 71b9e4a81121be6d445716786bbf2efe186d85c5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:09:37 +0800
Subject: [PATCH 0657/1442] Fix log info class name issue
---
Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
index f6de65e90..f47907824 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
@@ -393,7 +393,7 @@ namespace Flow.Launcher.Plugin.Explorer
{
Title = Context.API.GetTranslation("plugin_explorer_excludefromindexsearch"),
SubTitle = Context.API.GetTranslation("plugin_explorer_path") + " " + record.FullPath,
- Action = _ =>
+ Action = c_ =>
{
if (!Settings.IndexSearchExcludedSubdirectoryPaths.Any(x => string.Equals(x.Path, record.FullPath, StringComparison.OrdinalIgnoreCase)))
Settings.IndexSearchExcludedSubdirectoryPaths.Add(new AccessLink
@@ -401,7 +401,7 @@ namespace Flow.Launcher.Plugin.Explorer
Path = record.FullPath
});
- Task.Run(() =>
+ _ = Task.Run(() =>
{
Context.API.ShowMsg(Context.API.GetTranslation("plugin_explorer_excludedfromindexsearch_msg"),
Context.API.GetTranslation("plugin_explorer_path") +
@@ -469,7 +469,7 @@ namespace Flow.Launcher.Plugin.Explorer
private void LogException(string message, Exception e)
{
- Context.API.LogException(nameof(Main), message, e);
+ Context.API.LogException(nameof(ContextMenu), message, e);
}
private static bool CanRunAsDifferentUser(string path)
From 048a40d085915e59e7d05d3faf17132ec39aadac Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:11:55 +0800
Subject: [PATCH 0658/1442] Code quality
---
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index 3eb74dd74..3bee49bf2 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -32,7 +32,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
_settings = context.API.LoadSettingJsonStorage();
_faviconCacheDir = Path.Combine(
- _context.CurrentPluginMetadata.PluginCacheDirectoryPath,
+ context.CurrentPluginMetadata.PluginCacheDirectoryPath,
"FaviconCache");
FilesFolders.ValidateDirectory(_faviconCacheDir);
From 7061ac54485e3bd95177dbe737e8b2c4fc521903 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 13:12:05 +0800
Subject: [PATCH 0659/1442] Fix register bookmark file comment
---
.../ChromiumBookmarkLoader.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
index 27bcbd9a9..7631aad91 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
@@ -37,7 +37,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
{
if (File.Exists(bookmarkPath))
{
- //Main.RegisterBookmarkFile(bookmarkPath);
+ Main.RegisterBookmarkFile(bookmarkPath);
}
}
catch (Exception ex)
From f854cd3f7623f12b10eddba2beb69599e9672f5f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 15:22:41 +0800
Subject: [PATCH 0660/1442] Code quality
---
Flow.Launcher.Infrastructure/Image/ImageCache.cs | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageCache.cs b/Flow.Launcher.Infrastructure/Image/ImageCache.cs
index ddbab4ef0..b8c12868b 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageCache.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageCache.cs
@@ -1,8 +1,6 @@
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media;
using BitFaster.Caching.Lfu;
@@ -55,7 +53,6 @@ namespace Flow.Launcher.Infrastructure.Image
return image != null;
}
-
image = null;
return false;
}
From 82f67884ef4619d2f05a931d02e47b40b95479c3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 16:15:37 +0800
Subject: [PATCH 0661/1442] Support svg image file loading
---
.../Flow.Launcher.Infrastructure.csproj | 1 +
.../Image/ImageLoader.cs | 66 +++++++++++++++++--
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 4 +-
.../FirefoxBookmarkLoader.cs | 20 +-----
4 files changed, 66 insertions(+), 25 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
index b91da7114..f02b2297f 100644
--- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
+++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
@@ -67,6 +67,7 @@
+
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 41a33104b..6fd5c6277 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -9,6 +9,8 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
+using SharpVectors.Converters;
+using SharpVectors.Renderers.Wpf;
namespace Flow.Launcher.Infrastructure.Image
{
@@ -25,8 +27,10 @@ namespace Flow.Launcher.Infrastructure.Image
public static ImageSource LoadingImage { get; } = new BitmapImage(new Uri(Constant.LoadingImgIcon));
public const int SmallIconSize = 64;
public const int FullIconSize = 256;
+ public const int FullImageSize = 320;
private static readonly string[] ImageExtensions = { ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".ico" };
+ private static readonly string SvgExtension = ".svg";
public static async Task InitializeAsync()
{
@@ -245,6 +249,19 @@ namespace Flow.Launcher.Infrastructure.Image
image = GetThumbnail(path, ThumbnailOptions.ThumbnailOnly);
}
}
+ else if (extension == SvgExtension)
+ {
+ try
+ {
+ image = LoadFullSvgImage(path, loadFullImage);
+ type = ImageType.FullImageFile;
+ }
+ catch (System.Exception)
+ {
+ image = Image;
+ type = ImageType.Error;
+ }
+ }
else
{
type = ImageType.File;
@@ -318,7 +335,7 @@ namespace Flow.Launcher.Infrastructure.Image
return img;
}
- private static BitmapImage LoadFullImage(string path)
+ private static ImageSource LoadFullImage(string path)
{
BitmapImage image = new BitmapImage();
image.BeginInit();
@@ -327,24 +344,24 @@ namespace Flow.Launcher.Infrastructure.Image
image.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
image.EndInit();
- if (image.PixelWidth > 320)
+ if (image.PixelWidth > FullImageSize)
{
BitmapImage resizedWidth = new BitmapImage();
resizedWidth.BeginInit();
resizedWidth.CacheOption = BitmapCacheOption.OnLoad;
resizedWidth.UriSource = new Uri(path);
resizedWidth.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
- resizedWidth.DecodePixelWidth = 320;
+ resizedWidth.DecodePixelWidth = FullImageSize;
resizedWidth.EndInit();
- if (resizedWidth.PixelHeight > 320)
+ if (resizedWidth.PixelHeight > FullImageSize)
{
BitmapImage resizedHeight = new BitmapImage();
resizedHeight.BeginInit();
resizedHeight.CacheOption = BitmapCacheOption.OnLoad;
resizedHeight.UriSource = new Uri(path);
resizedHeight.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
- resizedHeight.DecodePixelHeight = 320;
+ resizedHeight.DecodePixelHeight = FullImageSize;
resizedHeight.EndInit();
return resizedHeight;
}
@@ -354,5 +371,44 @@ namespace Flow.Launcher.Infrastructure.Image
return image;
}
+
+ private static ImageSource LoadFullSvgImage(string path, bool loadFullImage = false)
+ {
+ // Set up drawing settings
+ var desiredHeight = loadFullImage ? FullImageSize : SmallIconSize;
+ var drawingSettings = new WpfDrawingSettings
+ {
+ IncludeRuntime = true,
+ // Set IgnoreRootViewbox to false to respect the SVG's viewBox
+ IgnoreRootViewbox = false
+ };
+
+ // Load and render the SVG
+ var converter = new FileSvgReader(drawingSettings);
+ var drawing = converter.Read(path);
+
+ // Calculate scale to achieve desired height
+ var drawingBounds = drawing.Bounds;
+ var scale = desiredHeight / drawingBounds.Height;
+ var scaledWidth = drawingBounds.Width * scale;
+ var scaledHeight = drawingBounds.Height * scale;
+
+ // Convert the Drawing to a Bitmap
+ var drawingVisual = new DrawingVisual();
+ using DrawingContext drawingContext = drawingVisual.RenderOpen();
+ drawingContext.PushTransform(new ScaleTransform(scale, scale));
+ drawingContext.DrawDrawing(drawing);
+
+ // Create a RenderTargetBitmap to hold the rendered image
+ var bitmap = new RenderTargetBitmap(
+ (int)Math.Ceiling(scaledWidth),
+ (int)Math.Ceiling(scaledHeight),
+ 96, // DpiX
+ 96, // DpiY
+ PixelFormats.Pbgra32);
+ bitmap.Render(drawingVisual);
+
+ return bitmap;
+ }
}
}
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 6f17f57f5..f37496fd1 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -438,7 +438,9 @@ namespace Flow.Launcher.Plugin
Task SaveCacheBinaryStorageAsync(string cacheName, string cacheDirectory) where T : new();
///
- /// Load image from path. Support local, remote and data:image url.
+ /// Load image from path.
+ /// Support local, remote and data:image url.
+ /// Support png, jpg, jpeg, gif, bmp, tiff, ico, svg image files.
/// If image path is missing, it will return a missing icon.
///
/// The path of the image.
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
index d2f973329..113476703 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
@@ -159,16 +159,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
if (!File.Exists(faviconPath))
{
- // SVG 파일인지 확인
- if (IsSvgData(imageData))
- {
- bookmark.FaviconPath = defaultIconPath;
- continue;
- }
- else
- {
- SaveBitmapData(imageData, faviconPath);
- }
+ SaveBitmapData(imageData, faviconPath);
}
bookmark.FaviconPath = faviconPath;
@@ -199,15 +190,6 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
}
- private static bool IsSvgData(byte[] data)
- {
- if (data.Length < 5)
- return false;
- string start = System.Text.Encoding.ASCII.GetString(data, 0, Math.Min(100, data.Length));
- return start.Contains("
internal abstract class JsonRPCPlugin : JsonRPCPluginBase
{
- public const string JsonRPC = "JsonRPC";
+ public new const string JsonRPC = "JsonRPC";
protected abstract Task RequestAsync(JsonRPCRequestModel rpcRequest, CancellationToken token = default);
protected abstract string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default);
@@ -29,9 +28,6 @@ namespace Flow.Launcher.Core.Plugin
private int RequestId { get; set; }
- private string SettingConfigurationPath => Path.Combine(Context.CurrentPluginMetadata.PluginDirectory, "SettingsTemplate.yaml");
- private string SettingPath => Path.Combine(Context.CurrentPluginMetadata.PluginSettingsDirectoryPath, "Settings.json");
-
public override List LoadContextMenus(Result selectedResult)
{
var request = new JsonRPCRequestModel(RequestId++,
@@ -57,13 +53,6 @@ namespace Flow.Launcher.Core.Plugin
}
};
- private static readonly JsonSerializerOptions settingSerializeOption = new()
- {
- WriteIndented = true
- };
-
- private readonly Dictionary _settingControls = new();
-
private async Task> DeserializedResultAsync(Stream output)
{
await using (output)
@@ -122,7 +111,6 @@ namespace Flow.Launcher.Core.Plugin
return !result.JsonRPCAction.DontHideAfterAction;
}
-
///
/// Execute external program and return the output
///
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
index 779dcf887..b134e2d50 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
@@ -1,11 +1,11 @@
-using Flow.Launcher.Core.Resource;
-using System;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
+using Flow.Launcher.Core.Resource;
using Flow.Launcher.Plugin;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
index abe563c14..d240ac9be 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
@@ -10,7 +10,6 @@ using Microsoft.VisualStudio.Threading;
using StreamJsonRpc;
using IAsyncDisposable = System.IAsyncDisposable;
-
namespace Flow.Launcher.Core.Plugin
{
internal abstract class JsonRPCPluginV2 : JsonRPCPluginBase, IAsyncDisposable, IAsyncReloadable, IResultUpdated
@@ -23,7 +22,6 @@ namespace Flow.Launcher.Core.Plugin
private JsonRpc RPC { get; set; }
-
protected override async Task ExecuteResultAsync(JsonRPCResult result)
{
var res = await RPC.InvokeAsync(result.JsonRPCAction.Method,
@@ -55,7 +53,6 @@ namespace Flow.Launcher.Core.Plugin
return results;
}
-
public override async Task InitAsync(PluginInitContext context)
{
await base.InitAsync(context);
@@ -88,7 +85,6 @@ namespace Flow.Launcher.Core.Plugin
protected abstract MessageHandlerType MessageHandler { get; }
-
private void SetupJsonRPC()
{
var formatter = new SystemTextJsonFormatter { JsonSerializerOptions = RequestSerializeOption };
@@ -118,9 +114,16 @@ namespace Flow.Launcher.Core.Plugin
{
await RPC.InvokeAsync("reload_data", Context);
}
- catch (RemoteMethodNotFoundException e)
+ catch (RemoteMethodNotFoundException)
{
}
+ catch (ConnectionLostException)
+ {
+ }
+ catch (Exception e)
+ {
+ Context.API.LogException(nameof(JsonRPCPluginV2), "Failed to call reload_data", e);
+ }
}
public virtual async ValueTask DisposeAsync()
@@ -129,9 +132,16 @@ namespace Flow.Launcher.Core.Plugin
{
await RPC.InvokeAsync("close");
}
- catch (RemoteMethodNotFoundException e)
+ catch (RemoteMethodNotFoundException)
{
}
+ catch (ConnectionLostException)
+ {
+ }
+ catch (Exception e)
+ {
+ Context.API.LogException(nameof(JsonRPCPluginV2), "Failed to call close", e);
+ }
finally
{
RPC?.Dispose();
From 8730a5fce8079a955a98533307c8c91383ce1f95 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 18:10:44 +0800
Subject: [PATCH 0674/1442] Improve log message
---
Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
index d240ac9be..eda016d94 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
@@ -122,7 +122,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Context.API.LogException(nameof(JsonRPCPluginV2), "Failed to call reload_data", e);
+ Context.API.LogException(nameof(JsonRPCPluginV2), $"Failed to call reload_data for plugin {Context.CurrentPluginMetadata.Name}", e);
}
}
@@ -140,7 +140,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Context.API.LogException(nameof(JsonRPCPluginV2), "Failed to call close", e);
+ Context.API.LogException(nameof(JsonRPCPluginV2), $"Failed to call close for plugin {Context.CurrentPluginMetadata.Name}", e);
}
finally
{
From 4095eb4b86cccca1d9be969c0cac59e52b48dd64 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 19:26:52 +0800
Subject: [PATCH 0675/1442] Improve code quality
---
Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 17 +++++++++--------
Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs | 7 ++-----
Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs | 6 ++++--
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs
index 9f64e418c..b19bb6c79 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs
@@ -7,7 +7,6 @@ using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin;
using Microsoft.IO;
@@ -21,6 +20,8 @@ namespace Flow.Launcher.Core.Plugin
{
public new const string JsonRPC = "JsonRPC";
+ private static readonly string ClassName = nameof(JsonRPCPlugin);
+
protected abstract Task RequestAsync(JsonRPCRequestModel rpcRequest, CancellationToken token = default);
protected abstract string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default);
@@ -148,11 +149,11 @@ namespace Flow.Launcher.Core.Plugin
var error = standardError.ReadToEnd();
if (!string.IsNullOrEmpty(error))
{
- Log.Error($"|JsonRPCPlugin.Execute|{error}");
+ Context.API.LogError(ClassName, error);
return string.Empty;
}
- Log.Error("|JsonRPCPlugin.Execute|Empty standard output and standard error.");
+ Context.API.LogError(ClassName, "Empty standard output and standard error.");
return string.Empty;
}
@@ -160,8 +161,8 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception(
- $"|JsonRPCPlugin.Execute|Exception for filename <{startInfo.FileName}> with argument <{startInfo.Arguments}>",
+ Context.API.LogException(ClassName,
+ $"Exception for filename <{startInfo.FileName}> with argument <{startInfo.Arguments}>",
e);
return string.Empty;
}
@@ -172,7 +173,7 @@ namespace Flow.Launcher.Core.Plugin
using var process = Process.Start(startInfo);
if (process == null)
{
- Log.Error("|JsonRPCPlugin.ExecuteAsync|Can't start new process");
+ Context.API.LogError(ClassName, "Can't start new process");
return Stream.Null;
}
@@ -192,7 +193,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception("|JsonRPCPlugin.ExecuteAsync|Exception when kill process", e);
+ Context.API.LogException(ClassName, "Exception when kill process", e);
}
});
@@ -213,7 +214,7 @@ namespace Flow.Launcher.Core.Plugin
{
case (0, 0):
const string errorMessage = "Empty JSON-RPC Response.";
- Log.Warn($"|{nameof(JsonRPCPlugin)}.{nameof(ExecuteAsync)}|{errorMessage}");
+ Context.API.LogWarn(ClassName, errorMessage);
break;
case (_, not 0):
throw new InvalidDataException(Encoding.UTF8.GetString(errorBuffer.ToArray())); // The process has exited with an error message
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
index b134e2d50..df0438409 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs
@@ -19,10 +19,9 @@ namespace Flow.Launcher.Core.Plugin
///
public abstract class JsonRPCPluginBase : IAsyncPlugin, IContextMenu, ISettingProvider, ISavable
{
- protected PluginInitContext Context;
public const string JsonRPC = "JsonRPC";
- private int RequestId { get; set; }
+ protected PluginInitContext Context;
private string SettingConfigurationPath =>
Path.Combine(Context.CurrentPluginMetadata.PluginDirectory, "SettingsTemplate.yaml");
@@ -107,7 +106,6 @@ namespace Flow.Launcher.Core.Plugin
public abstract Task> QueryAsync(Query query, CancellationToken token);
-
private async Task InitSettingAsync()
{
JsonRpcConfigurationModel configuration = null;
@@ -119,7 +117,6 @@ namespace Flow.Launcher.Core.Plugin
await File.ReadAllTextAsync(SettingConfigurationPath));
}
-
Settings ??= new JsonRPCPluginSettings
{
Configuration = configuration, SettingPath = SettingPath, API = Context.API
@@ -130,7 +127,7 @@ namespace Flow.Launcher.Core.Plugin
public virtual async Task InitAsync(PluginInitContext context)
{
- this.Context = context;
+ Context = context;
await InitSettingAsync();
}
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
index eda016d94..6dccfa59b 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
@@ -16,6 +16,8 @@ namespace Flow.Launcher.Core.Plugin
{
public const string JsonRpc = "JsonRPC";
+ private static readonly string ClassName = nameof(JsonRPCPluginV2);
+
protected abstract IDuplexPipe ClientPipe { get; set; }
protected StreamReader ErrorStream { get; set; }
@@ -122,7 +124,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Context.API.LogException(nameof(JsonRPCPluginV2), $"Failed to call reload_data for plugin {Context.CurrentPluginMetadata.Name}", e);
+ Context.API.LogException(ClassName, $"Failed to call reload_data for plugin {Context.CurrentPluginMetadata.Name}", e);
}
}
@@ -140,7 +142,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Context.API.LogException(nameof(JsonRPCPluginV2), $"Failed to call close for plugin {Context.CurrentPluginMetadata.Name}", e);
+ Context.API.LogException(ClassName, $"Failed to call close for plugin {Context.CurrentPluginMetadata.Name}", e);
}
finally
{
From 5a2db37d39fcd1c614e06e7d54a938bc37a9d3b3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 19:43:22 +0800
Subject: [PATCH 0676/1442] Add code comments
---
Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
index 6dccfa59b..148fd969e 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs
@@ -118,9 +118,11 @@ namespace Flow.Launcher.Core.Plugin
}
catch (RemoteMethodNotFoundException)
{
+ // Ignored
}
catch (ConnectionLostException)
{
+ // Ignored
}
catch (Exception e)
{
@@ -136,9 +138,11 @@ namespace Flow.Launcher.Core.Plugin
}
catch (RemoteMethodNotFoundException)
{
+ // Ignored
}
catch (ConnectionLostException)
{
+ // Ignored
}
catch (Exception e)
{
From 1f458d3b564a37944a7a10183fc9be5696cf2e95 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 20:06:17 +0800
Subject: [PATCH 0677/1442] Fix typos & Code quality
---
.../TranslationMapping.cs | 40 ++++++++++---------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/TranslationMapping.cs b/Flow.Launcher.Infrastructure/TranslationMapping.cs
index c976fc522..b33a094db 100644
--- a/Flow.Launcher.Infrastructure/TranslationMapping.cs
+++ b/Flow.Launcher.Infrastructure/TranslationMapping.cs
@@ -8,8 +8,9 @@ namespace Flow.Launcher.Infrastructure
{
private bool constructed;
- private List originalIndexs = new List();
- private List translatedIndexs = new List();
+ private readonly List originalIndexes = new();
+ private readonly List translatedIndexes = new();
+
private int translatedLength = 0;
public void AddNewIndex(int originalIndex, int translatedIndex, int length)
@@ -17,46 +18,47 @@ namespace Flow.Launcher.Infrastructure
if (constructed)
throw new InvalidOperationException("Mapping shouldn't be changed after constructed");
- originalIndexs.Add(originalIndex);
- translatedIndexs.Add(translatedIndex);
- translatedIndexs.Add(translatedIndex + length);
+ originalIndexes.Add(originalIndex);
+ translatedIndexes.Add(translatedIndex);
+ translatedIndexes.Add(translatedIndex + length);
translatedLength += length - 1;
}
public int MapToOriginalIndex(int translatedIndex)
{
- if (translatedIndex > translatedIndexs.Last())
+ if (translatedIndex > translatedIndexes.Last())
return translatedIndex - translatedLength - 1;
int lowerBound = 0;
- int upperBound = originalIndexs.Count - 1;
+ int upperBound = originalIndexes.Count - 1;
int count = 0;
// Corner case handle
- if (translatedIndex < translatedIndexs[0])
+ if (translatedIndex < translatedIndexes[0])
return translatedIndex;
- if (translatedIndex > translatedIndexs.Last())
+
+ if (translatedIndex > translatedIndexes.Last())
{
int indexDef = 0;
- for (int k = 0; k < originalIndexs.Count; k++)
+ for (int k = 0; k < originalIndexes.Count; k++)
{
- indexDef += translatedIndexs[k * 2 + 1] - translatedIndexs[k * 2];
+ indexDef += translatedIndexes[k * 2 + 1] - translatedIndexes[k * 2];
}
return translatedIndex - indexDef - 1;
}
// Binary Search with Range
- for (int i = originalIndexs.Count / 2;; count++)
+ for (int i = originalIndexes.Count / 2;; count++)
{
- if (translatedIndex < translatedIndexs[i * 2])
+ if (translatedIndex < translatedIndexes[i * 2])
{
// move to lower middle
upperBound = i;
i = (i + lowerBound) / 2;
}
- else if (translatedIndex > translatedIndexs[i * 2 + 1] - 1)
+ else if (translatedIndex > translatedIndexes[i * 2 + 1] - 1)
{
lowerBound = i;
// move to upper middle
@@ -64,17 +66,19 @@ namespace Flow.Launcher.Infrastructure
i = (i + upperBound + 1) / 2;
}
else
- return originalIndexs[i];
+ {
+ return originalIndexes[i];
+ }
if (upperBound - lowerBound <= 1 &&
- translatedIndex > translatedIndexs[lowerBound * 2 + 1] &&
- translatedIndex < translatedIndexs[upperBound * 2])
+ translatedIndex > translatedIndexes[lowerBound * 2 + 1] &&
+ translatedIndex < translatedIndexes[upperBound * 2])
{
int indexDef = 0;
for (int j = 0; j < upperBound; j++)
{
- indexDef += translatedIndexs[j * 2 + 1] - translatedIndexs[j * 2];
+ indexDef += translatedIndexes[j * 2 + 1] - translatedIndexes[j * 2];
}
return translatedIndex - indexDef - 1;
From 4400734963a6eabc5e13fdc031ed57619755e784 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:12:09 +0800
Subject: [PATCH 0678/1442] Remove InternationalizationManager.Instance
---
.../Resource/InternationalizationManager.cs | 12 ---------
Flow.Launcher/ActionKeywords.xaml.cs | 27 ++++++++-----------
Flow.Launcher/Converters/TextConverter.cs | 3 +--
.../CustomQueryHotkeySetting.xaml.cs | 8 +++---
Flow.Launcher/CustomShortcutSetting.xaml.cs | 10 +++----
Flow.Launcher/Helper/HotKeyMapper.cs | 13 +++++----
Flow.Launcher/HotkeyControl.xaml.cs | 13 +++------
Flow.Launcher/HotkeyControlDialog.xaml.cs | 13 +++++----
.../Resources/Pages/WelcomePage1.xaml.cs | 9 ++++---
.../SettingsPaneGeneralViewModel.cs | 27 +++++++++----------
.../ViewModels/SettingsPaneHotkeyViewModel.cs | 17 ++++++------
.../ViewModels/SettingsPaneProxyViewModel.cs | 3 +--
.../Views/SettingsPaneGeneral.xaml.cs | 4 ++-
13 files changed, 65 insertions(+), 94 deletions(-)
delete mode 100644 Flow.Launcher.Core/Resource/InternationalizationManager.cs
diff --git a/Flow.Launcher.Core/Resource/InternationalizationManager.cs b/Flow.Launcher.Core/Resource/InternationalizationManager.cs
deleted file mode 100644
index 5d718466c..000000000
--- a/Flow.Launcher.Core/Resource/InternationalizationManager.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using CommunityToolkit.Mvvm.DependencyInjection;
-
-namespace Flow.Launcher.Core.Resource
-{
- [Obsolete("InternationalizationManager.Instance is obsolete. Use Ioc.Default.GetRequiredService() instead.")]
- public static class InternationalizationManager
- {
- public static Internationalization Instance
- => Ioc.Default.GetRequiredService();
- }
-}
diff --git a/Flow.Launcher/ActionKeywords.xaml.cs b/Flow.Launcher/ActionKeywords.xaml.cs
index d403d4847..ad24f2a76 100644
--- a/Flow.Launcher/ActionKeywords.xaml.cs
+++ b/Flow.Launcher/ActionKeywords.xaml.cs
@@ -1,8 +1,6 @@
using System.Windows;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
-using Flow.Launcher.Core;
using System.Linq;
using System.Collections.Generic;
@@ -10,20 +8,19 @@ namespace Flow.Launcher
{
public partial class ActionKeywords
{
- private readonly PluginPair plugin;
- private readonly Internationalization translater = InternationalizationManager.Instance;
- private readonly PluginViewModel pluginViewModel;
+ private readonly PluginPair _plugin;
+ private readonly PluginViewModel _pluginViewModel;
public ActionKeywords(PluginViewModel pluginViewModel)
{
InitializeComponent();
- plugin = pluginViewModel.PluginPair;
- this.pluginViewModel = pluginViewModel;
+ _plugin = pluginViewModel.PluginPair;
+ _pluginViewModel = pluginViewModel;
}
private void ActionKeyword_OnLoaded(object sender, RoutedEventArgs e)
{
- tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeparator, plugin.Metadata.ActionKeywords.ToArray());
+ tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeparator, _plugin.Metadata.ActionKeywords.ToArray());
tbAction.Focus();
}
@@ -34,7 +31,7 @@ namespace Flow.Launcher
private void btnDone_OnClick(object sender, RoutedEventArgs _)
{
- var oldActionKeywords = plugin.Metadata.ActionKeywords;
+ var oldActionKeywords = _plugin.Metadata.ActionKeywords;
var newActionKeywords = tbAction.Text.Split(Query.ActionKeywordSeparator).ToList();
newActionKeywords.RemoveAll(string.IsNullOrEmpty);
@@ -48,7 +45,7 @@ namespace Flow.Launcher
{
if (oldActionKeywords.Count != newActionKeywords.Count)
{
- ReplaceActionKeyword(plugin.Metadata.ID, removedActionKeywords, addedActionKeywords);
+ ReplaceActionKeyword(_plugin.Metadata.ID, removedActionKeywords, addedActionKeywords);
return;
}
@@ -58,18 +55,16 @@ namespace Flow.Launcher
if (sortedOldActionKeywords.SequenceEqual(sortedNewActionKeywords))
{
// User just changes the sequence of action keywords
- var msg = translater.GetTranslation("newActionKeywordsSameAsOld");
- MessageBoxEx.Show(msg);
+ App.API.ShowMsgBox(App.API.GetTranslation("newActionKeywordsSameAsOld"));
}
else
{
- ReplaceActionKeyword(plugin.Metadata.ID, removedActionKeywords, addedActionKeywords);
+ ReplaceActionKeyword(_plugin.Metadata.ID, removedActionKeywords, addedActionKeywords);
}
}
else
{
- string msg = translater.GetTranslation("newActionKeywordsHasBeenAssigned");
- App.API.ShowMsgBox(msg);
+ App.API.ShowMsgBox(App.API.GetTranslation("newActionKeywordsHasBeenAssigned"));
}
}
@@ -85,7 +80,7 @@ namespace Flow.Launcher
}
// Update action keywords text and close window
- pluginViewModel.OnActionKeywordsChanged();
+ _pluginViewModel.OnActionKeywordsChanged();
Close();
}
}
diff --git a/Flow.Launcher/Converters/TextConverter.cs b/Flow.Launcher/Converters/TextConverter.cs
index 5f0e1ea82..2c4dad4a9 100644
--- a/Flow.Launcher/Converters/TextConverter.cs
+++ b/Flow.Launcher/Converters/TextConverter.cs
@@ -1,7 +1,6 @@
using System;
using System.Globalization;
using System.Windows.Data;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Converters;
@@ -23,7 +22,7 @@ public class TextConverter : IValueConverter
if (translationKey is null)
return id;
- return InternationalizationManager.Instance.GetTranslation(translationKey);
+ return App.API.GetTranslation(translationKey);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new InvalidOperationException();
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
index 53fa173a5..8b193fa1d 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -1,5 +1,4 @@
-using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Helper;
+using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.UserSettings;
using System.Collections.ObjectModel;
using System.Linq;
@@ -53,14 +52,13 @@ namespace Flow.Launcher
Close();
}
-
public void UpdateItem(CustomPluginHotkey item)
{
updateCustomHotkey = _settings.CustomPluginHotkeys.FirstOrDefault(o =>
o.ActionKeyword == item.ActionKeyword && o.Hotkey == item.Hotkey);
if (updateCustomHotkey == null)
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("invalidPluginHotkey"));
+ App.API.ShowMsgBox(App.API.GetTranslation("invalidPluginHotkey"));
Close();
return;
}
@@ -68,7 +66,7 @@ namespace Flow.Launcher
tbAction.Text = updateCustomHotkey.ActionKeyword;
HotkeyControl.SetHotkey(updateCustomHotkey.Hotkey, false);
update = true;
- lblAdd.Text = InternationalizationManager.Instance.GetTranslation("update");
+ lblAdd.Text = App.API.GetTranslation("update");
}
private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index 416f8e049..ecbdea606 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -1,9 +1,7 @@
-using Flow.Launcher.Core.Resource;
-using System;
+using System;
using System.Windows;
using System.Windows.Input;
using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.Core;
namespace Flow.Launcher
{
@@ -41,15 +39,15 @@ namespace Flow.Launcher
private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
{
- if (String.IsNullOrEmpty(Key) || String.IsNullOrEmpty(Value))
+ if (string.IsNullOrEmpty(Key) || string.IsNullOrEmpty(Value))
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("emptyShortcut"));
+ App.API.ShowMsgBox(App.API.GetTranslation("emptyShortcut"));
return;
}
// Check if key is modified or adding a new one
if (((update && originalKey != Key) || !update) && _hotkeyVm.DoesShortcutExist(Key))
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("duplicateShortcut"));
+ App.API.ShowMsgBox(App.API.GetTranslation("duplicateShortcut"));
return;
}
DialogResult = !update || originalKey != Key || originalValue != Value;
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index 7b2fdfcf4..de5f5295b 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -3,7 +3,6 @@ using Flow.Launcher.Infrastructure.UserSettings;
using System;
using NHotkey;
using NHotkey.Wpf;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.ViewModel;
using ChefKeys;
using Flow.Launcher.Infrastructure.Logger;
@@ -56,8 +55,8 @@ internal static class HotKeyMapper
string.Format("|HotkeyMapper.SetWithChefKeys|Error registering hotkey: {0} \nStackTrace:{1}",
e.Message,
e.StackTrace));
- string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"), hotkeyStr);
- string errorMsgTitle = InternationalizationManager.Instance.GetTranslation("MessageBoxTitle");
+ string errorMsg = string.Format(App.API.GetTranslation("registerHotkeyFailed"), hotkeyStr);
+ string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
MessageBoxEx.Show(errorMsg, errorMsgTitle);
}
}
@@ -82,8 +81,8 @@ internal static class HotKeyMapper
e.Message,
e.StackTrace,
hotkeyStr));
- string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"), hotkeyStr);
- string errorMsgTitle = InternationalizationManager.Instance.GetTranslation("MessageBoxTitle");
+ string errorMsg = string.Format(App.API.GetTranslation("registerHotkeyFailed"), hotkeyStr);
+ string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
App.API.ShowMsgBox(errorMsg, errorMsgTitle);
}
}
@@ -107,8 +106,8 @@ internal static class HotKeyMapper
string.Format("|HotkeyMapper.RemoveHotkey|Error removing hotkey: {0} \nStackTrace:{1}",
e.Message,
e.StackTrace));
- string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("unregisterHotkeyFailed"), hotkeyStr);
- string errorMsgTitle = InternationalizationManager.Instance.GetTranslation("MessageBoxTitle");
+ string errorMsg = string.Format(App.API.GetTranslation("unregisterHotkeyFailed"), hotkeyStr);
+ string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
MessageBoxEx.Show(errorMsg, errorMsgTitle);
}
}
diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs
index 678280bba..8762a934b 100644
--- a/Flow.Launcher/HotkeyControl.xaml.cs
+++ b/Flow.Launcher/HotkeyControl.xaml.cs
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -65,7 +64,6 @@ namespace Flow.Launcher
hotkeyControl.RefreshHotkeyInterface(hotkeyControl.Hotkey);
}
-
public static readonly DependencyProperty ChangeHotkeyProperty = DependencyProperty.Register(
nameof(ChangeHotkey),
typeof(ICommand),
@@ -79,7 +77,6 @@ namespace Flow.Launcher
set { SetValue(ChangeHotkeyProperty, value); }
}
-
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
nameof(Type),
typeof(HotkeyType),
@@ -227,19 +224,18 @@ namespace Flow.Launcher
private static bool CheckHotkeyAvailability(HotkeyModel hotkey, bool validateKeyGesture) =>
hotkey.Validate(validateKeyGesture) && HotKeyMapper.CheckAvailability(hotkey);
- public string EmptyHotkey => InternationalizationManager.Instance.GetTranslation("none");
+ public string EmptyHotkey => App.API.GetTranslation("none");
public ObservableCollection KeysToDisplay { get; set; } = new();
public HotkeyModel CurrentHotkey { get; private set; } = new(false, false, false, false, Key.None);
-
public void GetNewHotkey(object sender, RoutedEventArgs e)
{
- OpenHotkeyDialog();
+ _ = OpenHotkeyDialogAsync();
}
- private async Task OpenHotkeyDialog()
+ private async Task OpenHotkeyDialogAsync()
{
if (!string.IsNullOrEmpty(Hotkey))
{
@@ -262,12 +258,11 @@ namespace Flow.Launcher
}
}
-
private void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
{
if (triggerValidate)
{
- bool hotkeyAvailable = false;
+ bool hotkeyAvailable;
// TODO: This is a temporary way to enforce changing only the open flow hotkey to Win, and will be removed by PR #3157
if (keyModel.ToString() == "LWin" || keyModel.ToString() == "RWin")
{
diff --git a/Flow.Launcher/HotkeyControlDialog.xaml.cs b/Flow.Launcher/HotkeyControlDialog.xaml.cs
index 2f8c5eb26..c7af8c5b8 100644
--- a/Flow.Launcher/HotkeyControlDialog.xaml.cs
+++ b/Flow.Launcher/HotkeyControlDialog.xaml.cs
@@ -5,7 +5,6 @@ using System.Windows;
using System.Windows.Input;
using ChefKeys;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -34,7 +33,7 @@ public partial class HotkeyControlDialog : ContentDialog
public EResultType ResultType { get; private set; } = EResultType.Cancel;
public string ResultValue { get; private set; } = string.Empty;
- public static string EmptyHotkey => InternationalizationManager.Instance.GetTranslation("none");
+ public static string EmptyHotkey => App.API.GetTranslation("none");
private static bool isOpenFlowHotkey;
@@ -42,7 +41,7 @@ public partial class HotkeyControlDialog : ContentDialog
{
WindowTitle = windowTitle switch
{
- "" or null => InternationalizationManager.Instance.GetTranslation("hotkeyRegTitle"),
+ "" or null => App.API.GetTranslation("hotkeyRegTitle"),
_ => windowTitle
};
DefaultHotkey = defaultHotkey;
@@ -141,14 +140,14 @@ public partial class HotkeyControlDialog : ContentDialog
if (_hotkeySettings.RegisteredHotkeys.FirstOrDefault(v => v.Hotkey == hotkey) is { } registeredHotkeyData)
{
var description = string.Format(
- InternationalizationManager.Instance.GetTranslation(registeredHotkeyData.DescriptionResourceKey),
+ App.API.GetTranslation(registeredHotkeyData.DescriptionResourceKey),
registeredHotkeyData.DescriptionFormatVariables
);
Alert.Visibility = Visibility.Visible;
if (registeredHotkeyData.RemoveHotkey is not null)
{
tbMsg.Text = string.Format(
- InternationalizationManager.Instance.GetTranslation("hotkeyUnavailableEditable"),
+ App.API.GetTranslation("hotkeyUnavailableEditable"),
description
);
SaveBtn.IsEnabled = false;
@@ -160,7 +159,7 @@ public partial class HotkeyControlDialog : ContentDialog
else
{
tbMsg.Text = string.Format(
- InternationalizationManager.Instance.GetTranslation("hotkeyUnavailableUneditable"),
+ App.API.GetTranslation("hotkeyUnavailableUneditable"),
description
);
SaveBtn.IsEnabled = false;
@@ -176,7 +175,7 @@ public partial class HotkeyControlDialog : ContentDialog
if (!CheckHotkeyAvailability(hotkey.Value, true))
{
- tbMsg.Text = InternationalizationManager.Instance.GetTranslation("hotkeyUnavailable");
+ tbMsg.Text = App.API.GetTranslation("hotkeyUnavailable");
Alert.Visibility = Visibility.Visible;
SaveBtn.IsEnabled = false;
SaveBtn.Visibility = Visibility.Visible;
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
index 880bfd9bc..64f52edff 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
@@ -17,7 +17,9 @@ namespace Flow.Launcher.Resources.Pages
Ioc.Default.GetRequiredService().PageNum = 1;
InitializeComponent();
}
- private Internationalization _translater => InternationalizationManager.Instance;
+
+ private readonly Internationalization _translater = Ioc.Default.GetRequiredService();
+
public List Languages => _translater.LoadAvailableLanguages();
public Settings Settings { get; set; }
@@ -30,12 +32,11 @@ namespace Flow.Launcher.Resources.Pages
}
set
{
- InternationalizationManager.Instance.ChangeLanguage(value);
+ _translater.ChangeLanguage(value);
- if (InternationalizationManager.Instance.PromptShouldUsePinyin(value))
+ if (_translater.PromptShouldUsePinyin(value))
Settings.ShouldUsePinyin = true;
}
}
-
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 35dbab647..57eb796d3 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Windows.Forms;
-using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
@@ -19,12 +17,14 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public Settings Settings { get; }
private readonly Updater _updater;
private readonly IPortable _portable;
+ private readonly Internationalization _translater;
- public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable)
+ public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable, Internationalization translater)
{
Settings = settings;
_updater = updater;
_portable = portable;
+ _translater = translater;
UpdateEnumDropdownLocalizations();
}
@@ -32,7 +32,6 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public class SearchWindowAlignData : DropdownDataGeneric { }
public class SearchPrecisionData : DropdownDataGeneric { }
public class LastQueryModeData : DropdownDataGeneric { }
-
public bool StartFlowLauncherOnSystemStartup
{
@@ -61,7 +60,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
- Notification.Show(InternationalizationManager.Instance.GetTranslation("setAutoStartFailed"),
+ Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
e.Message);
}
}
@@ -89,7 +88,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
- Notification.Show(InternationalizationManager.Instance.GetTranslation("setAutoStartFailed"),
+ Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
e.Message);
}
}
@@ -121,7 +120,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
// This is only required to set at startup. When portable mode enabled/disabled a restart is always required
- private bool _portableMode = DataLocation.PortableDataLocationInUse();
+ private static bool _portableMode = DataLocation.PortableDataLocationInUse();
public bool PortableMode
{
@@ -173,9 +172,9 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
get => Settings.Language;
set
{
- InternationalizationManager.Instance.ChangeLanguage(value);
+ _translater.ChangeLanguage(value);
- if (InternationalizationManager.Instance.PromptShouldUsePinyin(value))
+ if (_translater.PromptShouldUsePinyin(value))
ShouldUsePinyin = true;
UpdateEnumDropdownLocalizations();
@@ -188,14 +187,14 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
set => Settings.ShouldUsePinyin = value;
}
- public List Languages => InternationalizationManager.Instance.LoadAvailableLanguages();
+ public List Languages => _translater.LoadAvailableLanguages();
public string AlwaysPreviewToolTip => string.Format(
- InternationalizationManager.Instance.GetTranslation("AlwaysPreviewToolTip"),
+ App.API.GetTranslation("AlwaysPreviewToolTip"),
Settings.PreviewHotkey
);
- private string GetFileFromDialog(string title, string filter = "")
+ private static string GetFileFromDialog(string title, string filter = "")
{
var dlg = new OpenFileDialog
{
@@ -237,7 +236,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
private void SelectPython()
{
var selectedFile = GetFileFromDialog(
- InternationalizationManager.Instance.GetTranslation("selectPythonExecutable"),
+ App.API.GetTranslation("selectPythonExecutable"),
"Python|pythonw.exe"
);
@@ -249,7 +248,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
private void SelectNode()
{
var selectedFile = GetFileFromDialog(
- InternationalizationManager.Instance.GetTranslation("selectNodeExecutable"),
+ App.API.GetTranslation("selectNodeExecutable"),
"node|*.exe"
);
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs
index b13aaefe3..7a7c19dd3 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneHotkeyViewModel.cs
@@ -1,7 +1,6 @@
using System.Linq;
using System.Windows;
using CommunityToolkit.Mvvm.Input;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
@@ -41,15 +40,15 @@ public partial class SettingsPaneHotkeyViewModel : BaseModel
var item = SelectedCustomPluginHotkey;
if (item is null)
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
+ App.API.ShowMsgBox(App.API.GetTranslation("pleaseSelectAnItem"));
return;
}
var result = App.API.ShowMsgBox(
string.Format(
- InternationalizationManager.Instance.GetTranslation("deleteCustomHotkeyWarning"), item.Hotkey
+ App.API.GetTranslation("deleteCustomHotkeyWarning"), item.Hotkey
),
- InternationalizationManager.Instance.GetTranslation("delete"),
+ App.API.GetTranslation("delete"),
MessageBoxButton.YesNo
);
@@ -66,7 +65,7 @@ public partial class SettingsPaneHotkeyViewModel : BaseModel
var item = SelectedCustomPluginHotkey;
if (item is null)
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
+ App.API.ShowMsgBox(App.API.GetTranslation("pleaseSelectAnItem"));
return;
}
@@ -87,15 +86,15 @@ public partial class SettingsPaneHotkeyViewModel : BaseModel
var item = SelectedCustomShortcut;
if (item is null)
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
+ App.API.ShowMsgBox(App.API.GetTranslation("pleaseSelectAnItem"));
return;
}
var result = App.API.ShowMsgBox(
string.Format(
- InternationalizationManager.Instance.GetTranslation("deleteCustomShortcutWarning"), item.Key, item.Value
+ App.API.GetTranslation("deleteCustomShortcutWarning"), item.Key, item.Value
),
- InternationalizationManager.Instance.GetTranslation("delete"),
+ App.API.GetTranslation("delete"),
MessageBoxButton.YesNo
);
@@ -111,7 +110,7 @@ public partial class SettingsPaneHotkeyViewModel : BaseModel
var item = SelectedCustomShortcut;
if (item is null)
{
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
+ App.API.ShowMsgBox(App.API.GetTranslation("pleaseSelectAnItem"));
return;
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
index e2f9e516c..38a6ef31e 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
@@ -1,7 +1,6 @@
using System.Net;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
@@ -22,7 +21,7 @@ public partial class SettingsPaneProxyViewModel : BaseModel
private void OnTestProxyClicked()
{
var message = TestProxy();
- App.API.ShowMsgBox(InternationalizationManager.Instance.GetTranslation(message));
+ App.API.ShowMsgBox(App.API.GetTranslation(message));
}
private string TestProxy()
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index dd7fd13a9..569d489d2 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -2,6 +2,7 @@
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
+using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
@@ -18,7 +19,8 @@ public partial class SettingsPaneGeneral
var settings = Ioc.Default.GetRequiredService();
var updater = Ioc.Default.GetRequiredService();
var portable = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneGeneralViewModel(settings, updater, portable);
+ var translater = Ioc.Default.GetRequiredService();
+ _viewModel = new SettingsPaneGeneralViewModel(settings, updater, portable, translater);
DataContext = _viewModel;
InitializeComponent();
}
From 0a8963b74ee05da73afbcd05d9e817925c79477b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:16:33 +0800
Subject: [PATCH 0679/1442] Remove Notification.Show & _mainViewModel.Show();
---
Flow.Launcher/App.xaml.cs | 2 +-
Flow.Launcher/Helper/HotKeyMapper.cs | 2 +-
.../SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs | 6 ++----
Flow.Launcher/ViewModel/MainViewModel.cs | 3 +--
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 90fefe0a6..89faa105e 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -343,7 +343,7 @@ namespace Flow.Launcher
public void OnSecondAppStarted()
{
- Ioc.Default.GetRequiredService().Show();
+ API.ShowMainWindow();
}
#endregion
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index de5f5295b..b7b39ff31 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -136,7 +136,7 @@ internal static class HotKeyMapper
if (_mainViewModel.ShouldIgnoreHotkeys())
return;
- _mainViewModel.Show();
+ App.API.ShowMainWindow();
_mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
});
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 57eb796d3..069a7cb24 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -60,8 +60,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
- Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
- e.Message);
+ App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
}
}
}
@@ -88,8 +87,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
catch (Exception e)
{
- Notification.Show(App.API.GetTranslation("setAutoStartFailed"),
- e.Message);
+ App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
}
}
}
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 66481cad6..4a6c1d639 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -16,7 +16,6 @@ using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
-using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -275,7 +274,7 @@ namespace Flow.Launcher.ViewModel
Hide();
await PluginManager.ReloadDataAsync().ConfigureAwait(false);
- Notification.Show(App.API.GetTranslation("success"),
+ App.API.ShowMsg(App.API.GetTranslation("success"),
App.API.GetTranslation("completedSuccessfully"));
}
From 1bd7f1471ac73e60d2aeb62fbe6b099b381942b9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:19:09 +0800
Subject: [PATCH 0680/1442] Improve GetTranslation usage
---
Flow.Launcher.Core/Updater.cs | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index 20b884b3d..83d4fd9e0 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -9,8 +9,6 @@ using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
-using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core.Resource;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Http;
@@ -131,7 +129,7 @@ namespace Flow.Launcher.Core
await using var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false);
- var releases = await System.Text.Json.JsonSerializer.DeserializeAsync>(jsonStream).ConfigureAwait(false);
+ var releases = await JsonSerializer.DeserializeAsync>(jsonStream).ConfigureAwait(false);
var latest = releases.Where(r => !r.Prerelease).OrderByDescending(r => r.PublishedAt).First();
var latestUrl = latest.HtmlUrl.Replace("/tag/", "/download/");
@@ -146,10 +144,9 @@ namespace Flow.Launcher.Core
return manager;
}
- private static string NewVersionTips(string version)
+ private string NewVersionTips(string version)
{
- var translator = Ioc.Default.GetRequiredService();
- var tips = string.Format(translator.GetTranslation("newVersionTips"), version);
+ var tips = string.Format(_api.GetTranslation("newVersionTips"), version);
return tips;
}
From 509705413729ac658cd5ae70df06349a710a0615 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:20:32 +0800
Subject: [PATCH 0681/1442] Improve log code quality
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 4c85fb061..29d91dc8d 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -205,7 +205,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception(nameof(PluginManager), $"Fail to Init plugin: {pair.Metadata.Name}", e);
+ Log.Exception(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
pair.Metadata.Disabled = true;
failedPlugins.Enqueue(pair);
}
From 9f11c8739aee2ac3362b025f69e858b9e2c20240 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:26:27 +0800
Subject: [PATCH 0682/1442] Remove _mainViewModel.ChangeQueryText
---
Flow.Launcher/Helper/HotKeyMapper.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index b7b39ff31..5e3b30281 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -137,7 +137,7 @@ internal static class HotKeyMapper
return;
App.API.ShowMainWindow();
- _mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
+ App.API.ChangeQuery(hotkey.ActionKeyword, true);
});
}
From f47699829c4200754491b60082330f6f721b5e29 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 9 Apr 2025 21:27:03 +0800
Subject: [PATCH 0683/1442] Remove MessageBoxEx.Show
---
Flow.Launcher/Helper/HotKeyMapper.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index 5e3b30281..0771a6074 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -57,7 +57,7 @@ internal static class HotKeyMapper
e.StackTrace));
string errorMsg = string.Format(App.API.GetTranslation("registerHotkeyFailed"), hotkeyStr);
string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
- MessageBoxEx.Show(errorMsg, errorMsgTitle);
+ App.API.ShowMsgBox(errorMsg, errorMsgTitle);
}
}
@@ -108,7 +108,7 @@ internal static class HotKeyMapper
e.StackTrace));
string errorMsg = string.Format(App.API.GetTranslation("unregisterHotkeyFailed"), hotkeyStr);
string errorMsgTitle = App.API.GetTranslation("MessageBoxTitle");
- MessageBoxEx.Show(errorMsg, errorMsgTitle);
+ App.API.ShowMsgBox(errorMsg, errorMsgTitle);
}
}
From 7fdc2161c43acb1196ea29ea1614934268f7f118 Mon Sep 17 00:00:00 2001
From: DB p
Date: Wed, 9 Apr 2025 23:36:51 +0900
Subject: [PATCH 0684/1442] Fix small things for merging dev
---
Flow.Launcher/Languages/en.xaml | 1 -
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index dc0799f90..1b0400d7b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -130,7 +130,6 @@
OpenUse Legacy Korean IMEYou can change the IME settings directly from here without opening a separate settings window
- Wait time before showing results after typing stops. Higher values wait longer. (ms)Search Plugin
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index ca8d2fd6c..6b0f9d440 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -220,12 +220,12 @@
+ ValidationMode="InvalidInputOverwritten"
+ Value="{Binding SearchDelayTimeValue}" />
@@ -325,7 +325,7 @@
IsIconVisible="True"
Length="Long"
Message="{DynamicResource KoreanImeGuide}"
- Type="Info"
+ Type="Warning"
Visibility="{Binding LegacyKoreanIMEEnabled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=Inverted, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
From 77ffafc582e34898e17167ac80830c6c8181ccb4 Mon Sep 17 00:00:00 2001
From: DB p
Date: Wed, 9 Apr 2025 23:43:36 +0900
Subject: [PATCH 0685/1442] Fix string
---
Flow.Launcher/Languages/en.xaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 1b0400d7b..9315f05c9 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -148,6 +148,10 @@
Change Action KeywordsPlugin seach delay timeChange Plugin Seach Delay Time
+ Advanced Settings:
+ Enabled
+ Priority
+ Search DelayCurrent PriorityNew PriorityPriority
From 3c49d8e7304a352a49b9f96541eab9e8141d7fe9 Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 00:38:35 +0900
Subject: [PATCH 0686/1442] Fix Binding error
---
Flow.Launcher/Resources/Controls/InfoBar.xaml | 36 ++++++++++---------
.../Resources/Controls/InfoBar.xaml.cs | 4 +--
.../SettingsPaneGeneralViewModel.cs | 16 ++++++---
.../Views/SettingsPaneGeneral.xaml | 1 +
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml b/Flow.Launcher/Resources/Controls/InfoBar.xaml
index 1713b3459..f82a32a8b 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml
@@ -2,6 +2,7 @@
x:Class="Flow.Launcher.Resources.Controls.InfoBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -26,21 +27,22 @@
-
-
-
+
+
+
+ Text="{Binding RelativeSource={RelativeSource AncestorType=cc:InfoBar}, Path=Title}" />
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
index f50bc349e..8b82dc3b6 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
@@ -19,9 +19,7 @@ namespace Flow.Launcher.Resources.Controls
UpdateMessageVisibility();
UpdateOrientation();
UpdateIconAlignmentAndMargin();
-
- // DataContext 설정 (예시)
- this.DataContext = this; // InfoBar 자체를 DataContext로 사용
+ //this.DataContext = this;
}
public static readonly DependencyProperty TypeProperty =
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 9590f7283..b98d76000 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -188,15 +188,21 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
UpdateEnumDropdownLocalizations();
}
}
-
- public bool LegacyKoreanIMEEnabled
+ public bool LegacyKoreanIMEEnabled
{
get => IsLegacyKoreanIMEEnabled();
set
{
- SetLegacyKoreanIMEEnabled(value);
- OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
- OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
+ Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled 변경: {value}");
+ if (SetLegacyKoreanIMEEnabled(value))
+ {
+ OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
+ OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
+ }
+ else
+ {
+ Debug.WriteLine("[DEBUG] LegacyKoreanIMEEnabled 설정 실패");
+ }
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 6b0f9d440..16db1c676 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -322,6 +322,7 @@
Title="{DynamicResource KoreanImeTitle}"
Margin="0 12 0 0"
Closable="False"
+ DataContext="{Binding RelativeSource={RelativeSource AncestorType=Border}, Path=DataContext}"
IsIconVisible="True"
Length="Long"
Message="{DynamicResource KoreanImeGuide}"
From d9a353b4522b1471e18d684fe270256626094323 Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 00:52:34 +0900
Subject: [PATCH 0687/1442] - Fix String and adjust messages - Adjust Margin -
Cleanup comment
---
Flow.Launcher/Languages/en.xaml | 11 +-
.../SettingsPaneGeneralViewModel.cs | 175 +++++++++---------
.../Views/SettingsPaneGeneral.xaml | 6 +-
3 files changed, 96 insertions(+), 96 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 9315f05c9..bf430b6f5 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -118,18 +118,17 @@
Very shortInformation for Korean IME user
- You're using the Korean language! The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
- If you experience any problems, you may need to enable compatibility mode for the Korean IME.
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
Open Setting in Windows 11 and go to:
Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
and enable "Use previous version of Microsoft IME".
- You can open the relevant menu using the option below, or change the setting directly without manually opening the settings page.
Open Language and Region System Settings
- Opens the Korean IME setting locationKorean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > CompatibilityOpen
- Use Legacy Korean IME
- You can change the IME settings directly from here without opening a separate settings window
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from hereSearch Plugin
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index b98d76000..701de4361 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -189,128 +189,129 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
public bool LegacyKoreanIMEEnabled
+{
+ get => IsLegacyKoreanIMEEnabled();
+ set
{
- get => IsLegacyKoreanIMEEnabled();
- set
+ Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled changed: {value}");
+ if (SetLegacyKoreanIMEEnabled(value))
{
- Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled 변경: {value}");
- if (SetLegacyKoreanIMEEnabled(value))
- {
- OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
- OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
- }
- else
- {
- Debug.WriteLine("[DEBUG] LegacyKoreanIMEEnabled 설정 실패");
- }
+ OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
+ OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
+ }
+ else
+ {
+ Debug.WriteLine("[DEBUG] Failed to set LegacyKoreanIMEEnabled");
}
}
+}
- public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
+public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
- public bool KoreanIMERegistryValueIsZero
- {
- get
- {
- object value = GetLegacyKoreanIMERegistryValue();
- if (value is int intValue)
- {
- return intValue == 0;
- }
- else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
- {
- return parsedValue == 0;
- }
-
- return false;
- }
- }
-
- bool IsKoreanIMEExist()
- {
- return GetLegacyKoreanIMERegistryValue() != null;
- }
-
- bool IsLegacyKoreanIMEEnabled()
+public bool KoreanIMERegistryValueIsZero
+{
+ get
{
object value = GetLegacyKoreanIMERegistryValue();
-
if (value is int intValue)
{
- return intValue == 1;
+ return intValue == 0;
}
else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
{
- return parsedValue == 1;
+ return parsedValue == 0;
}
return false;
}
+}
- bool SetLegacyKoreanIMEEnabled(bool enable)
+bool IsKoreanIMEExist()
+{
+ return GetLegacyKoreanIMERegistryValue() != null;
+}
+
+bool IsLegacyKoreanIMEEnabled()
+{
+ object value = GetLegacyKoreanIMERegistryValue();
+
+ if (value is int intValue)
{
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
+ return intValue == 1;
+ }
+ else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ {
+ return parsedValue == 1;
+ }
- try
+ return false;
+}
+
+bool SetLegacyKoreanIMEEnabled(bool enable)
+{
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
{
- using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
+ if (key != null)
{
- if (key != null)
- {
- int value = enable ? 1 : 0;
- key.SetValue(valueName, value, RegistryValueKind.DWord);
- return true;
- }
- else
- {
- Debug.WriteLine($"[IME DEBUG] 레지스트리 키 생성 또는 열기 실패: {subKeyPath}");
- }
+ int value = enable ? 1 : 0;
+ key.SetValue(valueName, value, RegistryValueKind.DWord);
+ return true;
+ }
+ else
+ {
+ Debug.WriteLine($"[IME DEBUG] Failed to create or open registry key: {subKeyPath}");
}
}
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] 레지스트리 설정 중 예외 발생: {ex.Message}");
- }
-
- return false;
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"[IME DEBUG] Exception occurred while setting registry: {ex.Message}");
}
- private object GetLegacyKoreanIMERegistryValue()
- {
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
+ return false;
+}
- try
+private object GetLegacyKoreanIMERegistryValue()
+{
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using (RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath))
{
- using (RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath))
+ if (key != null)
{
- if (key != null)
- {
- return key.GetValue(valueName);
- }
+ return key.GetValue(valueName);
}
}
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] 예외 발생: {ex.Message}");
- }
-
- return null;
}
-
- private void OpenImeSettings()
+ catch (Exception ex)
{
- try
- {
- Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
- }
- catch (Exception e)
- {
- Debug.WriteLine($"Error opening IME settings: {e.Message}");
- }
+ Debug.WriteLine($"[IME DEBUG] Exception occurred: {ex.Message}");
}
+ return null;
+}
+
+private void OpenImeSettings()
+{
+ try
+ {
+ Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
+ }
+ catch (Exception e)
+ {
+ Debug.WriteLine($"Error opening IME settings: {e.Message}");
+ }
+}
+
+
public bool ShouldUsePinyin
{
get => Settings.ShouldUsePinyin;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 16db1c676..5304824fe 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -320,7 +320,7 @@
-
+
+ Sub="{DynamicResource KoreanImeOpenLinkToolTip}">
From be0a9b7eadbee301e8441319f67ec714070383dc Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 01:11:36 +0900
Subject: [PATCH 0688/1442] clean up comment
---
Flow.Launcher/Resources/Controls/InfoBar.xaml.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
index 8b82dc3b6..d447192cf 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
@@ -19,7 +19,6 @@ namespace Flow.Launcher.Resources.Controls
UpdateMessageVisibility();
UpdateOrientation();
UpdateIconAlignmentAndMargin();
- //this.DataContext = this;
}
public static readonly DependencyProperty TypeProperty =
@@ -48,7 +47,7 @@ namespace Flow.Launcher.Resources.Controls
set
{
SetValue(MessageProperty, value);
- UpdateMessageVisibility(); // Message 속성 변경 시 Visibility 업데이트
+ UpdateMessageVisibility(); // Visibility update when change Message
}
}
@@ -74,7 +73,7 @@ namespace Flow.Launcher.Resources.Controls
set
{
SetValue(TitleProperty, value);
- UpdateTitleVisibility(); // Title 속성 변경 시 Visibility 업데이트
+ UpdateTitleVisibility(); // Visibility update when change Title
}
}
From 317f241c26feea8c970ce5cc36bf0d4422b46300 Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 01:25:12 +0900
Subject: [PATCH 0689/1442] - Add Comment - Applied changes from CodeRabbit
---
.../Resources/Controls/InfoBar.xaml.cs | 2 +
.../SettingsPaneGeneralViewModel.cs | 187 +++++++++---------
2 files changed, 99 insertions(+), 90 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
index d447192cf..f4e26ea7c 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
@@ -19,6 +19,8 @@ namespace Flow.Launcher.Resources.Controls
UpdateMessageVisibility();
UpdateOrientation();
UpdateIconAlignmentAndMargin();
+ UpdateIconVisibility();
+ UpdateCloseButtonVisibility();
}
public static readonly DependencyProperty TypeProperty =
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 701de4361..432ac998c 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -34,6 +34,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
_portable = portable;
_translater = translater;
UpdateEnumDropdownLocalizations();
+ // Initialize the Korean IME status by checking registry
IsLegacyKoreanIMEEnabled();
OpenImeSettingsCommand = new RelayCommand(OpenImeSettings);
}
@@ -188,129 +189,135 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
UpdateEnumDropdownLocalizations();
}
}
+
+ // The new Korean IME used in Windows 11 has compatibility issues with WPF. This issue is difficult to resolve within
+ // WPF itself, but it can be avoided by having the user switch to the legacy IME at the system level. Therefore,
+ // we provide guidance and a direct button for users to make this change themselves. If the relevant registry key does
+ // not exist (i.e., the Korean IME is not installed), this setting will not be shown at all.
+ #region Korean IME
public bool LegacyKoreanIMEEnabled
-{
- get => IsLegacyKoreanIMEEnabled();
- set
{
- Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled changed: {value}");
- if (SetLegacyKoreanIMEEnabled(value))
+ get => IsLegacyKoreanIMEEnabled();
+ set
{
- OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
- OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
- }
- else
- {
- Debug.WriteLine("[DEBUG] Failed to set LegacyKoreanIMEEnabled");
+ Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled changed: {value}");
+ if (SetLegacyKoreanIMEEnabled(value))
+ {
+ OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
+ OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
+ }
+ else
+ {
+ Debug.WriteLine("[DEBUG] Failed to set LegacyKoreanIMEEnabled");
+ }
}
}
-}
-public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
+ public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
-public bool KoreanIMERegistryValueIsZero
-{
- get
+ public bool KoreanIMERegistryValueIsZero
+ {
+ get
+ {
+ object value = GetLegacyKoreanIMERegistryValue();
+ if (value is int intValue)
+ {
+ return intValue == 0;
+ }
+ else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ {
+ return parsedValue == 0;
+ }
+
+ return false;
+ }
+ }
+
+ bool IsKoreanIMEExist()
+ {
+ return GetLegacyKoreanIMERegistryValue() != null;
+ }
+
+ bool IsLegacyKoreanIMEEnabled()
{
object value = GetLegacyKoreanIMERegistryValue();
+
if (value is int intValue)
{
- return intValue == 0;
+ return intValue == 1;
}
else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
{
- return parsedValue == 0;
+ return parsedValue == 1;
}
return false;
}
-}
-bool IsKoreanIMEExist()
-{
- return GetLegacyKoreanIMERegistryValue() != null;
-}
-
-bool IsLegacyKoreanIMEEnabled()
-{
- object value = GetLegacyKoreanIMERegistryValue();
-
- if (value is int intValue)
+ bool SetLegacyKoreanIMEEnabled(bool enable)
{
- return intValue == 1;
- }
- else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
- {
- return parsedValue == 1;
- }
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
- return false;
-}
-
-bool SetLegacyKoreanIMEEnabled(bool enable)
-{
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
-
- try
- {
- using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
+ try
{
- if (key != null)
+ using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
{
- int value = enable ? 1 : 0;
- key.SetValue(valueName, value, RegistryValueKind.DWord);
- return true;
- }
- else
- {
- Debug.WriteLine($"[IME DEBUG] Failed to create or open registry key: {subKeyPath}");
+ if (key != null)
+ {
+ int value = enable ? 1 : 0;
+ key.SetValue(valueName, value, RegistryValueKind.DWord);
+ return true;
+ }
+ else
+ {
+ Debug.WriteLine($"[IME DEBUG] Failed to create or open registry key: {subKeyPath}");
+ }
}
}
- }
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] Exception occurred while setting registry: {ex.Message}");
- }
-
- return false;
-}
-
-private object GetLegacyKoreanIMERegistryValue()
-{
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
-
- try
- {
- using (RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath))
+ catch (Exception ex)
{
- if (key != null)
+ Debug.WriteLine($"[IME DEBUG] Exception occurred while setting registry: {ex.Message}");
+ }
+
+ return false;
+ }
+
+ private object GetLegacyKoreanIMERegistryValue()
+ {
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using (RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath))
{
- return key.GetValue(valueName);
+ if (key != null)
+ {
+ return key.GetValue(valueName);
+ }
}
}
- }
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] Exception occurred: {ex.Message}");
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"[IME DEBUG] Exception occurred: {ex.Message}");
+ }
+
+ return null;
}
- return null;
-}
-
-private void OpenImeSettings()
-{
- try
+ private void OpenImeSettings()
{
- Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
+ try
+ {
+ Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
+ }
+ catch (Exception e)
+ {
+ Debug.WriteLine($"Error opening IME settings: {e.Message}");
+ }
}
- catch (Exception e)
- {
- Debug.WriteLine($"Error opening IME settings: {e.Message}");
- }
-}
-
+ #endregion
public bool ShouldUsePinyin
{
From 1c1bad087ce11066e315e5ea9efd1de4fcae76cb Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 01:37:06 +0900
Subject: [PATCH 0690/1442] Cleanup Code
---
Flow.Launcher/Resources/Controls/InfoBar.xaml | 2 +-
.../Resources/Controls/InfoBar.xaml.cs | 19 +++++++++----------
.../SettingsPaneGeneralViewModel.cs | 2 --
3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml b/Flow.Launcher/Resources/Controls/InfoBar.xaml
index f82a32a8b..3c6780690 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml
@@ -28,7 +28,7 @@
Date: Thu, 10 Apr 2025 01:42:35 +0900
Subject: [PATCH 0691/1442] Remove namespace Add Default Case
---
Flow.Launcher/Resources/Controls/InfoBar.xaml | 3 ++-
Flow.Launcher/Resources/Controls/InfoBar.xaml.cs | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml b/Flow.Launcher/Resources/Controls/InfoBar.xaml
index 3c6780690..2ddcbdd0c 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml
@@ -3,7 +3,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
- xmlns:converters="clr-namespace:Flow.Launcher.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.modernwpf.com/2019"
@@ -69,10 +68,12 @@
Width="32"
Height="32"
VerticalAlignment="Center"
+ AutomationProperties.Name="Close InfoBar"
Click="PART_CloseButton_Click"
Content=""
FontFamily="Segoe MDL2 Assets"
FontSize="12"
+ ToolTip="Close"
Visibility="Visible" />
diff --git a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
index 77470dbc2..ebf763e22 100644
--- a/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/InfoBar.xaml.cs
@@ -175,6 +175,11 @@ namespace Flow.Launcher.Resources.Controls
PART_IconBorder.Background = (Brush)FindResource("InfoBarErrorIcon");
PART_Icon.Glyph = "\xF13D";
break;
+ default:
+ PART_Border.Background = (Brush)FindResource("InfoBarInfoBG");
+ PART_IconBorder.Background = (Brush)FindResource("InfoBarInfoIcon");
+ PART_Icon.Glyph = "\xF13F";
+ break;
}
}
From ebff80caea3dd3d7e0cf05ee95ef6b3515b6aa23 Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 01:46:29 +0900
Subject: [PATCH 0692/1442] Add Error Message
---
.../SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 3a20f81d5..33a7428db 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -206,7 +206,8 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
else
{
- Debug.WriteLine("[DEBUG] Failed to set LegacyKoreanIMEEnabled");
+ //Since this is rarely seen text, language support is not provided.
+ App.API.ShowMsg("Failed to change Korean IME setting", "Please check your system registry access or contact support.");
}
}
}
From 4b7db3cbd62233323bccfdd2188f28e8b6434a43 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 10 Apr 2025 09:36:47 +0800
Subject: [PATCH 0693/1442] Make function static
---
Flow.Launcher.Infrastructure/StringMatcher.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/StringMatcher.cs b/Flow.Launcher.Infrastructure/StringMatcher.cs
index 7045517f5..2882cb8f0 100644
--- a/Flow.Launcher.Infrastructure/StringMatcher.cs
+++ b/Flow.Launcher.Infrastructure/StringMatcher.cs
@@ -228,7 +228,7 @@ namespace Flow.Launcher.Infrastructure
return new MatchResult(false, UserSettingSearchPrecision);
}
- private bool IsAcronym(string stringToCompare, int compareStringIndex)
+ private static bool IsAcronym(string stringToCompare, int compareStringIndex)
{
if (IsAcronymChar(stringToCompare, compareStringIndex) || IsAcronymNumber(stringToCompare, compareStringIndex))
return true;
@@ -237,7 +237,7 @@ namespace Flow.Launcher.Infrastructure
}
// When counting acronyms, treat a set of numbers as one acronym ie. Visual 2019 as 2 acronyms instead of 5
- private bool IsAcronymCount(string stringToCompare, int compareStringIndex)
+ private static bool IsAcronymCount(string stringToCompare, int compareStringIndex)
{
if (IsAcronymChar(stringToCompare, compareStringIndex))
return true;
From f5fd6b569ca8466fe4922aa1bd975622217c81ee Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 10 Apr 2025 09:56:27 +0800
Subject: [PATCH 0694/1442] Use ReadOnlySpan instead
---
.../PinyinAlphabet.cs | 43 ++++++++++++-------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
index 7bcc70251..1637a285c 100644
--- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
+++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs
@@ -1,4 +1,5 @@
-using System.Collections.Concurrent;
+using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
@@ -148,9 +149,11 @@ namespace Flow.Launcher.Infrastructure
private static string ToDoublePin(string fullPinyin)
{
// Assuming s is valid
+ var fullPinyinSpan = fullPinyin.AsSpan();
var doublePin = new StringBuilder();
- if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
+ // Handle special cases (a, o, e)
+ if (fullPinyin.Length <= 3 && (fullPinyinSpan[0] == 'a' || fullPinyinSpan[0] == 'e' || fullPinyinSpan[0] == 'o'))
{
if (special.TryGetValue(fullPinyin, out var value))
{
@@ -158,31 +161,41 @@ namespace Flow.Launcher.Infrastructure
}
}
- // zh, ch, sh
- if (fullPinyin.Length >= 2 && first.ContainsKey(fullPinyin[..2]))
+ // Check for initials that are two characters long (zh, ch, sh)
+ if (fullPinyin.Length >= 2)
{
- doublePin.Append(first[fullPinyin[..2]]);
+ var firstTwo = fullPinyinSpan[..2];
+ var firstTwoString = firstTwo.ToString();
+ if (first.ContainsKey(firstTwoString))
+ {
+ doublePin.Append(firstTwoString);
- if (second.TryGetValue(fullPinyin[2..], out var tmp))
- {
- doublePin.Append(tmp);
- }
- else
- {
- doublePin.Append(fullPinyin[2..]);
+ var lastTwo = fullPinyinSpan[2..];
+ var lastTwoString = lastTwo.ToString();
+ if (second.TryGetValue(lastTwoString, out var tmp))
+ {
+ doublePin.Append(tmp);
+ }
+ else
+ {
+ doublePin.Append(lastTwo);
+ }
}
}
+ // Handle single-character initials
else
{
- doublePin.Append(fullPinyin[0]);
+ doublePin.Append(fullPinyinSpan[0]);
- if (second.TryGetValue(fullPinyin[1..], out var tmp))
+ var lastOne = fullPinyinSpan[1..];
+ var lastOneString = lastOne.ToString();
+ if (second.TryGetValue(lastOneString, out var tmp))
{
doublePin.Append(tmp);
}
else
{
- doublePin.Append(fullPinyin[1..]);
+ doublePin.Append(lastOne);
}
}
From 22c0f59f202e993878ab2a0f884bb78b9a5ee75d Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 10 Apr 2025 22:06:44 +0900
Subject: [PATCH 0695/1442] Add badge area in xaml
---
Flow.Launcher/ResultListBox.xaml | 95 +++++++++++++++++---------------
1 file changed, 51 insertions(+), 44 deletions(-)
diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml
index 4c3bd1d12..59a16e10c 100644
--- a/Flow.Launcher/ResultListBox.xaml
+++ b/Flow.Launcher/ResultListBox.xaml
@@ -90,62 +90,69 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Date: Fri, 11 Apr 2025 06:43:38 +0900
Subject: [PATCH 0696/1442] Fix Fontcolor binding
---
Flow.Launcher/Resources/CustomControlTemplate.xaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index ffa5eea41..c18d5fa60 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2785,6 +2785,7 @@
+
@@ -2872,7 +2873,7 @@
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
- Foreground="{DynamicResource Color05B}"
+ Foreground="{TemplateBinding Foreground}"
InputScope="{TemplateBinding InputScope}"
SelectionBrush="{TemplateBinding SelectionBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
From de21a43a81a36fd9fb1c5589c60c757dcce1d542 Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 07:23:21 +0900
Subject: [PATCH 0697/1442] Adjust Template
---
Flow.Launcher/Languages/en.xaml | 1 +
.../Resources/Controls/InstalledPluginDisplay.xaml | 5 ++++-
Flow.Launcher/Resources/CustomControlTemplate.xaml | 8 +++++---
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 609859d0d..a7fbca90a 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -109,6 +109,7 @@
Shadow effect is not allowed while current theme has blur effect enabledSearch DelayAdds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay TimeWait time before showing results after typing stops. Higher values wait longer. (ms)
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 231036244..619da22dc 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -96,8 +96,11 @@
PlaceholderText="{Binding DefaultSearchDelay}"
SmallChange="10"
SpinButtonPlacementMode="Compact"
- ToolTip="{DynamicResource searchDelayToolTip}"
+ ToolTip="{DynamicResource searchDelayNumberBoxToolTip}"
+ ToolTipService.InitialShowDelay="0"
+ ToolTipService.ShowOnDisabled="True"
Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />
+
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index c18d5fa60..ae3cc8018 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2784,10 +2784,12 @@
-
+
-
+
+
+
@@ -2873,7 +2875,7 @@
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
+ Foreground="{DynamicResource ForeGround}"
InputScope="{TemplateBinding InputScope}"
SelectionBrush="{TemplateBinding SelectionBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
From dac66d0c39e410683cbafe1e01e5df8b479f7dda Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 07:27:16 +0900
Subject: [PATCH 0698/1442] Add removed tooltip
---
Flow.Launcher/Languages/en.xaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index a7fbca90a..e53b75ae8 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -44,6 +44,7 @@
Game ModeSuspend the use of Hotkeys.Position Reset
+ Reset search window positionType here to search
From d76b406c82d8f59937d5bf55b28559ffac9f5ef6 Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 09:15:30 +0900
Subject: [PATCH 0699/1442] Fix template binding
---
Flow.Launcher/Resources/CustomControlTemplate.xaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index ae3cc8018..de84e40d9 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2875,7 +2875,6 @@
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
- Foreground="{DynamicResource ForeGround}"
InputScope="{TemplateBinding InputScope}"
SelectionBrush="{TemplateBinding SelectionBrush}"
TextAlignment="{TemplateBinding TextAlignment}" />
From 96915d7e97c99809a7608ab6e9606e665a90bff2 Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 09:17:12 +0900
Subject: [PATCH 0700/1442] Fix Style
---
Flow.Launcher/Resources/CustomControlTemplate.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index de84e40d9..5a6b9a248 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2804,7 +2804,7 @@
-
+
From 5e54416d3a40952f6c36fc8f5173c7bde4d7b096 Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 09:21:30 +0900
Subject: [PATCH 0701/1442] Remove Dulplicated setter
---
Flow.Launcher/Resources/CustomControlTemplate.xaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index 5a6b9a248..1ff6ca49c 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -1285,7 +1285,6 @@
BasedOn="{StaticResource DefaultComboBoxStyle}"
TargetType="ComboBox">
-
From c5f2868a9b620303525715edb971a56bd6c384c9 Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 09:25:45 +0900
Subject: [PATCH 0702/1442] Fix small warning
---
.../Converters/QuerySuggestionBoxConverter.cs | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
index ed94771f0..0d6f2e469 100644
--- a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
+++ b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
@@ -43,8 +44,16 @@ public class QuerySuggestionBoxConverter : IMultiValueConverter
// Check if Text will be larger than our QueryTextBox
Typeface typeface = new Typeface(queryTextBox.FontFamily, queryTextBox.FontStyle, queryTextBox.FontWeight, queryTextBox.FontStretch);
- // TODO: Obsolete warning?
- var ft = new FormattedText(queryTextBox.Text, CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, typeface, queryTextBox.FontSize, Brushes.Black);
+ var dpi = VisualTreeHelper.GetDpi(queryTextBox);
+ var ft = new FormattedText(
+ queryTextBox.Text,
+ CultureInfo.CurrentCulture,
+ FlowDirection.LeftToRight,
+ typeface,
+ queryTextBox.FontSize,
+ Brushes.Black,
+ dpi.PixelsPerDip
+ );
var offset = queryTextBox.Padding.Right;
From 2f1e009d704a2efefffe61828a3fb44341883dd7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 10:37:49 +0800
Subject: [PATCH 0703/1442] Remove blank lines
---
Flow.Launcher/ResultListBox.xaml | 2 --
Flow.Launcher/ViewModel/ResultViewModel.cs | 1 -
2 files changed, 3 deletions(-)
diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml
index 59a16e10c..b57cb0d40 100644
--- a/Flow.Launcher/ResultListBox.xaml
+++ b/Flow.Launcher/ResultListBox.xaml
@@ -151,8 +151,6 @@
-
-
Date: Fri, 11 Apr 2025 11:08:28 +0800
Subject: [PATCH 0704/1442] Remove debug codes & Improve code quality
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 82 +++++++++++++
.../SettingsPaneGeneralViewModel.cs | 110 +++---------------
2 files changed, 95 insertions(+), 97 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index f9c548de8..815f31280 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Windows;
@@ -517,5 +518,86 @@ namespace Flow.Launcher.Infrastructure
}
#endregion
+
+ #region Korean IME
+
+ public static bool IsKoreanIMEExist()
+ {
+ return GetLegacyKoreanIMERegistryValue() != null;
+ }
+
+ public static bool IsLegacyKoreanIMEEnabled()
+ {
+ object value = GetLegacyKoreanIMERegistryValue();
+
+ if (value is int intValue)
+ {
+ return intValue == 1;
+ }
+ else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ {
+ return parsedValue == 1;
+ }
+
+ return false;
+ }
+
+ public static bool SetLegacyKoreanIMEEnabled(bool enable)
+ {
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath);
+ if (key != null)
+ {
+ int value = enable ? 1 : 0;
+ key.SetValue(valueName, value, RegistryValueKind.DWord);
+ return true;
+ }
+ }
+ catch (System.Exception)
+ {
+ // Ignored
+ }
+
+ return false;
+ }
+
+ public static object GetLegacyKoreanIMERegistryValue()
+ {
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
+ const string valueName = "NoTsf3Override5";
+
+ try
+ {
+ using RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath);
+ if (key != null)
+ {
+ return key.GetValue(valueName);
+ }
+ }
+ catch (System.Exception)
+ {
+ // Ignored
+ }
+
+ return null;
+ }
+
+ public static void OpenImeSettings()
+ {
+ try
+ {
+ Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
+ }
+ catch (System.Exception)
+ {
+ // Ignored
+ }
+ }
+
+ #endregion
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 33a7428db..7eba1602f 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -1,20 +1,16 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
using System.Windows.Forms;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
+using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
-using Microsoft.Win32;
using OpenFileDialog = System.Windows.Forms.OpenFileDialog;
-using System.Windows.Input;
-
namespace Flow.Launcher.SettingPages.ViewModels;
@@ -25,8 +21,6 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
private readonly IPortable _portable;
private readonly Internationalization _translater;
- public ICommand OpenImeSettingsCommand { get; }
-
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable, Internationalization translater)
{
Settings = settings;
@@ -34,7 +28,6 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
_portable = portable;
_translater = translater;
UpdateEnumDropdownLocalizations();
- OpenImeSettingsCommand = new RelayCommand(OpenImeSettings);
}
public class SearchWindowScreenData : DropdownDataGeneric { }
@@ -187,21 +180,22 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
UpdateEnumDropdownLocalizations();
}
}
-
+
+ #region Korean IME
+
// The new Korean IME used in Windows 11 has compatibility issues with WPF. This issue is difficult to resolve within
// WPF itself, but it can be avoided by having the user switch to the legacy IME at the system level. Therefore,
// we provide guidance and a direct button for users to make this change themselves. If the relevant registry key does
// not exist (i.e., the Korean IME is not installed), this setting will not be shown at all.
- #region Korean IME
+
public bool LegacyKoreanIMEEnabled
{
- get => IsLegacyKoreanIMEEnabled();
+ get => Win32Helper.IsLegacyKoreanIMEEnabled();
set
{
- Debug.WriteLine($"[DEBUG] LegacyKoreanIMEEnabled changed: {value}");
- if (SetLegacyKoreanIMEEnabled(value))
+ if (Win32Helper.SetLegacyKoreanIMEEnabled(value))
{
- OnPropertyChanged(nameof(LegacyKoreanIMEEnabled));
+ OnPropertyChanged();
OnPropertyChanged(nameof(KoreanIMERegistryValueIsZero));
}
else
@@ -212,13 +206,13 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
- public bool KoreanIMERegistryKeyExists => IsKoreanIMEExist();
+ public bool KoreanIMERegistryKeyExists => Win32Helper.IsKoreanIMEExist();
public bool KoreanIMERegistryValueIsZero
{
get
{
- object value = GetLegacyKoreanIMERegistryValue();
+ object value = Win32Helper.GetLegacyKoreanIMERegistryValue();
if (value is int intValue)
{
return intValue == 0;
@@ -232,90 +226,12 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
- bool IsKoreanIMEExist()
- {
- return GetLegacyKoreanIMERegistryValue() != null;
- }
-
- bool IsLegacyKoreanIMEEnabled()
- {
- object value = GetLegacyKoreanIMERegistryValue();
-
- if (value is int intValue)
- {
- return intValue == 1;
- }
- else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
- {
- return parsedValue == 1;
- }
-
- return false;
- }
-
- bool SetLegacyKoreanIMEEnabled(bool enable)
- {
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
-
- try
- {
- using (RegistryKey key = Registry.CurrentUser.CreateSubKey(subKeyPath))
- {
- if (key != null)
- {
- int value = enable ? 1 : 0;
- key.SetValue(valueName, value, RegistryValueKind.DWord);
- return true;
- }
- else
- {
- Debug.WriteLine($"[IME DEBUG] Failed to create or open registry key: {subKeyPath}");
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] Exception occurred while setting registry: {ex.Message}");
- }
-
- return false;
- }
-
- private object GetLegacyKoreanIMERegistryValue()
- {
- const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}";
- const string valueName = "NoTsf3Override5";
-
- try
- {
- using (RegistryKey key = Registry.CurrentUser.OpenSubKey(subKeyPath))
- {
- if (key != null)
- {
- return key.GetValue(valueName);
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine($"[IME DEBUG] Exception occurred: {ex.Message}");
- }
-
- return null;
- }
-
+ [RelayCommand]
private void OpenImeSettings()
{
- try
- {
- Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
- }
- catch (Exception e)
- {
- Debug.WriteLine($"Error opening IME settings: {e.Message}");
- }
+ Win32Helper.OpenImeSettings();
}
+
#endregion
public bool ShouldUsePinyin
From b14cf89d6878ee42cab2d5ef08249c6d186c8bb9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 11:11:58 +0800
Subject: [PATCH 0705/1442] Remove useless using
---
.../SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 7eba1602f..2697a508e 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -10,7 +10,6 @@ using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
-using OpenFileDialog = System.Windows.Forms.OpenFileDialog;
namespace Flow.Launcher.SettingPages.ViewModels;
@@ -20,7 +19,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
private readonly Updater _updater;
private readonly IPortable _portable;
private readonly Internationalization _translater;
-
+
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable, Internationalization translater)
{
Settings = settings;
From 1517db8326c3e42d876e78aa12aa2f5daf0f7cab Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 11:21:22 +0800
Subject: [PATCH 0706/1442] Revert wrong changes on en.xaml
---
Flow.Launcher/Languages/en.xaml | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index bf430b6f5..0df77b127 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -110,12 +110,7 @@
Search DelayAdds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)Information for Korean IME user
The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
@@ -393,9 +388,7 @@
Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.Custom Query Hotkey
From c5f2fcaddf11858b9c1ba111375cc0ec9ec63141 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 11:22:27 +0800
Subject: [PATCH 0707/1442] Revert wrong changes on en.xaml
---
Flow.Launcher/Languages/en.xaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 0df77b127..f1c0a67cb 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -161,7 +161,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultPlugin Store
From 218635a035558b0562b009ae9cbd7605d27e823a Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 12:56:31 +0900
Subject: [PATCH 0708/1442] Add logic to check whether the Korean IME is in use
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 4 ++++
.../ViewModels/SettingsPaneGeneralViewModel.cs | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 815f31280..2df632545 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -21,6 +21,10 @@ namespace Flow.Launcher.Infrastructure
{
#region Blur Handling
+ public static bool IsWindows11()
+ {
+ return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22000;
+ }
public static bool IsBackdropSupported()
{
// Mica and Acrylic only supported Windows 11 22000+
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 2697a508e..13ae65894 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Windows.Forms;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
@@ -205,7 +206,18 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
- public bool KoreanIMERegistryKeyExists => Win32Helper.IsKoreanIMEExist();
+ public bool KoreanIMERegistryKeyExists
+ {
+ get
+ {
+ bool registryKeyExists = Win32Helper.IsKoreanIMEExist();
+ bool koreanLanguageInstalled = InputLanguage.InstalledInputLanguages.Cast().Any(lang => lang.Culture.Name.StartsWith("ko"));
+ bool isWindows11 = Win32Helper.IsWindows11();
+
+ // Return true if Windows 11 with Korean IME installed, or if the registry key exists
+ return (isWindows11 && koreanLanguageInstalled) || registryKeyExists;
+ }
+ }
public bool KoreanIMERegistryValueIsZero
{
From b842f08b5147de1cc504f723df3a870064801bbd Mon Sep 17 00:00:00 2001
From: DB p
Date: Fri, 11 Apr 2025 13:23:17 +0900
Subject: [PATCH 0709/1442] Add logic to block space key input when registering
an action keyword for plugins that do not support multiple action keywords.
---
.../Views/ActionKeywordSetting.xaml | 1 +
.../Views/ActionKeywordSetting.xaml.cs | 21 +++++++++++
.../SearchSourceSetting.xaml | 36 ++++++++++---------
.../SearchSourceSetting.xaml.cs | 26 ++++++++++++++
4 files changed, 67 insertions(+), 17 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
index d42505348..37a7ccb8d 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
@@ -80,6 +80,7 @@
Width="135"
HorizontalAlignment="Left"
VerticalAlignment="Center"
+ DataObject.Pasting="TextBox_Pasting"
PreviewKeyDown="TxtCurrentActionKeyword_OnKeyDown"
Text="{Binding ActionKeyword}" />
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
index 73c35b1c8..b928a9815 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
+using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Input;
@@ -93,7 +94,27 @@ namespace Flow.Launcher.Plugin.Explorer.Views
OnDoneButtonClick(sender, e);
e.Handled = true;
}
+ if (e.Key == Key.Space)
+ {
+ e.Handled = true;
+ }
}
+ private void TextBox_Pasting(object sender, DataObjectPastingEventArgs e)
+ {
+ if (e.DataObject.GetDataPresent(DataFormats.Text))
+ {
+ string text = e.DataObject.GetData(DataFormats.Text) as string;
+ if (!string.IsNullOrEmpty(text) && text.Any(char.IsWhiteSpace))
+ {
+ e.CancelCommand();
+ }
+ }
+ else
+ {
+ e.CancelCommand();
+ }
+ }
+
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml
index 3df50b3ed..746c9cf84 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml
@@ -56,13 +56,13 @@
-
+
-
+
@@ -139,13 +139,13 @@
Name="imgPreviewIcon"
Width="24"
Height="24"
- Margin="14,0,0,0"
+ Margin="14 0 0 0"
VerticalAlignment="Center" />
@@ -196,16 +198,16 @@
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
- BorderThickness="0,1,0,0">
+ BorderThickness="0 1 0 0">
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
index 58577dbc1..0a1bdf6a2 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
@@ -1,5 +1,7 @@
using System.Collections.Generic;
+using System.Linq;
using System.Windows;
+using System.Windows.Input;
using Microsoft.Win32;
namespace Flow.Launcher.Plugin.WebSearch
@@ -143,6 +145,30 @@ namespace Flow.Launcher.Plugin.WebSearch
}
}
}
+
+ //Block Space Input
+ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.Key == Key.Space)
+ {
+ e.Handled = true;
+ }
+ }
+ private void TextBox_Pasting(object sender, DataObjectPastingEventArgs e)
+ {
+ if (e.DataObject.GetDataPresent(DataFormats.Text))
+ {
+ string text = e.DataObject.GetData(DataFormats.Text) as string;
+ if (!string.IsNullOrEmpty(text) && text.Any(char.IsWhiteSpace))
+ {
+ e.CancelCommand();
+ }
+ }
+ else
+ {
+ e.CancelCommand();
+ }
+ }
}
public enum Action
From a6c7430094f86dd369971adade4fc7afbf383358 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 12:36:19 +0800
Subject: [PATCH 0710/1442] Code quality
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 10 ++++++----
.../ViewModels/SettingsPaneGeneralViewModel.cs | 10 +++++-----
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 2df632545..54604a271 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -21,10 +21,6 @@ namespace Flow.Launcher.Infrastructure
{
#region Blur Handling
- public static bool IsWindows11()
- {
- return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22000;
- }
public static bool IsBackdropSupported()
{
// Mica and Acrylic only supported Windows 11 22000+
@@ -525,6 +521,12 @@ namespace Flow.Launcher.Infrastructure
#region Korean IME
+ public static bool IsWindows11()
+ {
+ return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
+ Environment.OSVersion.Version.Build >= 22000;
+ }
+
public static bool IsKoreanIMEExist()
{
return GetLegacyKoreanIMERegistryValue() != null;
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 13ae65894..021c9d7fe 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -210,9 +210,9 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
get
{
- bool registryKeyExists = Win32Helper.IsKoreanIMEExist();
- bool koreanLanguageInstalled = InputLanguage.InstalledInputLanguages.Cast().Any(lang => lang.Culture.Name.StartsWith("ko"));
- bool isWindows11 = Win32Helper.IsWindows11();
+ var registryKeyExists = Win32Helper.IsKoreanIMEExist();
+ var koreanLanguageInstalled = InputLanguage.InstalledInputLanguages.Cast().Any(lang => lang.Culture.Name.StartsWith("ko"));
+ var isWindows11 = Win32Helper.IsWindows11();
// Return true if Windows 11 with Korean IME installed, or if the registry key exists
return (isWindows11 && koreanLanguageInstalled) || registryKeyExists;
@@ -223,12 +223,12 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
get
{
- object value = Win32Helper.GetLegacyKoreanIMERegistryValue();
+ var value = Win32Helper.GetLegacyKoreanIMERegistryValue();
if (value is int intValue)
{
return intValue == 0;
}
- else if (value != null && int.TryParse(value.ToString(), out int parsedValue))
+ else if (value != null && int.TryParse(value.ToString(), out var parsedValue))
{
return parsedValue == 0;
}
From 71923194b61abd1aaec2df4b8e1275581078096f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 12:38:48 +0800
Subject: [PATCH 0711/1442] Change IME settings icon
---
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index 5304824fe..4782d356e 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -341,7 +341,7 @@
From e29bf745149d7dc9178562fdec8e222cc9271b46 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 12:50:00 +0800
Subject: [PATCH 0712/1442] Fix explorer settings panel margin
---
.../Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
index 1bdb9d36a..6ca7be84d 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
@@ -598,7 +598,7 @@
From 3e20c518a0d6c45af027f8387dcb21c782466bdf Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 14:51:25 +0800
Subject: [PATCH 0713/1442] Code quality
---
Flow.Launcher/ViewModel/ResultsViewModel.cs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index 61566b415..02fb379fa 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -19,7 +19,7 @@ namespace Flow.Launcher.ViewModel
public ResultCollection Results { get; }
- private readonly object _collectionLock = new object();
+ private readonly object _collectionLock = new();
private readonly Settings _settings;
private int MaxResults => _settings?.MaxResultsToShow ?? 6;
@@ -89,7 +89,7 @@ namespace Flow.Launcher.ViewModel
#region Private Methods
- private int InsertIndexOf(int newScore, IList list)
+ private static int InsertIndexOf(int newScore, IList list)
{
int index = 0;
for (; index < list.Count; index++)
@@ -118,7 +118,6 @@ namespace Flow.Launcher.ViewModel
}
}
-
#endregion
#region Public Methods
@@ -190,10 +189,10 @@ namespace Flow.Launcher.ViewModel
if (token.IsCancellationRequested)
return;
- UpdateResults(newResults, token, reselect);
+ UpdateResults(newResults, reselect, token);
}
- private void UpdateResults(List newResults, CancellationToken token = default, bool reselect = true)
+ private void UpdateResults(List newResults, bool reselect = true, CancellationToken token = default)
{
lock (_collectionLock)
{
From 47398f104f316675f4193af1ff6df1865f587047 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 14:58:47 +0800
Subject: [PATCH 0714/1442] Add ShowPluginBadges settings
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 +
Flow.Launcher/ResultListBox.xaml | 2 +-
Flow.Launcher/ViewModel/ResultViewModel.cs | 5 +++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index e304a1b50..b48f047c5 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -101,6 +101,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
public double SoundVolume { get; set; } = 50;
+ public bool ShowPluginBadges { get; set; } = false;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml
index b57cb0d40..03bff03eb 100644
--- a/Flow.Launcher/ResultListBox.xaml
+++ b/Flow.Launcher/ResultListBox.xaml
@@ -146,7 +146,7 @@
VerticalAlignment="Bottom"
RenderOptions.BitmapScalingMode="Fant"
Source="{Binding Image, TargetNullValue={x:Null}}"
- Visibility="{Binding ShowBadge, Converter={StaticResource BoolToVisibilityConverter}}" />
+ Visibility="{Binding ShowBadge}" />
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index 0975398dc..41e5dd12e 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -123,6 +123,11 @@ namespace Flow.Launcher.ViewModel
}
}
+ public Visibility ShowBadge
+ {
+ get => Settings.ShowPluginBadges ? Visibility.Visible : Visibility.Collapsed;
+ }
+
private bool GlyphAvailable => Glyph is not null;
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPath) || Result.Icon is not null;
From 579dc061718ac2b151d8b9cf1523fd4c93e0b03f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:00:46 +0800
Subject: [PATCH 0715/1442] Code quality
---
Flow.Launcher.Plugin/Result.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index 910485438..2e4befdc2 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -60,7 +60,7 @@ namespace Flow.Launcher.Plugin
/// GlyphInfo is prioritized if not null
public string IcoPath
{
- get { return _icoPath; }
+ get => _icoPath;
set
{
// As a standard this property will handle prepping and converting to absolute local path for icon image processing
@@ -101,7 +101,6 @@ namespace Flow.Launcher.Plugin
///
public GlyphInfo Glyph { get; init; }
-
///
/// An action to take in the form of a function call when the result has been selected.
///
@@ -143,7 +142,7 @@ namespace Flow.Launcher.Plugin
///
public string PluginDirectory
{
- get { return _pluginDirectory; }
+ get => _pluginDirectory;
set
{
_pluginDirectory = value;
From 471c3edc6fc679ebfb5b72f5be9ed418c3575bba Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:21:11 +0800
Subject: [PATCH 0716/1442] Add BadgePath & BadgeIcon property
---
Flow.Launcher.Plugin/Result.cs | 150 ++++++++++++++---------
Flow.Launcher/ViewModel/MainViewModel.cs | 11 +-
2 files changed, 102 insertions(+), 59 deletions(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index 2e4befdc2..7e520175e 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -12,12 +12,19 @@ namespace Flow.Launcher.Plugin
///
public class Result
{
+ ///
+ /// Maximum score. This can be useful when set one result to the top by default. This is the score for the results set to the topmost by users.
+ ///
+ public const int MaxScore = int.MaxValue;
+
private string _pluginDirectory;
private string _icoPath;
private string _copyText = string.Empty;
+ private string _badgePath;
+
///
/// The title of the result. This is always required.
///
@@ -80,6 +87,33 @@ namespace Flow.Launcher.Plugin
}
}
+ ///
+ /// The image to be displayed for the badge of the result.
+ ///
+ /// Can be a local file path or a URL.
+ /// If null or empty, will use plugin icon
+ public string BadgePath
+ {
+ get => _badgePath;
+ set
+ {
+ // As a standard this property will handle prepping and converting to absolute local path for icon image processing
+ if (!string.IsNullOrEmpty(value)
+ && !string.IsNullOrEmpty(PluginDirectory)
+ && !Path.IsPathRooted(value)
+ && !value.StartsWith("http://", StringComparison.OrdinalIgnoreCase)
+ && !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
+ && !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
+ {
+ _badgePath = Path.Combine(PluginDirectory, value);
+ }
+ else
+ {
+ _badgePath = value;
+ }
+ }
+ }
+
///
/// Determines if Icon has a border radius
///
@@ -94,7 +128,12 @@ namespace Flow.Launcher.Plugin
///
/// Delegate to load an icon for this result.
///
- public IconDelegate Icon;
+ public IconDelegate Icon { get; set; }
+
+ ///
+ /// Delegate to load an icon for the badge of this result.
+ ///
+ public IconDelegate BadgeIcon { get; set; }
///
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
@@ -154,47 +193,6 @@ namespace Flow.Launcher.Plugin
}
}
- ///
- public override string ToString()
- {
- return Title + SubTitle + Score;
- }
-
- ///
- /// Clones the current result
- ///
- public Result Clone()
- {
- return new Result
- {
- Title = Title,
- SubTitle = SubTitle,
- ActionKeywordAssigned = ActionKeywordAssigned,
- CopyText = CopyText,
- AutoCompleteText = AutoCompleteText,
- IcoPath = IcoPath,
- RoundedIcon = RoundedIcon,
- Icon = Icon,
- Glyph = Glyph,
- Action = Action,
- AsyncAction = AsyncAction,
- Score = Score,
- TitleHighlightData = TitleHighlightData,
- OriginQuery = OriginQuery,
- PluginDirectory = PluginDirectory,
- ContextData = ContextData,
- PluginID = PluginID,
- TitleToolTip = TitleToolTip,
- SubTitleToolTip = SubTitleToolTip,
- PreviewPanel = PreviewPanel,
- ProgressBar = ProgressBar,
- ProgressBarColor = ProgressBarColor,
- Preview = Preview,
- AddSelectedCount = AddSelectedCount,
- RecordKey = RecordKey
- };
- }
-
///
/// Additional data associated with this result
///
@@ -223,16 +221,6 @@ namespace Flow.Launcher.Plugin
///
public Lazy PreviewPanel { get; set; }
- ///
- /// Run this result, asynchronously
- ///
- ///
- ///
- public ValueTask ExecuteAsync(ActionContext context)
- {
- return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
- }
-
///
/// Progress bar display. Providing an int value between 0-100 will trigger the progress bar to be displayed on the result
///
@@ -254,11 +242,6 @@ namespace Flow.Launcher.Plugin
///
public bool AddSelectedCount { get; set; } = true;
- ///
- /// Maximum score. This can be useful when set one result to the top by default. This is the score for the results set to the topmost by users.
- ///
- public const int MaxScore = int.MaxValue;
-
///
/// The key to identify the record. This is used when FL checks whether the result is the topmost record. Or FL calculates the hashcode of the result for user selected records.
/// This can be useful when your plugin will change the Title or SubTitle of the result dynamically.
@@ -267,6 +250,59 @@ namespace Flow.Launcher.Plugin
///
public string RecordKey { get; set; } = null;
+ ///
+ /// Run this result, asynchronously
+ ///
+ ///
+ ///
+ public ValueTask ExecuteAsync(ActionContext context)
+ {
+ return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
+ }
+
+ ///
+ public override string ToString()
+ {
+ return Title + SubTitle + Score;
+ }
+
+ ///
+ /// Clones the current result
+ ///
+ public Result Clone()
+ {
+ return new Result
+ {
+ Title = Title,
+ SubTitle = SubTitle,
+ ActionKeywordAssigned = ActionKeywordAssigned,
+ CopyText = CopyText,
+ AutoCompleteText = AutoCompleteText,
+ IcoPath = IcoPath,
+ BadgePath = BadgePath,
+ RoundedIcon = RoundedIcon,
+ Icon = Icon,
+ BadgeIcon = BadgeIcon,
+ Glyph = Glyph,
+ Action = Action,
+ AsyncAction = AsyncAction,
+ Score = Score,
+ TitleHighlightData = TitleHighlightData,
+ OriginQuery = OriginQuery,
+ PluginDirectory = PluginDirectory,
+ ContextData = ContextData,
+ PluginID = PluginID,
+ TitleToolTip = TitleToolTip,
+ SubTitleToolTip = SubTitleToolTip,
+ PreviewPanel = PreviewPanel,
+ ProgressBar = ProgressBar,
+ ProgressBarColor = ProgressBarColor,
+ Preview = Preview,
+ AddSelectedCount = AddSelectedCount,
+ RecordKey = RecordKey
+ };
+ }
+
///
/// Info of the preview section of a
///
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 4a6c1d639..38efca72b 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1268,8 +1268,7 @@ namespace Flow.Launcher.ViewModel
// Task.Yield will force it to run in ThreadPool
await Task.Yield();
- IReadOnlyList results =
- await PluginManager.QueryForPluginAsync(plugin, query, token);
+ var results = await PluginManager.QueryForPluginAsync(plugin, query, token);
if (token.IsCancellationRequested)
return;
@@ -1285,6 +1284,14 @@ namespace Flow.Launcher.ViewModel
resultsCopy = DeepCloneResults(results, token);
}
+ foreach (var result in results)
+ {
+ if (string.IsNullOrEmpty(result.BadgePath))
+ {
+ result.BadgePath = plugin.Metadata.IcoPath;
+ }
+ }
+
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
token, reSelect)))
{
From b85c2f48f9a3233991671971b9207996582b177d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:35:36 +0800
Subject: [PATCH 0717/1442] Add related settings in appreance page
---
.../UserSettings/Settings.cs | 2 +-
Flow.Launcher/Languages/en.xaml | 2 ++
.../SettingPages/Views/SettingsPaneTheme.xaml | 16 ++++++++++++++--
Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +-
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index b48f047c5..d97a9ed1a 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -101,7 +101,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
public double SoundVolume { get; set; } = 50;
- public bool ShowPluginBadges { get; set; } = false;
+ public bool ShowBadges { get; set; } = false;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 609859d0d..66721d828 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -283,6 +283,8 @@
Use Segoe Fluent IconsUse Segoe Fluent Icons for query results where supportedPress Key
+ Show Result Badges
+ Show badges for query results where supportedHTTP Proxy
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 49306cd2d..574002a05 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -698,11 +698,10 @@
-
+
+
+
+
+
+
Settings.ShowPluginBadges ? Visibility.Visible : Visibility.Collapsed;
+ get => Settings.ShowBadges ? Visibility.Visible : Visibility.Collapsed;
}
private bool GlyphAvailable => Glyph is not null;
From 9e3e0f6e3c561b1106e63e0439162ec3df33a60f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:38:00 +0800
Subject: [PATCH 0718/1442] Change name to BadgeIcoPath
---
Flow.Launcher.Plugin/Result.cs | 12 ++++++------
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index 7e520175e..70d11dadd 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -23,7 +23,7 @@ namespace Flow.Launcher.Plugin
private string _copyText = string.Empty;
- private string _badgePath;
+ private string _badgeIcoPath;
///
/// The title of the result. This is always required.
@@ -92,9 +92,9 @@ namespace Flow.Launcher.Plugin
///
/// Can be a local file path or a URL.
/// If null or empty, will use plugin icon
- public string BadgePath
+ public string BadgeIcoPath
{
- get => _badgePath;
+ get => _badgeIcoPath;
set
{
// As a standard this property will handle prepping and converting to absolute local path for icon image processing
@@ -105,11 +105,11 @@ namespace Flow.Launcher.Plugin
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)
&& !value.StartsWith("data:image", StringComparison.OrdinalIgnoreCase))
{
- _badgePath = Path.Combine(PluginDirectory, value);
+ _badgeIcoPath = Path.Combine(PluginDirectory, value);
}
else
{
- _badgePath = value;
+ _badgeIcoPath = value;
}
}
}
@@ -279,7 +279,7 @@ namespace Flow.Launcher.Plugin
CopyText = CopyText,
AutoCompleteText = AutoCompleteText,
IcoPath = IcoPath,
- BadgePath = BadgePath,
+ BadgeIcoPath = BadgeIcoPath,
RoundedIcon = RoundedIcon,
Icon = Icon,
BadgeIcon = BadgeIcon,
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 38efca72b..0abd14ec5 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1286,9 +1286,9 @@ namespace Flow.Launcher.ViewModel
foreach (var result in results)
{
- if (string.IsNullOrEmpty(result.BadgePath))
+ if (string.IsNullOrEmpty(result.BadgeIcoPath))
{
- result.BadgePath = plugin.Metadata.IcoPath;
+ result.BadgeIcoPath = plugin.Metadata.IcoPath;
}
}
From d338c5551d9cf136fffcf74e269f3446215a09e4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:47:41 +0800
Subject: [PATCH 0719/1442] Fix badge icon url issue
---
Flow.Launcher.Plugin/Result.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index 70d11dadd..ac00d5af5 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -188,8 +188,9 @@ namespace Flow.Launcher.Plugin
// When the Result object is returned from the query call, PluginDirectory is not provided until
// UpdatePluginMetadata call is made at PluginManager.cs L196. Once the PluginDirectory becomes available
- // we need to update (only if not Uri path) the IcoPath with the full absolute path so the image can be loaded.
+ // we need to update (only if not Uri path) the IcoPath and BadgeIcoPath with the full absolute path so the image can be loaded.
IcoPath = _icoPath;
+ BadgeIcoPath = _badgeIcoPath;
}
}
From a1ce6b348dbc679bed986de05447e8fb86d7e21b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:48:49 +0800
Subject: [PATCH 0720/1442] Fix result badge ico path update issue
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 0abd14ec5..c1a237c6a 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1284,7 +1284,7 @@ namespace Flow.Launcher.ViewModel
resultsCopy = DeepCloneResults(results, token);
}
- foreach (var result in results)
+ foreach (var result in resultsCopy)
{
if (string.IsNullOrEmpty(result.BadgeIcoPath))
{
From ec99a365b9d27a708464b4506a41d55259c15961 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:49:39 +0800
Subject: [PATCH 0721/1442] Support badge path for result update interface
---
Flow.Launcher/ViewModel/MainViewModel.cs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index c1a237c6a..2155f7bf8 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -245,6 +245,14 @@ namespace Flow.Launcher.ViewModel
// make a clone to avoid possible issue that plugin will also change the list and items when updating view model
var resultsCopy = DeepCloneResults(e.Results, token);
+ foreach (var result in resultsCopy)
+ {
+ if (string.IsNullOrEmpty(result.BadgeIcoPath))
+ {
+ result.BadgeIcoPath = pair.Metadata.IcoPath;
+ }
+ }
+
PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query);
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
token)))
From 2eda64aa7af74dad5f3cf21fda8e8a8e6230fe64 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 15:51:26 +0800
Subject: [PATCH 0722/1442] Support badge icon loading
---
Flow.Launcher/ResultListBox.xaml | 2 +-
Flow.Launcher/ViewModel/ResultViewModel.cs | 46 ++++++++++++++++++++--
2 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml
index 03bff03eb..63c461c43 100644
--- a/Flow.Launcher/ResultListBox.xaml
+++ b/Flow.Launcher/ResultListBox.xaml
@@ -145,7 +145,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
RenderOptions.BitmapScalingMode="Fant"
- Source="{Binding Image, TargetNullValue={x:Null}}"
+ Source="{Binding BadgeImage, TargetNullValue={x:Null}}"
Visibility="{Binding ShowBadge}" />
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index 61e228de1..4137d5f58 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -125,13 +125,21 @@ namespace Flow.Launcher.ViewModel
public Visibility ShowBadge
{
- get => Settings.ShowBadges ? Visibility.Visible : Visibility.Collapsed;
+ get
+ {
+ if (Settings.ShowBadges && BadgeIconAvailable)
+ return Visibility.Visible;
+
+ return Visibility.Collapsed;
+ }
}
private bool GlyphAvailable => Glyph is not null;
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPath) || Result.Icon is not null;
+ private bool BadgeIconAvailable => !string.IsNullOrEmpty(Result.BadgeIcoPath) || Result.BadgeIcon is not null;
+
private bool PreviewImageAvailable => !string.IsNullOrEmpty(Result.Preview.PreviewImagePath) || Result.Preview.PreviewDelegate != null;
public string OpenResultModifiers => Settings.OpenResultModifiers;
@@ -145,9 +153,11 @@ namespace Flow.Launcher.ViewModel
: Result.SubTitleToolTip;
private volatile bool _imageLoaded;
+ private volatile bool _badgeImageLoaded;
private volatile bool _previewImageLoaded;
private ImageSource _image = ImageLoader.LoadingImage;
+ private ImageSource _badgeImage = ImageLoader.LoadingImage;
private ImageSource _previewImage = ImageLoader.LoadingImage;
public ImageSource Image
@@ -165,6 +175,21 @@ namespace Flow.Launcher.ViewModel
private set => _image = value;
}
+ public ImageSource BadgeImage
+ {
+ get
+ {
+ if (!_badgeImageLoaded)
+ {
+ _badgeImageLoaded = true;
+ _ = LoadBadgeImageAsync();
+ }
+
+ return _badgeImage;
+ }
+ private set => _badgeImage = value;
+ }
+
public ImageSource PreviewImage
{
get
@@ -210,7 +235,7 @@ namespace Flow.Launcher.ViewModel
{
var imagePath = Result.IcoPath;
var iconDelegate = Result.Icon;
- if (ImageLoader.TryGetValue(imagePath, false, out ImageSource img))
+ if (ImageLoader.TryGetValue(imagePath, false, out var img))
{
_image = img;
}
@@ -221,11 +246,26 @@ namespace Flow.Launcher.ViewModel
}
}
+ private async Task LoadBadgeImageAsync()
+ {
+ var badgeImagePath = Result.BadgeIcoPath;
+ var badgeIconDelegate = Result.BadgeIcon;
+ if (ImageLoader.TryGetValue(badgeImagePath, false, out var img))
+ {
+ _badgeImage = img;
+ }
+ else
+ {
+ // We need to modify the property not field here to trigger the OnPropertyChanged event
+ BadgeImage = await LoadImageInternalAsync(badgeImagePath, badgeIconDelegate, false).ConfigureAwait(false);
+ }
+ }
+
private async Task LoadPreviewImageAsync()
{
var imagePath = Result.Preview.PreviewImagePath ?? Result.IcoPath;
var iconDelegate = Result.Preview.PreviewDelegate ?? Result.Icon;
- if (ImageLoader.TryGetValue(imagePath, true, out ImageSource img))
+ if (ImageLoader.TryGetValue(imagePath, true, out var img))
{
_previewImage = img;
}
From 01f896a57844184fb24e883fe5939c9689d96403 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 16:11:39 +0800
Subject: [PATCH 0723/1442] Support global query only
---
.../UserSettings/Settings.cs | 1 +
Flow.Launcher/Languages/en.xaml | 2 ++
.../SettingPages/Views/SettingsPaneTheme.xaml | 23 ++++++++++++++-----
Flow.Launcher/ViewModel/ResultViewModel.cs | 11 ++++++---
4 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index d97a9ed1a..7c2457a72 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -102,6 +102,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseSound { get; set; } = true;
public double SoundVolume { get; set; } = 50;
public bool ShowBadges { get; set; } = false;
+ public bool ShowBadgesGlobalOnly { get; set; } = false;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 66721d828..87db45fbe 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -285,6 +285,8 @@
Press KeyShow Result BadgesShow badges for query results where supported
+ Show Result Badges Only for Global Query
+ Show badges only for global query resultsHTTP Proxy
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 574002a05..57c9a5b70 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -711,16 +711,27 @@
-
-
-
+
+
+
+
+
+
+
Result.OriginQuery.ActionKeyword == Query.GlobalPluginWildcardSign;
+
private bool GlyphAvailable => Glyph is not null;
private bool ImgIconAvailable => !string.IsNullOrEmpty(Result.IcoPath) || Result.Icon is not null;
From e6477e886b3e3589727fa8481dd92a98a6206df4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 16:13:55 +0800
Subject: [PATCH 0724/1442] Fix global query determination issue
---
Flow.Launcher/ViewModel/MainViewModel.cs | 6 +++---
Flow.Launcher/ViewModel/ResultViewModel.cs | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 2155f7bf8..f6b9aa67c 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1208,11 +1208,11 @@ namespace Flow.Launcher.ViewModel
_lastQuery = query;
- if (query.ActionKeyword == Plugin.Query.GlobalPluginWildcardSign)
+ if (string.IsNullOrEmpty(query.ActionKeyword))
{
- // Wait 45 millisecond for query change in global query
+ // Wait 15 millisecond for query change in global query
// if query changes, return so that it won't be calculated
- await Task.Delay(45, _updateSource.Token);
+ await Task.Delay(15, _updateSource.Token);
if (_updateSource.Token.IsCancellationRequested)
return;
}
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index 27b385805..68c794aec 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Drawing.Text;
using System.IO;
@@ -137,7 +138,7 @@ namespace Flow.Launcher.ViewModel
}
}
- public bool IsGlobalQuery => Result.OriginQuery.ActionKeyword == Query.GlobalPluginWildcardSign;
+ public bool IsGlobalQuery => string.IsNullOrEmpty(Result.OriginQuery.ActionKeyword);
private bool GlyphAvailable => Glyph is not null;
From 8aff3c9f2ae49358d59760675c4ab552da865ad4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 16:14:23 +0800
Subject: [PATCH 0725/1442] Improve strings
---
Flow.Launcher/Languages/en.xaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 87db45fbe..024258f1b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -285,8 +285,8 @@
Press KeyShow Result BadgesShow badges for query results where supported
- Show Result Badges Only for Global Query
- Show badges only for global query results
+ Show Result Badges for Global Query Only
+ Show badges for global query results onlyHTTP Proxy
From c1893366982d2f7d729a0cbdca6363c1d5b1218c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 16:46:45 +0800
Subject: [PATCH 0726/1442] Fix possible directory not found issue when saving
storage
---
Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs | 3 ++-
Flow.Launcher.Infrastructure/Storage/JsonStorage.cs | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 43bb8dade..414743d22 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -82,8 +82,8 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Save()
{
+ FilesFolders.ValidateDirectory(DirectoryPath); // User may delete the directory, so we need to check it
var serialized = MemoryPackSerializer.Serialize(Data);
-
File.WriteAllBytes(FilePath, serialized);
}
@@ -103,6 +103,7 @@ namespace Flow.Launcher.Infrastructure.Storage
// so we need to pass it to SaveAsync
public async ValueTask SaveAsync(T data)
{
+ FilesFolders.ValidateDirectory(DirectoryPath); // User may delete the directory, so we need to check it
await using var stream = new FileStream(FilePath, FileMode.Create);
await MemoryPackSerializer.SerializeAsync(stream, data);
}
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index cdf3ae909..f283be59e 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -183,7 +183,10 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Save()
{
- string serialized = JsonSerializer.Serialize(Data,
+ // User may delete the directory, so we need to check it
+ FilesFolders.ValidateDirectory(DirectoryPath);
+
+ var serialized = JsonSerializer.Serialize(Data,
new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText(TempFilePath, serialized);
@@ -193,6 +196,9 @@ namespace Flow.Launcher.Infrastructure.Storage
public async Task SaveAsync()
{
+ // User may delete the directory, so we need to check it
+ FilesFolders.ValidateDirectory(DirectoryPath);
+
await using var tempOutput = File.OpenWrite(TempFilePath);
await JsonSerializer.SerializeAsync(tempOutput, Data,
new JsonSerializerOptions { WriteIndented = true });
From 5c43dd45b236c6074f63dc314f0d3668c1653e09 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 16:48:02 +0800
Subject: [PATCH 0727/1442] Code quality
---
Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 414743d22..b85111756 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -82,7 +82,9 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Save()
{
- FilesFolders.ValidateDirectory(DirectoryPath); // User may delete the directory, so we need to check it
+ // User may delete the directory, so we need to check it
+ FilesFolders.ValidateDirectory(DirectoryPath);
+
var serialized = MemoryPackSerializer.Serialize(Data);
File.WriteAllBytes(FilePath, serialized);
}
@@ -103,7 +105,9 @@ namespace Flow.Launcher.Infrastructure.Storage
// so we need to pass it to SaveAsync
public async ValueTask SaveAsync(T data)
{
- FilesFolders.ValidateDirectory(DirectoryPath); // User may delete the directory, so we need to check it
+ // User may delete the directory, so we need to check it
+ FilesFolders.ValidateDirectory(DirectoryPath);
+
await using var stream = new FileStream(FilePath, FileMode.Create);
await MemoryPackSerializer.SerializeAsync(stream, data);
}
From e6377d046348058c1b32cb2905960747468a5101 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 18:40:03 +0800
Subject: [PATCH 0728/1442] Fix old Program plugin constructor issue
---
.../Storage/BinaryStorage.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index b85111756..64f809181 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System;
+using System.IO;
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -40,6 +41,16 @@ namespace Flow.Launcher.Infrastructure.Storage
FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
}
+ // Let the old Program plugin get this constructor
+ [Obsolete("This constructor is obsolete. Use BinaryStorage(string filename) instead.")]
+ public BinaryStorage(string filename, string directoryPath = null!)
+ {
+ directoryPath ??= DataLocation.CacheDirectory;
+ FilesFolders.ValidateDirectory(directoryPath);
+
+ FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
+ }
+
public async ValueTask TryLoadAsync(T defaultData)
{
if (Data != null) return Data;
From 3aa324d1201a79f7bdb05e21b22775fa85195b6f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 21:52:51 +0800
Subject: [PATCH 0729/1442] Throw plugin exception for plugin save interface
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 29d91dc8d..94519bf6f 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -64,7 +64,14 @@ namespace Flow.Launcher.Core.Plugin
foreach (var plugin in AllPlugins)
{
var savable = plugin.Plugin as ISavable;
- savable?.Save();
+ try
+ {
+ savable?.Save();
+ }
+ catch (Exception e)
+ {
+ throw new FlowPluginException(plugin.Metadata, e);
+ }
}
API.SavePluginSettings();
From bae0fa5c0e128538caf71943407088125289085b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 22:00:36 +0800
Subject: [PATCH 0730/1442] Improve code quality
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 8 ++++----
.../Resource/Internationalization.cs | 17 ++++++++---------
Flow.Launcher/PublicAPIInstance.cs | 14 ++++++++------
3 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 94519bf6f..1d13dcfd3 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -37,7 +37,7 @@ namespace Flow.Launcher.Core.Plugin
private static PluginsSettings Settings;
private static List _metadatas;
- private static List _modifiedPlugins = new();
+ private static readonly List _modifiedPlugins = new();
///
/// Directories that will hold Flow Launcher plugin directory
@@ -299,7 +299,7 @@ namespace Flow.Launcher.Core.Plugin
{
Title = $"{metadata.Name}: Failed to respond!",
SubTitle = "Select this result for more info",
- IcoPath = Flow.Launcher.Infrastructure.Constant.ErrorIcon,
+ IcoPath = Constant.ErrorIcon,
PluginDirectory = metadata.PluginDirectory,
ActionKeywordAssigned = query.ActionKeyword,
PluginID = metadata.ID,
@@ -376,8 +376,8 @@ namespace Flow.Launcher.Core.Plugin
{
// this method is only checking for action keywords (defined as not '*') registration
// hence the actionKeyword != Query.GlobalPluginWildcardSign logic
- return actionKeyword != Query.GlobalPluginWildcardSign
- && NonGlobalPlugins.ContainsKey(actionKeyword);
+ return actionKeyword != Query.GlobalPluginWildcardSign
+ && NonGlobalPlugins.ContainsKey(actionKeyword);
}
///
diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs
index ffa17ab4d..df841dbbe 100644
--- a/Flow.Launcher.Core/Resource/Internationalization.cs
+++ b/Flow.Launcher.Core/Resource/Internationalization.cs
@@ -22,8 +22,8 @@ namespace Flow.Launcher.Core.Resource
private const string DefaultFile = "en.xaml";
private const string Extension = ".xaml";
private readonly Settings _settings;
- private readonly List _languageDirectories = new List();
- private readonly List _oldResources = new List();
+ private readonly List _languageDirectories = new();
+ private readonly List _oldResources = new();
private readonly string SystemLanguageCode;
public Internationalization(Settings settings)
@@ -144,7 +144,7 @@ namespace Flow.Launcher.Core.Resource
_settings.Language = isSystem ? Constant.SystemLanguageCode : language.LanguageCode;
}
- private Language GetLanguageByLanguageCode(string languageCode)
+ private static Language GetLanguageByLanguageCode(string languageCode)
{
var lowercase = languageCode.ToLower();
var language = AvailableLanguages.GetAvailableLanguages().FirstOrDefault(o => o.LanguageCode.ToLower() == lowercase);
@@ -239,7 +239,7 @@ namespace Flow.Launcher.Core.Resource
return list;
}
- public string GetTranslation(string key)
+ public static string GetTranslation(string key)
{
var translation = Application.Current.TryFindResource(key);
if (translation is string)
@@ -257,8 +257,7 @@ namespace Flow.Launcher.Core.Resource
{
foreach (var p in PluginManager.GetPluginsForInterface())
{
- var pluginI18N = p.Plugin as IPluginI18n;
- if (pluginI18N == null) return;
+ if (p.Plugin is not IPluginI18n pluginI18N) return;
try
{
p.Metadata.Name = pluginI18N.GetTranslatedPluginTitle();
@@ -272,11 +271,11 @@ namespace Flow.Launcher.Core.Resource
}
}
- public string LanguageFile(string folder, string language)
+ private static string LanguageFile(string folder, string language)
{
if (Directory.Exists(folder))
{
- string path = Path.Combine(folder, language);
+ var path = Path.Combine(folder, language);
if (File.Exists(path))
{
return path;
@@ -284,7 +283,7 @@ namespace Flow.Launcher.Core.Resource
else
{
Log.Error($"|Internationalization.LanguageFile|Language path can't be found <{path}>");
- string english = Path.Combine(folder, DefaultFile);
+ var english = Path.Combine(folder, DefaultFile);
if (File.Exists(english))
{
return english;
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 95ef6c9f3..5438eac7d 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -38,20 +38,23 @@ namespace Flow.Launcher
public class PublicAPIInstance : IPublicAPI, IRemovable
{
private readonly Settings _settings;
- private readonly Internationalization _translater;
private readonly MainViewModel _mainVM;
+ // Must use getter to access Application.Current.Resources.MergedDictionaries so earlier
private Theme _theme;
private Theme Theme => _theme ??= Ioc.Default.GetRequiredService();
+ // Must use getter to avoid circular dependency
+ private Updater _updater;
+ private Updater Updater => _updater ??= Ioc.Default.GetRequiredService();
+
private readonly object _saveSettingsLock = new();
#region Constructor
- public PublicAPIInstance(Settings settings, Internationalization translater, MainViewModel mainVM)
+ public PublicAPIInstance(Settings settings, MainViewModel mainVM)
{
_settings = settings;
- _translater = translater;
_mainVM = mainVM;
GlobalHotkey.hookedKeyboardCallback = KListener_hookedKeyboardCallback;
WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
@@ -100,8 +103,7 @@ namespace Flow.Launcher
remove => _mainVM.VisibilityChanged -= value;
}
- // Must use Ioc.Default.GetRequiredService() to avoid circular dependency
- public void CheckForNewUpdate() => _ = Ioc.Default.GetRequiredService().UpdateAppAsync(false);
+ public void CheckForNewUpdate() => _ = Updater.UpdateAppAsync(false);
public void SaveAppAllSettings()
{
@@ -178,7 +180,7 @@ namespace Flow.Launcher
public void StopLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Collapsed;
- public string GetTranslation(string key) => _translater.GetTranslation(key);
+ public string GetTranslation(string key) => Internationalization.GetTranslation(key);
public List GetAllPlugins() => PluginManager.AllPlugins.ToList();
From 526f00261d2ccf9a148aec46d92708affef2e4d4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 22:02:03 +0800
Subject: [PATCH 0731/1442] Throw plugin exception for plugin dispose interface
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 1d13dcfd3..f8a094575 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -88,14 +88,21 @@ namespace Flow.Launcher.Core.Plugin
private static async Task DisposePluginAsync(PluginPair pluginPair)
{
- switch (pluginPair.Plugin)
+ try
{
- case IDisposable disposable:
- disposable.Dispose();
- break;
- case IAsyncDisposable asyncDisposable:
- await asyncDisposable.DisposeAsync();
- break;
+ switch (pluginPair.Plugin)
+ {
+ case IDisposable disposable:
+ disposable.Dispose();
+ break;
+ case IAsyncDisposable asyncDisposable:
+ await asyncDisposable.DisposeAsync();
+ break;
+ }
+ }
+ catch (Exception e)
+ {
+ throw new FlowPluginException(pluginPair.Metadata, e);
}
}
From deb22ad0fe02820dcdfe6431793e7ee9ecdf1d75 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 22:05:04 +0800
Subject: [PATCH 0732/1442] Set CanClose earlier
---
Flow.Launcher/MainWindow.xaml.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 30afe67a1..bf7a45b1d 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -291,15 +291,15 @@ namespace Flow.Launcher
{
if (!CanClose)
{
+ CanClose = true;
_notifyIcon.Visible = false;
App.API.SaveAppAllSettings();
e.Cancel = true;
await ImageLoader.WaitSaveAsync();
await PluginManager.DisposePluginsAsync();
Notification.Uninstall();
- // After plugins are all disposed, we can close the main window
- CanClose = true;
- // Use this instead of Close() to avoid InvalidOperationException when calling Close() in OnClosing event
+ // After plugins are all disposed, we shutdown application to close app
+ // We use this instead of Close() to avoid InvalidOperationException when calling Close() in OnClosing event
Application.Current.Shutdown();
}
}
From 58c3b73ff7d65078185e7072fbac379fc823021a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 22:13:58 +0800
Subject: [PATCH 0733/1442] Fix directory path issue
---
Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs | 6 +++---
.../Storage/FlowLauncherJsonStorage.cs | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 64f809181..8ff10816c 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -45,10 +45,10 @@ namespace Flow.Launcher.Infrastructure.Storage
[Obsolete("This constructor is obsolete. Use BinaryStorage(string filename) instead.")]
public BinaryStorage(string filename, string directoryPath = null!)
{
- directoryPath ??= DataLocation.CacheDirectory;
- FilesFolders.ValidateDirectory(directoryPath);
+ DirectoryPath = directoryPath ?? DataLocation.CacheDirectory;
+ FilesFolders.ValidateDirectory(DirectoryPath);
- FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
+ FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
}
public async ValueTask TryLoadAsync(T defaultData)
diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
index 8b4062b6b..ca78b2f20 100644
--- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
@@ -17,11 +17,11 @@ namespace Flow.Launcher.Infrastructure.Storage
public FlowLauncherJsonStorage()
{
- var directoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
- FilesFolders.ValidateDirectory(directoryPath);
+ DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
+ FilesFolders.ValidateDirectory(DirectoryPath);
var filename = typeof(T).Name;
- FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
+ FilePath = Path.Combine(DirectoryPath, $"{filename}{FileSuffix}");
}
public new void Save()
From 4527b334331a64b8ede630e84447de438f83cf5d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 11 Apr 2025 22:16:04 +0800
Subject: [PATCH 0734/1442] Code quality
---
Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
index 1de5841a5..6c506cfc0 100644
--- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
+++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
@@ -264,12 +264,12 @@ namespace Flow.Launcher.Plugin.SharedCommands
var index = path.LastIndexOf('\\');
if (index > 0 && index < (path.Length - 1))
{
- string previousDirectoryPath = path.Substring(0, index + 1);
- return locationExists(previousDirectoryPath) ? previousDirectoryPath : "";
+ string previousDirectoryPath = path[..(index + 1)];
+ return locationExists(previousDirectoryPath) ? previousDirectoryPath : string.Empty;
}
else
{
- return "";
+ return string.Empty;
}
}
@@ -285,7 +285,7 @@ namespace Flow.Launcher.Plugin.SharedCommands
// not full path, get previous level directory string
var indexOfSeparator = path.LastIndexOf('\\');
- return path.Substring(0, indexOfSeparator + 1);
+ return path[..(indexOfSeparator + 1)];
}
return path;
From c66cbae78bfa96ecbec3a627ac40bed4d2b442ca Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 12 Apr 2025 00:56:07 +0900
Subject: [PATCH 0735/1442] - Adjust Badge layout - Fix glyph margin in
win11light
---
Flow.Launcher/ResultListBox.xaml | 15 +++++----------
Flow.Launcher/Themes/Win11Light.xaml | 4 ++--
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml
index 63c461c43..8231027f4 100644
--- a/Flow.Launcher/ResultListBox.xaml
+++ b/Flow.Launcher/ResultListBox.xaml
@@ -102,8 +102,6 @@
+
+
-
+
-
+
From f8d82f3f9b5388bf22b2eb3ea93ec9f38fee6c77 Mon Sep 17 00:00:00 2001
From: DB P
Date: Sat, 12 Apr 2025 08:57:04 +0900
Subject: [PATCH 0736/1442] Change default query font size Change
showPlaceholder to true from false
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index e304a1b50..e1c6fbd1f 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -82,7 +82,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/* Appearance Settings. It should be separated from the setting later.*/
public double WindowHeightSize { get; set; } = 42;
public double ItemHeightSize { get; set; } = 58;
- public double QueryBoxFontSize { get; set; } = 20;
+ public double QueryBoxFontSize { get; set; } = 18;
public double ResultItemFontSize { get; set; } = 16;
public double ResultSubItemFontSize { get; set; } = 13;
public string QueryBoxFont { get; set; } = FontFamily.GenericSansSerif.Name;
@@ -114,7 +114,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public double? SettingWindowLeft { get; set; } = null;
public WindowState SettingWindowState { get; set; } = WindowState.Normal;
- bool _showPlaceholder { get; set; } = false;
+ bool _showPlaceholder { get; set; } = true;
public bool ShowPlaceholder
{
get => _showPlaceholder;
From 6b9c9e9eb7451dd195f7d519126b528740474161 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 12 Apr 2025 08:08:26 +0800
Subject: [PATCH 0737/1442] Log exception instead of throw exception
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index f8a094575..52d6fd736 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -61,16 +61,16 @@ namespace Flow.Launcher.Core.Plugin
///
public static void Save()
{
- foreach (var plugin in AllPlugins)
+ foreach (var pluginPair in AllPlugins)
{
- var savable = plugin.Plugin as ISavable;
+ var savable = pluginPair.Plugin as ISavable;
try
{
savable?.Save();
}
catch (Exception e)
{
- throw new FlowPluginException(plugin.Metadata, e);
+ API.LogException(ClassName, $"Failed to save plugin {pluginPair.Metadata.Name}", e);
}
}
@@ -102,7 +102,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- throw new FlowPluginException(pluginPair.Metadata, e);
+ API.LogException(ClassName, $"Failed to dispose plugin {pluginPair.Metadata.Name}", e);
}
}
From eaac72b6969f59e975a571ea1c00ccf7945c577b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 12 Apr 2025 10:52:59 +0800
Subject: [PATCH 0738/1442] Handle TaskSchedulerUnhandledException
---
Flow.Launcher/App.xaml.cs | 10 ++++++++++
Flow.Launcher/Helper/ErrorReporting.cs | 9 +++++++++
2 files changed, 19 insertions(+)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 89faa105e..a9cd1a8b9 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -153,6 +153,7 @@ namespace Flow.Launcher
RegisterAppDomainExceptions();
RegisterDispatcherUnhandledException();
+ RegisterTaskSchedulerUnhandledException();
var imageLoadertask = ImageLoader.InitializeAsync();
@@ -284,6 +285,15 @@ namespace Flow.Launcher
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
}
+ ///
+ /// let exception throw as normal is better for Debug
+ ///
+ [Conditional("RELEASE")]
+ private static void RegisterTaskSchedulerUnhandledException()
+ {
+ TaskScheduler.UnobservedTaskException += ErrorReporting.TaskSchedulerUnobservedTaskException;
+ }
+
#endregion
#region IDisposable
diff --git a/Flow.Launcher/Helper/ErrorReporting.cs b/Flow.Launcher/Helper/ErrorReporting.cs
index 5b79c520d..1787b1d91 100644
--- a/Flow.Launcher/Helper/ErrorReporting.cs
+++ b/Flow.Launcher/Helper/ErrorReporting.cs
@@ -1,4 +1,5 @@
using System;
+using System.Threading.Tasks;
using System.Windows.Threading;
using NLog;
using Flow.Launcher.Infrastructure;
@@ -30,6 +31,14 @@ public static class ErrorReporting
e.Handled = true;
}
+ public static void TaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
+ {
+ //handle unobserved task exceptions
+ Report(e.Exception);
+ //prevent application exist, so the user can copy prompted error info
+ e.SetObserved();
+ }
+
public static string RuntimeInfo()
{
var info =
From 6264447057adcabf96773e09bbd0bff0b51fdcab Mon Sep 17 00:00:00 2001
From: DB P
Date: Sat, 12 Apr 2025 12:45:40 +0900
Subject: [PATCH 0739/1442] Change theme reset value
---
.../SettingPages/ViewModels/SettingsPaneThemeViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index f78704ef2..aa8ab7c4c 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -494,7 +494,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
{
SelectedQueryBoxFont = new FontFamily(DefaultFont);
SelectedQueryBoxFontFaces = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
- QueryBoxFontSize = 20;
+ QueryBoxFontSize = 18;
SelectedResultFont = new FontFamily(DefaultFont);
SelectedResultFontFaces = new FamilyTypeface { Stretch = FontStretches.Normal, Weight = FontWeights.Normal, Style = FontStyles.Normal };
From 1b8336bd266e0763cbef20707fe4402e57757bf7 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 12 Apr 2025 14:05:03 +0900
Subject: [PATCH 0740/1442] Adjust Theme Color
---
Flow.Launcher/Resources/Light.xaml | 4 ++--
Flow.Launcher/Themes/Circle System.xaml | 4 ++--
Flow.Launcher/Themes/Win11Light.xaml | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher/Resources/Light.xaml b/Flow.Launcher/Resources/Light.xaml
index aaa23c8e2..f6a5444b3 100644
--- a/Flow.Launcher/Resources/Light.xaml
+++ b/Flow.Launcher/Resources/Light.xaml
@@ -18,9 +18,9 @@
- #0C000000
+ #7EFFFFFF
-
+
diff --git a/Flow.Launcher/Themes/Circle System.xaml b/Flow.Launcher/Themes/Circle System.xaml
index 24c7bd65b..9fb43b645 100644
--- a/Flow.Launcher/Themes/Circle System.xaml
+++ b/Flow.Launcher/Themes/Circle System.xaml
@@ -14,8 +14,8 @@
TrueAuto
- #E5E6E6E6
- #DF1F1F1F
+ #CEFAFAFA
+ #D6202020
@@ -68,6 +68,7 @@
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
+
@@ -75,6 +76,7 @@
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
+
@@ -84,7 +86,7 @@
TargetType="{x:Type Rectangle}">
-
+ #d6d4d7
@@ -113,7 +117,7 @@
+
+
+
64 0 4 0
@@ -172,7 +192,7 @@
BasedOn="{StaticResource ClockPanel}"
TargetType="{x:Type StackPanel}">
-
+
@@ -206,7 +226,7 @@
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
-
+
-
+
@@ -59,7 +59,7 @@
-
+
@@ -79,7 +79,9 @@
+ TargetType="{x:Type Line}">
+
+
+
-
+
From 0d9ec48e589f629541e81de131a69a19bbf078ea Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 16:36:34 +0800
Subject: [PATCH 0766/1442] Code quality
---
.../ExternalPlugins/CommunityPluginSource.cs | 12 ++++++------
Flow.Launcher.Infrastructure/Http/Http.cs | 7 +++----
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
index e9713564e..27891a2d4 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
@@ -19,7 +19,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
private List plugins = new();
- private static JsonSerializerOptions PluginStoreItemSerializationOption = new JsonSerializerOptions()
+ private static readonly JsonSerializerOptions PluginStoreItemSerializationOption = new()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
};
@@ -45,18 +45,18 @@ namespace Flow.Launcher.Core.ExternalPlugins
if (response.StatusCode == HttpStatusCode.OK)
{
- this.plugins = await response.Content
+ plugins = await response.Content
.ReadFromJsonAsync>(PluginStoreItemSerializationOption, cancellationToken: token)
.ConfigureAwait(false);
- this.latestEtag = response.Headers.ETag?.Tag;
+ latestEtag = response.Headers.ETag?.Tag;
- Log.Info(nameof(CommunityPluginSource), $"Loaded {this.plugins.Count} plugins from {ManifestFileUrl}");
- return this.plugins;
+ Log.Info(nameof(CommunityPluginSource), $"Loaded {plugins.Count} plugins from {ManifestFileUrl}");
+ return plugins;
}
else if (response.StatusCode == HttpStatusCode.NotModified)
{
Log.Info(nameof(CommunityPluginSource), $"Resource {ManifestFileUrl} has not been modified.");
- return this.plugins;
+ return plugins;
}
else
{
diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs
index 030aff7cf..0f2f302f1 100644
--- a/Flow.Launcher.Infrastructure/Http/Http.cs
+++ b/Flow.Launcher.Infrastructure/Http/Http.cs
@@ -16,15 +16,14 @@ namespace Flow.Launcher.Infrastructure.Http
{
private const string UserAgent = @"Mozilla/5.0 (Trident/7.0; rv:11.0) like Gecko";
- private static HttpClient client = new HttpClient();
+ private static readonly HttpClient client = new();
static Http()
{
// need to be added so it would work on a win10 machine
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls
- | SecurityProtocolType.Tls11
- | SecurityProtocolType.Tls12;
+ | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
client.DefaultRequestHeaders.Add("User-Agent", UserAgent);
HttpClient.DefaultProxy = WebProxy;
@@ -72,7 +71,7 @@ namespace Flow.Launcher.Infrastructure.Http
ProxyProperty.Port => (new Uri($"http://{Proxy.Server}:{Proxy.Port}"), WebProxy.Credentials),
ProxyProperty.UserName => (WebProxy.Address, new NetworkCredential(Proxy.UserName, Proxy.Password)),
ProxyProperty.Password => (WebProxy.Address, new NetworkCredential(Proxy.UserName, Proxy.Password)),
- _ => throw new ArgumentOutOfRangeException()
+ _ => throw new ArgumentOutOfRangeException(null)
};
}
catch (UriFormatException e)
From 230df80b877549ac72ef93f76b88f495fcd0d83f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 16:44:14 +0800
Subject: [PATCH 0767/1442] Improve CommunityPluginSource http exception
handler
---
.../ExternalPlugins/CommunityPluginSource.cs | 54 ++++++++++++-------
Flow.Launcher.Core/Updater.cs | 6 ++-
2 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
index 27891a2d4..dd79fbc7a 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Http.Json;
+using System.Net.Sockets;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
@@ -15,6 +16,8 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
public record CommunityPluginSource(string ManifestFileUrl)
{
+ private static readonly string ClassName = nameof(CommunityPluginSource);
+
private string latestEtag = "";
private List plugins = new();
@@ -34,36 +37,51 @@ namespace Flow.Launcher.Core.ExternalPlugins
///
public async Task> FetchAsync(CancellationToken token)
{
- Log.Info(nameof(CommunityPluginSource), $"Loading plugins from {ManifestFileUrl}");
+ Log.Info(ClassName, $"Loading plugins from {ManifestFileUrl}");
var request = new HttpRequestMessage(HttpMethod.Get, ManifestFileUrl);
request.Headers.Add("If-None-Match", latestEtag);
- using var response = await Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token)
+ try
+ {
+ using var response = await Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token)
.ConfigureAwait(false);
- if (response.StatusCode == HttpStatusCode.OK)
- {
- plugins = await response.Content
- .ReadFromJsonAsync>(PluginStoreItemSerializationOption, cancellationToken: token)
- .ConfigureAwait(false);
- latestEtag = response.Headers.ETag?.Tag;
+ if (response.StatusCode == HttpStatusCode.OK)
+ {
+ plugins = await response.Content
+ .ReadFromJsonAsync>(PluginStoreItemSerializationOption, cancellationToken: token)
+ .ConfigureAwait(false);
+ latestEtag = response.Headers.ETag?.Tag;
- Log.Info(nameof(CommunityPluginSource), $"Loaded {plugins.Count} plugins from {ManifestFileUrl}");
- return plugins;
+ Log.Info(ClassName, $"Loaded {plugins.Count} plugins from {ManifestFileUrl}");
+ return plugins;
+ }
+ else if (response.StatusCode == HttpStatusCode.NotModified)
+ {
+ Log.Info(ClassName, $"Resource {ManifestFileUrl} has not been modified.");
+ return plugins;
+ }
+ else
+ {
+ Log.Warn(ClassName,
+ $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
+ return plugins;
+ }
}
- else if (response.StatusCode == HttpStatusCode.NotModified)
+ catch (Exception e)
{
- Log.Info(nameof(CommunityPluginSource), $"Resource {ManifestFileUrl} has not been modified.");
+ if (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
+ {
+ Log.Exception(ClassName, $"Check your connection and proxy settings to {ManifestFileUrl}.", e);
+ }
+ else
+ {
+ Log.Exception(ClassName, "Error Occurred", e);
+ }
return plugins;
}
- else
- {
- Log.Warn(nameof(CommunityPluginSource),
- $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
- throw new Exception($"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
- }
}
}
}
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index 83d4fd9e0..f018bdfc7 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -93,10 +93,14 @@ namespace Flow.Launcher.Core
}
catch (Exception e)
{
- if ((e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException))
+ if (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
+ {
Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
+ }
else
+ {
Log.Exception($"|Updater.UpdateApp|Error Occurred", e);
+ }
if (!silentUpdate)
_api.ShowMsg(_api.GetTranslation("update_flowlauncher_fail"),
From e31f14e60d94ab655513d9b7d962d6b9570b0f69 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:11:36 +0800
Subject: [PATCH 0768/1442] Use local reference instead
---
Flow.Launcher.Infrastructure/Http/Http.cs | 26 ++++++++++---------
.../Image/ImageLoader.cs | 21 ++++++---------
Flow.Launcher.Infrastructure/Logger/Log.cs | 6 -----
Flow.Launcher.Infrastructure/Stopwatch.cs | 21 +++++++--------
.../Storage/BinaryStorage.cs | 6 +++--
.../Storage/FlowLauncherJsonStorage.cs | 11 +++-----
.../Storage/JsonStorage.cs | 4 ++-
.../Storage/PluginBinaryStorage.cs | 11 +++-----
.../Storage/PluginJsonStorage.cs | 11 +++-----
9 files changed, 47 insertions(+), 70 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs
index 0f2f302f1..12edf34a4 100644
--- a/Flow.Launcher.Infrastructure/Http/Http.cs
+++ b/Flow.Launcher.Infrastructure/Http/Http.cs
@@ -1,19 +1,21 @@
-using System.IO;
+using System;
+using System.IO;
using System.Net;
using System.Net.Http;
+using System.Threading;
using System.Threading.Tasks;
-using JetBrains.Annotations;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
-using System;
-using System.Threading;
using Flow.Launcher.Plugin;
-using CommunityToolkit.Mvvm.DependencyInjection;
+using JetBrains.Annotations;
namespace Flow.Launcher.Infrastructure.Http
{
public static class Http
{
+ private static readonly string ClassName = nameof(Http);
+
private const string UserAgent = @"Mozilla/5.0 (Trident/7.0; rv:11.0) like Gecko";
private static readonly HttpClient client = new();
@@ -33,7 +35,7 @@ namespace Flow.Launcher.Infrastructure.Http
public static HttpProxy Proxy
{
- private get { return proxy; }
+ private get => proxy;
set
{
proxy = value;
@@ -77,7 +79,7 @@ namespace Flow.Launcher.Infrastructure.Http
catch (UriFormatException e)
{
Ioc.Default.GetRequiredService().ShowMsg("Please try again", "Unable to parse Http Proxy");
- Log.Exception("Flow.Launcher.Infrastructure.Http", "Unable to parse Uri", e);
+ Log.Exception(ClassName, "Unable to parse Uri", e);
}
}
@@ -133,7 +135,7 @@ namespace Flow.Launcher.Infrastructure.Http
}
catch (HttpRequestException e)
{
- Log.Exception("Infrastructure.Http", "Http Request Error", e, "DownloadAsync");
+ Log.Exception(ClassName, "Http Request Error", e, "DownloadAsync");
throw;
}
}
@@ -146,7 +148,7 @@ namespace Flow.Launcher.Infrastructure.Http
/// The Http result as string. Null if cancellation requested
public static Task GetAsync([NotNull] string url, CancellationToken token = default)
{
- Log.Debug($"|Http.Get|Url <{url}>");
+ Log.Debug(ClassName, $"Url <{url}>");
return GetAsync(new Uri(url), token);
}
@@ -158,7 +160,7 @@ namespace Flow.Launcher.Infrastructure.Http
/// The Http result as string. Null if cancellation requested
public static async Task GetAsync([NotNull] Uri url, CancellationToken token = default)
{
- Log.Debug($"|Http.Get|Url <{url}>");
+ Log.Debug(ClassName, $"Url <{url}>");
using var response = await client.GetAsync(url, token);
var content = await response.Content.ReadAsStringAsync(token);
if (response.StatusCode != HttpStatusCode.OK)
@@ -190,7 +192,7 @@ namespace Flow.Launcher.Infrastructure.Http
public static async Task GetStreamAsync([NotNull] Uri url,
CancellationToken token = default)
{
- Log.Debug($"|Http.Get|Url <{url}>");
+ Log.Debug(ClassName, $"Url <{url}>");
return await client.GetStreamAsync(url, token);
}
@@ -201,7 +203,7 @@ namespace Flow.Launcher.Infrastructure.Http
public static async Task GetResponseAsync([NotNull] Uri url, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
CancellationToken token = default)
{
- Log.Debug($"|Http.Get|Url <{url}>");
+ Log.Debug(ClassName, $"Url <{url}>");
return await client.GetAsync(url, completionOption, token);
}
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 9e31d2b4e..a49385a02 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -7,9 +7,8 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
-using Flow.Launcher.Plugin;
using SharpVectors.Converters;
using SharpVectors.Renderers.Wpf;
@@ -17,10 +16,6 @@ namespace Flow.Launcher.Infrastructure.Image
{
public static class ImageLoader
{
- // We should not initialize API in static constructor because it will create another API instance
- private static IPublicAPI api = null;
- private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
-
private static readonly string ClassName = nameof(ImageLoader);
private static readonly ImageCache ImageCache = new();
@@ -58,14 +53,14 @@ namespace Flow.Launcher.Infrastructure.Image
_ = Task.Run(async () =>
{
- await API.StopwatchLogInfoAsync(ClassName, "Preload images cost", async () =>
+ await Stopwatch.InfoAsync(ClassName, "Preload images cost", async () =>
{
foreach (var (path, isFullImage) in usage)
{
await LoadAsync(path, isFullImage);
}
});
- API.LogInfo(ClassName, $"Number of preload images is <{ImageCache.CacheSize()}>, Images Number: {ImageCache.CacheSize()}, Unique Items {ImageCache.UniqueImagesInCache()}");
+ Log.Info(ClassName, $"Number of preload images is <{ImageCache.CacheSize()}>, Images Number: {ImageCache.CacheSize()}, Unique Items {ImageCache.UniqueImagesInCache()}");
});
}
@@ -81,7 +76,7 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (System.Exception e)
{
- API.LogException(ClassName, "Failed to save image cache to file", e);
+ Log.Exception(ClassName, "Failed to save image cache to file", e);
}
finally
{
@@ -176,8 +171,8 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (System.Exception e2)
{
- API.LogException(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e);
- API.LogException(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2);
+ Log.Exception(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e);
+ Log.Exception(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2);
ImageSource image = ImageCache[Constant.MissingImgIcon, false];
ImageCache[path, false] = image;
@@ -243,7 +238,7 @@ namespace Flow.Launcher.Infrastructure.Image
{
image = Image;
type = ImageType.Error;
- API.LogException(ClassName, $"Failed to load image file from path {path}: {ex.Message}", ex);
+ Log.Exception(ClassName, $"Failed to load image file from path {path}: {ex.Message}", ex);
}
}
else
@@ -267,7 +262,7 @@ namespace Flow.Launcher.Infrastructure.Image
{
image = Image;
type = ImageType.Error;
- API.LogException(ClassName, $"Failed to load SVG image from path {path}: {ex.Message}", ex);
+ Log.Exception(ClassName, $"Failed to load SVG image from path {path}: {ex.Message}", ex);
}
}
else
diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs
index 807d631c7..25cfbbd3d 100644
--- a/Flow.Launcher.Infrastructure/Logger/Log.cs
+++ b/Flow.Launcher.Infrastructure/Logger/Log.cs
@@ -227,12 +227,6 @@ namespace Flow.Launcher.Infrastructure.Logger
{
LogInternal(LogLevel.Warn, className, message, methodName);
}
-
- /// Example: "|ClassName.MethodName|Message"
- public static void Warn(string message)
- {
- LogInternal(message, LogLevel.Warn);
- }
}
public enum LOGLEVEL
diff --git a/Flow.Launcher.Infrastructure/Stopwatch.cs b/Flow.Launcher.Infrastructure/Stopwatch.cs
index 784d323fe..870e0fe26 100644
--- a/Flow.Launcher.Infrastructure/Stopwatch.cs
+++ b/Flow.Launcher.Infrastructure/Stopwatch.cs
@@ -1,4 +1,5 @@
using System;
+using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure.Logger;
@@ -9,54 +10,50 @@ namespace Flow.Launcher.Infrastructure
///
/// This stopwatch will appear only in Debug mode
///
- public static long Debug(string message, Action action)
+ public static long Debug(string className, string message, Action action, [CallerMemberName] string methodName = "")
{
var stopWatch = new System.Diagnostics.Stopwatch();
stopWatch.Start();
action();
stopWatch.Stop();
var milliseconds = stopWatch.ElapsedMilliseconds;
- string info = $"{message} <{milliseconds}ms>";
- Log.Debug(info);
+ Log.Debug(className, $"{message} <{milliseconds}ms>", methodName);
return milliseconds;
}
///
/// This stopwatch will appear only in Debug mode
///
- public static async Task DebugAsync(string message, Func action)
+ public static async Task DebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "")
{
var stopWatch = new System.Diagnostics.Stopwatch();
stopWatch.Start();
await action();
stopWatch.Stop();
var milliseconds = stopWatch.ElapsedMilliseconds;
- string info = $"{message} <{milliseconds}ms>";
- Log.Debug(info);
+ Log.Debug(className, $"{message} <{milliseconds}ms>", methodName);
return milliseconds;
}
- public static long Normal(string message, Action action)
+ public static long Info(string className, string message, Action action, [CallerMemberName] string methodName = "")
{
var stopWatch = new System.Diagnostics.Stopwatch();
stopWatch.Start();
action();
stopWatch.Stop();
var milliseconds = stopWatch.ElapsedMilliseconds;
- string info = $"{message} <{milliseconds}ms>";
- Log.Info(info);
+ Log.Info(className, $"{message} <{milliseconds}ms>", methodName);
return milliseconds;
}
- public static async Task NormalAsync(string message, Func action)
+ public static async Task InfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "")
{
var stopWatch = new System.Diagnostics.Stopwatch();
stopWatch.Start();
await action();
stopWatch.Stop();
var milliseconds = stopWatch.ElapsedMilliseconds;
- string info = $"{message} <{milliseconds}ms>";
- Log.Info(info);
+ Log.Info(className, $"{message} <{milliseconds}ms>", methodName);
return milliseconds;
}
}
diff --git a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
index 8ff10816c..48e6b5523 100644
--- a/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/BinaryStorage.cs
@@ -20,6 +20,8 @@ namespace Flow.Launcher.Infrastructure.Storage
///
public class BinaryStorage : ISavable
{
+ private static readonly string ClassName = "BinaryStorage";
+
protected T? Data;
public const string FileSuffix = ".cache";
@@ -59,7 +61,7 @@ namespace Flow.Launcher.Infrastructure.Storage
{
if (new FileInfo(FilePath).Length == 0)
{
- Log.Error($"|BinaryStorage.TryLoad|Zero length cache file <{FilePath}>");
+ Log.Error(ClassName, $"Zero length cache file <{FilePath}>");
Data = defaultData;
await SaveAsync();
}
@@ -69,7 +71,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
else
{
- Log.Info("|BinaryStorage.TryLoad|Cache file not exist, load default data");
+ Log.Info(ClassName, "Cache file not exist, load default data");
Data = defaultData;
await SaveAsync();
}
diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
index ca78b2f20..158e0cdf5 100644
--- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs
@@ -1,8 +1,7 @@
using System.IO;
using System.Threading.Tasks;
-using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
@@ -11,10 +10,6 @@ namespace Flow.Launcher.Infrastructure.Storage
{
private static readonly string ClassName = "FlowLauncherJsonStorage";
- // We should not initialize API in static constructor because it will create another API instance
- private static IPublicAPI api = null;
- private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
-
public FlowLauncherJsonStorage()
{
DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
@@ -32,7 +27,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
}
}
@@ -44,7 +39,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save FL settings to path: {FilePath}", e);
}
}
}
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index f283be59e..0b10382ee 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -16,6 +16,8 @@ namespace Flow.Launcher.Infrastructure.Storage
///
public class JsonStorage : ISavable where T : new()
{
+ private static readonly string ClassName = "JsonStorage";
+
protected T? Data;
// need a new directory name
@@ -104,7 +106,7 @@ namespace Flow.Launcher.Infrastructure.Storage
private void RestoreBackup()
{
- Log.Info($"|JsonStorage.Load|Failed to load settings.json, {BackupFilePath} restored successfully");
+ Log.Info(ClassName, $"Failed to load settings.json, {BackupFilePath} restored successfully");
if (File.Exists(FilePath))
File.Replace(BackupFilePath, FilePath, null);
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
index d18060e3d..01da96d62 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs
@@ -1,7 +1,6 @@
using System.IO;
using System.Threading.Tasks;
-using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Plugin;
+using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
@@ -10,10 +9,6 @@ namespace Flow.Launcher.Infrastructure.Storage
{
private static readonly string ClassName = "PluginBinaryStorage";
- // We should not initialize API in static constructor because it will create another API instance
- private static IPublicAPI api = null;
- private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
-
public PluginBinaryStorage(string cacheName, string cacheDirectory)
{
DirectoryPath = cacheDirectory;
@@ -30,7 +25,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
}
}
@@ -42,7 +37,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save plugin caches to path: {FilePath}", e);
}
}
}
diff --git a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
index e8cbd70fb..147152949 100644
--- a/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs
@@ -1,8 +1,7 @@
using System.IO;
using System.Threading.Tasks;
-using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
namespace Flow.Launcher.Infrastructure.Storage
@@ -14,10 +13,6 @@ namespace Flow.Launcher.Infrastructure.Storage
private static readonly string ClassName = "PluginJsonStorage";
- // We should not initialize API in static constructor because it will create another API instance
- private static IPublicAPI api = null;
- private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
-
public PluginJsonStorage()
{
// C# related, add python related below
@@ -42,7 +37,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
}
}
@@ -54,7 +49,7 @@ namespace Flow.Launcher.Infrastructure.Storage
}
catch (System.Exception e)
{
- API.LogException(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
+ Log.Exception(ClassName, $"Failed to save plugin settings to path: {FilePath}", e);
}
}
}
From dde933a96b8372ab4d5bea0658c27e44172e7e0c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:26:21 +0800
Subject: [PATCH 0769/1442] Use api functions instead
---
Flow.Launcher.Core/Configuration/Portable.cs | 21 +++++++-------
.../ExternalPlugins/CommunityPluginSource.cs | 25 +++++++++--------
.../Environments/AbstractPluginEnvironment.cs | 5 ++--
Flow.Launcher.Core/Plugin/PluginConfig.cs | 28 +++++++++++--------
Flow.Launcher.Core/Plugin/PluginManager.cs | 17 ++++++-----
.../Resource/Internationalization.cs | 23 ++++++++-------
Flow.Launcher.Core/Resource/Theme.cs | 15 +++++-----
Flow.Launcher.Core/Updater.cs | 11 ++++----
8 files changed, 80 insertions(+), 65 deletions(-)
diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs
index 2b570d2c0..7f02cef09 100644
--- a/Flow.Launcher.Core/Configuration/Portable.cs
+++ b/Flow.Launcher.Core/Configuration/Portable.cs
@@ -1,21 +1,22 @@
-using Microsoft.Win32;
-using Squirrel;
-using System;
+using System;
using System.IO;
+using System.Linq;
using System.Reflection;
using System.Windows;
-using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin.SharedCommands;
-using System.Linq;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.Plugin.SharedCommands;
+using Microsoft.Win32;
+using Squirrel;
namespace Flow.Launcher.Core.Configuration
{
public class Portable : IPortable
{
+ private static readonly string ClassName = nameof(Portable);
+
private readonly IPublicAPI API = Ioc.Default.GetRequiredService();
///
@@ -51,7 +52,7 @@ namespace Flow.Launcher.Core.Configuration
}
catch (Exception e)
{
- Log.Exception("|Portable.DisablePortableMode|Error occurred while disabling portable mode", e);
+ API.LogException(ClassName, "Error occurred while disabling portable mode", e);
}
}
@@ -75,7 +76,7 @@ namespace Flow.Launcher.Core.Configuration
}
catch (Exception e)
{
- Log.Exception("|Portable.EnablePortableMode|Error occurred while enabling portable mode", e);
+ API.LogException(ClassName, "Error occurred while enabling portable mode", e);
}
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
index dd79fbc7a..ac27c523c 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
@@ -1,7 +1,4 @@
-using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
-using Flow.Launcher.Plugin;
-using System;
+using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
@@ -11,11 +8,18 @@ using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Infrastructure.Http;
+using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.ExternalPlugins
{
public record CommunityPluginSource(string ManifestFileUrl)
{
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
private static readonly string ClassName = nameof(CommunityPluginSource);
private string latestEtag = "";
@@ -37,7 +41,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
///
public async Task> FetchAsync(CancellationToken token)
{
- Log.Info(ClassName, $"Loading plugins from {ManifestFileUrl}");
+ API.LogInfo(ClassName, $"Loading plugins from {ManifestFileUrl}");
var request = new HttpRequestMessage(HttpMethod.Get, ManifestFileUrl);
@@ -55,18 +59,17 @@ namespace Flow.Launcher.Core.ExternalPlugins
.ConfigureAwait(false);
latestEtag = response.Headers.ETag?.Tag;
- Log.Info(ClassName, $"Loaded {plugins.Count} plugins from {ManifestFileUrl}");
+ API.LogInfo(ClassName, $"Loaded {plugins.Count} plugins from {ManifestFileUrl}");
return plugins;
}
else if (response.StatusCode == HttpStatusCode.NotModified)
{
- Log.Info(ClassName, $"Resource {ManifestFileUrl} has not been modified.");
+ API.LogInfo(ClassName, $"Resource {ManifestFileUrl} has not been modified.");
return plugins;
}
else
{
- Log.Warn(ClassName,
- $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
+ API.LogWarn(ClassName, $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
return plugins;
}
}
@@ -74,11 +77,11 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
if (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
{
- Log.Exception(ClassName, $"Check your connection and proxy settings to {ManifestFileUrl}.", e);
+ API.LogException(ClassName, $"Check your connection and proxy settings to {ManifestFileUrl}.", e);
}
else
{
- Log.Exception(ClassName, "Error Occurred", e);
+ API.LogException(ClassName, "Error Occurred", e);
}
return plugins;
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
index bbb6cf638..14796a87a 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Windows;
using System.Windows.Forms;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
@@ -14,6 +13,8 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
public abstract class AbstractPluginEnvironment
{
+ private static readonly string ClassName = nameof(AbstractPluginEnvironment);
+
protected readonly IPublicAPI API = Ioc.Default.GetRequiredService();
internal abstract string Language { get; }
@@ -120,7 +121,7 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
else
{
API.ShowMsgBox(string.Format(API.GetTranslation("runtimePluginUnableToSetExecutablePath"), Language));
- Log.Error("PluginsLoader",
+ API.LogError(ClassName,
$"Not able to successfully set {EnvName} path, setting's plugin executable path variable is still an empty string.",
$"{Language}Environment");
diff --git a/Flow.Launcher.Core/Plugin/PluginConfig.cs b/Flow.Launcher.Core/Plugin/PluginConfig.cs
index 163f97046..f7457b4e1 100644
--- a/Flow.Launcher.Core/Plugin/PluginConfig.cs
+++ b/Flow.Launcher.Core/Plugin/PluginConfig.cs
@@ -3,14 +3,20 @@ using System.Collections.Generic;
using System.Linq;
using System.IO;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin;
using System.Text.Json;
+using CommunityToolkit.Mvvm.DependencyInjection;
namespace Flow.Launcher.Core.Plugin
{
internal abstract class PluginConfig
{
+ private static readonly string ClassName = nameof(PluginConfig);
+
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
///
/// Parse plugin metadata in the given directories
///
@@ -32,7 +38,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception($"|PluginConfig.ParsePLuginConfigs|Can't delete <{directory}>", e);
+ API.LogException(ClassName, $"Can't delete <{directory}>", e);
}
}
else
@@ -49,11 +55,11 @@ namespace Flow.Launcher.Core.Plugin
duplicateList
.ForEach(
- x => Log.Warn("PluginConfig",
- string.Format("Duplicate plugin name: {0}, id: {1}, version: {2} " +
- "not loaded due to version not the highest of the duplicates",
- x.Name, x.ID, x.Version),
- "GetUniqueLatestPluginMetadata"));
+ x => API.LogWarn(ClassName,
+ string.Format("Duplicate plugin name: {0}, id: {1}, version: {2} " +
+ "not loaded due to version not the highest of the duplicates",
+ x.Name, x.ID, x.Version),
+ "GetUniqueLatestPluginMetadata"));
return uniqueList;
}
@@ -101,7 +107,7 @@ namespace Flow.Launcher.Core.Plugin
string configPath = Path.Combine(pluginDirectory, Constant.PluginMetadataFileName);
if (!File.Exists(configPath))
{
- Log.Error($"|PluginConfig.GetPluginMetadata|Didn't find config file <{configPath}>");
+ API.LogError(ClassName, $"Didn't find config file <{configPath}>");
return null;
}
@@ -117,19 +123,19 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception($"|PluginConfig.GetPluginMetadata|invalid json for config <{configPath}>", e);
+ API.LogException(ClassName, $"Invalid json for config <{configPath}>", e);
return null;
}
if (!AllowedLanguage.IsAllowed(metadata.Language))
{
- Log.Error($"|PluginConfig.GetPluginMetadata|Invalid language <{metadata.Language}> for config <{configPath}>");
+ API.LogError(ClassName, $"Invalid language <{metadata.Language}> for config <{configPath}>");
return null;
}
if (!File.Exists(metadata.ExecuteFilePath))
{
- Log.Error($"|PluginConfig.GetPluginMetadata|execute file path didn't exist <{metadata.ExecuteFilePath}> for conifg <{configPath}");
+ API.LogError(ClassName, $"Execute file path didn't exist <{metadata.ExecuteFilePath}> for conifg <{configPath}");
return null;
}
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 52d6fd736..72303c8b7 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -9,7 +9,6 @@ using System.Threading.Tasks;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
@@ -214,12 +213,12 @@ namespace Flow.Launcher.Core.Plugin
() => pair.Plugin.InitAsync(new PluginInitContext(pair.Metadata, API)));
pair.Metadata.InitTime += milliseconds;
- Log.Info(
- $"|PluginManager.InitializePlugins|Total init cost for <{pair.Metadata.Name}> is <{pair.Metadata.InitTime}ms>");
+ API.LogInfo(ClassName,
+ $"Total init cost for <{pair.Metadata.Name}> is <{pair.Metadata.InitTime}ms>");
}
catch (Exception e)
{
- Log.Exception(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
+ API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
pair.Metadata.Disabled = true;
failedPlugins.Enqueue(pair);
}
@@ -370,8 +369,8 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception(
- $"|PluginManager.GetContextMenusForPlugin|Can't load context menus for plugin <{pluginPair.Metadata.Name}>",
+ API.LogException(ClassName,
+ $"Can't load context menus for plugin <{pluginPair.Metadata.Name}>",
e);
}
}
@@ -563,7 +562,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception($"|PluginManager.InstallPlugin|Failed to delete temp folder {tempFolderPluginPath}", e);
+ API.LogException(ClassName, $"Failed to delete temp folder {tempFolderPluginPath}", e);
}
if (checkModified)
@@ -608,7 +607,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception($"|PluginManager.UninstallPlugin|Failed to delete plugin settings folder for {plugin.Name}", e);
+ API.LogException(ClassName, $"Failed to delete plugin settings folder for {plugin.Name}", e);
API.ShowMsg(API.GetTranslation("failedToRemovePluginSettingsTitle"),
string.Format(API.GetTranslation("failedToRemovePluginSettingsMessage"), plugin.Name));
}
@@ -624,7 +623,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- Log.Exception($"|PluginManager.UninstallPlugin|Failed to delete plugin cache folder for {plugin.Name}", e);
+ API.LogException(ClassName, $"Failed to delete plugin cache folder for {plugin.Name}", e);
API.ShowMsg(API.GetTranslation("failedToRemovePluginCacheTitle"),
string.Format(API.GetTranslation("failedToRemovePluginCacheMessage"), plugin.Name));
}
diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs
index df841dbbe..1dfc6d4ed 100644
--- a/Flow.Launcher.Core/Resource/Internationalization.cs
+++ b/Flow.Launcher.Core/Resource/Internationalization.cs
@@ -6,7 +6,6 @@ using System.Reflection;
using System.Windows;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using System.Globalization;
@@ -17,11 +16,14 @@ namespace Flow.Launcher.Core.Resource
{
public class Internationalization
{
+ private static readonly string ClassName = nameof(Internationalization);
+
private const string Folder = "Languages";
private const string DefaultLanguageCode = "en";
private const string DefaultFile = "en.xaml";
private const string Extension = ".xaml";
private readonly Settings _settings;
+ private readonly IPublicAPI _api;
private readonly List _languageDirectories = new();
private readonly List _oldResources = new();
private readonly string SystemLanguageCode;
@@ -29,6 +31,7 @@ namespace Flow.Launcher.Core.Resource
public Internationalization(Settings settings)
{
_settings = settings;
+ _api = Ioc.Default.GetRequiredService();
AddFlowLauncherLanguageDirectory();
SystemLanguageCode = GetSystemLanguageCodeAtStartup();
}
@@ -80,7 +83,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- Log.Error($"|Internationalization.AddPluginLanguageDirectories|Can't find plugin path <{location}> for <{plugin.Metadata.Name}>");
+ _api.LogError(ClassName, $"Can't find plugin path <{location}> for <{plugin.Metadata.Name}>");
}
}
@@ -144,13 +147,13 @@ namespace Flow.Launcher.Core.Resource
_settings.Language = isSystem ? Constant.SystemLanguageCode : language.LanguageCode;
}
- private static Language GetLanguageByLanguageCode(string languageCode)
+ private Language GetLanguageByLanguageCode(string languageCode)
{
var lowercase = languageCode.ToLower();
var language = AvailableLanguages.GetAvailableLanguages().FirstOrDefault(o => o.LanguageCode.ToLower() == lowercase);
if (language == null)
{
- Log.Error($"|Internationalization.GetLanguageByLanguageCode|Language code can't be found <{languageCode}>");
+ _api.LogError(ClassName, $"Language code can't be found <{languageCode}>");
return AvailableLanguages.English;
}
else
@@ -239,7 +242,7 @@ namespace Flow.Launcher.Core.Resource
return list;
}
- public static string GetTranslation(string key)
+ public string GetTranslation(string key)
{
var translation = Application.Current.TryFindResource(key);
if (translation is string)
@@ -248,7 +251,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- Log.Error($"|Internationalization.GetTranslation|No Translation for key {key}");
+ _api.LogError(ClassName, $"No Translation for key {key}");
return $"No Translation for key {key}";
}
}
@@ -266,12 +269,12 @@ namespace Flow.Launcher.Core.Resource
}
catch (Exception e)
{
- Log.Exception($"|Internationalization.UpdatePluginMetadataTranslations|Failed for <{p.Metadata.Name}>", e);
+ _api.LogException(ClassName, $"Failed for <{p.Metadata.Name}>", e);
}
}
}
- private static string LanguageFile(string folder, string language)
+ private string LanguageFile(string folder, string language)
{
if (Directory.Exists(folder))
{
@@ -282,7 +285,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- Log.Error($"|Internationalization.LanguageFile|Language path can't be found <{path}>");
+ _api.LogError(ClassName, $"Language path can't be found <{path}>");
var english = Path.Combine(folder, DefaultFile);
if (File.Exists(english))
{
@@ -290,7 +293,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- Log.Error($"|Internationalization.LanguageFile|Default English Language path can't be found <{path}>");
+ _api.LogError(ClassName, $"Default English Language path can't be found <{path}>");
return string.Empty;
}
}
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index 59e76e2d2..64ffec907 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -13,7 +13,6 @@ using System.Windows.Media.Effects;
using System.Windows.Shell;
using System.Windows.Threading;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
@@ -25,6 +24,8 @@ namespace Flow.Launcher.Core.Resource
{
#region Properties & Fields
+ private readonly string ClassName = nameof(Theme);
+
public bool BlurEnabled { get; private set; }
private const string ThemeMetadataNamePrefix = "Name:";
@@ -73,7 +74,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- Log.Error("Current theme resource not found. Initializing with default theme.");
+ _api.LogError(ClassName, "Current theme resource not found. Initializing with default theme.");
_oldTheme = Constant.DefaultTheme;
};
}
@@ -92,7 +93,7 @@ namespace Flow.Launcher.Core.Resource
}
catch (Exception e)
{
- Log.Exception($"|Theme.MakesureThemeDirectoriesExist|Exception when create directory <{dir}>", e);
+ _api.LogException(ClassName, $"Exception when create directory <{dir}>", e);
}
}
}
@@ -135,7 +136,7 @@ namespace Flow.Launcher.Core.Resource
}
catch (Exception e)
{
- Log.Exception("Error occurred while updating theme fonts", e);
+ _api.LogException(ClassName, "Error occurred while updating theme fonts", e);
}
}
@@ -387,7 +388,7 @@ namespace Flow.Launcher.Core.Resource
var matchingTheme = themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme);
if (matchingTheme == null)
{
- Log.Warn($"No matching theme found for '{_settings.Theme}'. Falling back to the first available theme.");
+ _api.LogWarn(ClassName, $"No matching theme found for '{_settings.Theme}'. Falling back to the first available theme.");
}
return matchingTheme ?? themes.FirstOrDefault();
}
@@ -440,7 +441,7 @@ namespace Flow.Launcher.Core.Resource
}
catch (DirectoryNotFoundException)
{
- Log.Error($"|Theme.ChangeTheme|Theme <{theme}> path can't be found");
+ _api.LogError(ClassName, $"Theme <{theme}> path can't be found");
if (theme != Constant.DefaultTheme)
{
_api.ShowMsgBox(string.Format(_api.GetTranslation("theme_load_failure_path_not_exists"), theme));
@@ -450,7 +451,7 @@ namespace Flow.Launcher.Core.Resource
}
catch (XamlParseException)
{
- Log.Error($"|Theme.ChangeTheme|Theme <{theme}> fail to parse");
+ _api.LogError(ClassName, $"Theme <{theme}> fail to parse");
if (theme != Constant.DefaultTheme)
{
_api.ShowMsgBox(string.Format(_api.GetTranslation("theme_load_failure_parse_error"), theme));
diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs
index f018bdfc7..bc3655f69 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -12,7 +12,6 @@ using System.Windows;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Http;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using JetBrains.Annotations;
@@ -24,6 +23,8 @@ namespace Flow.Launcher.Core
{
public string GitHubRepository { get; init; }
+ private static readonly string ClassName = nameof(Updater);
+
private readonly IPublicAPI _api;
public Updater(IPublicAPI publicAPI, string gitHubRepository)
@@ -51,7 +52,7 @@ namespace Flow.Launcher.Core
var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString());
var currentVersion = Version.Parse(Constant.Version);
- Log.Info($"|Updater.UpdateApp|Future Release <{Formatted(newUpdateInfo.FutureReleaseEntry)}>");
+ _api.LogInfo(ClassName, $"Future Release <{Formatted(newUpdateInfo.FutureReleaseEntry)}>");
if (newReleaseVersion <= currentVersion)
{
@@ -84,7 +85,7 @@ namespace Flow.Launcher.Core
var newVersionTips = NewVersionTips(newReleaseVersion.ToString());
- Log.Info($"|Updater.UpdateApp|Update success:{newVersionTips}");
+ _api.LogInfo(ClassName, $"Update success:{newVersionTips}");
if (_api.ShowMsgBox(newVersionTips, _api.GetTranslation("update_flowlauncher_new_update"), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
@@ -95,11 +96,11 @@ namespace Flow.Launcher.Core
{
if (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException)
{
- Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
+ _api.LogException(ClassName, $"Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
}
else
{
- Log.Exception($"|Updater.UpdateApp|Error Occurred", e);
+ _api.LogException(ClassName, $"Error Occurred", e);
}
if (!silentUpdate)
From b13ab3b893baefecdb788ab605e6e5d03bf504f3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:27:17 +0800
Subject: [PATCH 0770/1442] Remove useless DI
---
Flow.Launcher/SettingWindow.xaml.cs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 28140f024..b4a3ae47a 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -6,7 +6,6 @@ using System.Windows.Interop;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Plugin;
using Flow.Launcher.SettingPages.Views;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
@@ -16,7 +15,6 @@ namespace Flow.Launcher;
public partial class SettingWindow
{
- private readonly IPublicAPI _api;
private readonly Settings _settings;
private readonly SettingWindowViewModel _viewModel;
@@ -26,7 +24,6 @@ public partial class SettingWindow
_settings = Ioc.Default.GetRequiredService();
DataContext = viewModel;
_viewModel = viewModel;
- _api = Ioc.Default.GetRequiredService();
InitializePosition();
InitializeComponent();
}
@@ -49,7 +46,7 @@ public partial class SettingWindow
_settings.SettingWindowTop = Top;
_settings.SettingWindowLeft = Left;
_viewModel.Save();
- _api.SavePluginSettings();
+ App.API.SavePluginSettings();
}
private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)
From 4a7915b9ffde654751bc3dbd3451cd070c1da018 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:50:44 +0800
Subject: [PATCH 0771/1442] Use api fuctions forr main project
---
.../Resource/Internationalization.cs | 24 ++++++++++---------
Flow.Launcher/App.xaml.cs | 18 +++++++-------
.../Converters/QuerySuggestionBoxConverter.cs | 5 ++--
Flow.Launcher/Helper/AutoStartup.cs | 14 ++++++-----
Flow.Launcher/Helper/HotKeyMapper.cs | 8 ++++---
Flow.Launcher/MessageBoxEx.xaml.cs | 6 ++---
Flow.Launcher/Msg.xaml.cs | 1 -
Flow.Launcher/Notification.cs | 7 +++---
Flow.Launcher/ProgressBoxEx.xaml.cs | 5 ++--
Flow.Launcher/PublicAPIInstance.cs | 8 +++----
Flow.Launcher/ReportWindow.xaml.cs | 6 +++--
Flow.Launcher/ViewModel/MainViewModel.cs | 13 +++++-----
Flow.Launcher/ViewModel/ResultViewModel.cs | 8 +++----
13 files changed, 67 insertions(+), 56 deletions(-)
diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs
index 1dfc6d4ed..b32b09e8f 100644
--- a/Flow.Launcher.Core/Resource/Internationalization.cs
+++ b/Flow.Launcher.Core/Resource/Internationalization.cs
@@ -18,12 +18,15 @@ namespace Flow.Launcher.Core.Resource
{
private static readonly string ClassName = nameof(Internationalization);
+ // We should not initialize API in static constructor because it will create another API instance
+ private static IPublicAPI api = null;
+ private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
+
private const string Folder = "Languages";
private const string DefaultLanguageCode = "en";
private const string DefaultFile = "en.xaml";
private const string Extension = ".xaml";
private readonly Settings _settings;
- private readonly IPublicAPI _api;
private readonly List _languageDirectories = new();
private readonly List _oldResources = new();
private readonly string SystemLanguageCode;
@@ -31,7 +34,6 @@ namespace Flow.Launcher.Core.Resource
public Internationalization(Settings settings)
{
_settings = settings;
- _api = Ioc.Default.GetRequiredService();
AddFlowLauncherLanguageDirectory();
SystemLanguageCode = GetSystemLanguageCodeAtStartup();
}
@@ -83,7 +85,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- _api.LogError(ClassName, $"Can't find plugin path <{location}> for <{plugin.Metadata.Name}>");
+ API.LogError(ClassName, $"Can't find plugin path <{location}> for <{plugin.Metadata.Name}>");
}
}
@@ -147,13 +149,13 @@ namespace Flow.Launcher.Core.Resource
_settings.Language = isSystem ? Constant.SystemLanguageCode : language.LanguageCode;
}
- private Language GetLanguageByLanguageCode(string languageCode)
+ private static Language GetLanguageByLanguageCode(string languageCode)
{
var lowercase = languageCode.ToLower();
var language = AvailableLanguages.GetAvailableLanguages().FirstOrDefault(o => o.LanguageCode.ToLower() == lowercase);
if (language == null)
{
- _api.LogError(ClassName, $"Language code can't be found <{languageCode}>");
+ API.LogError(ClassName, $"Language code can't be found <{languageCode}>");
return AvailableLanguages.English;
}
else
@@ -242,7 +244,7 @@ namespace Flow.Launcher.Core.Resource
return list;
}
- public string GetTranslation(string key)
+ public static string GetTranslation(string key)
{
var translation = Application.Current.TryFindResource(key);
if (translation is string)
@@ -251,7 +253,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- _api.LogError(ClassName, $"No Translation for key {key}");
+ API.LogError(ClassName, $"No Translation for key {key}");
return $"No Translation for key {key}";
}
}
@@ -269,12 +271,12 @@ namespace Flow.Launcher.Core.Resource
}
catch (Exception e)
{
- _api.LogException(ClassName, $"Failed for <{p.Metadata.Name}>", e);
+ API.LogException(ClassName, $"Failed for <{p.Metadata.Name}>", e);
}
}
}
- private string LanguageFile(string folder, string language)
+ private static string LanguageFile(string folder, string language)
{
if (Directory.Exists(folder))
{
@@ -285,7 +287,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- _api.LogError(ClassName, $"Language path can't be found <{path}>");
+ API.LogError(ClassName, $"Language path can't be found <{path}>");
var english = Path.Combine(folder, DefaultFile);
if (File.Exists(english))
{
@@ -293,7 +295,7 @@ namespace Flow.Launcher.Core.Resource
}
else
{
- _api.LogError(ClassName, $"Default English Language path can't be found <{path}>");
+ API.LogError(ClassName, $"Default English Language path can't be found <{path}>");
return string.Empty;
}
}
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index a9cd1a8b9..87677f58a 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -148,8 +148,8 @@ namespace Flow.Launcher
Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate();
- Log.Info("|App.OnStartup|Begin Flow Launcher startup ----------------------------------------------------");
- Log.Info($"|App.OnStartup|Runtime info:{ErrorReporting.RuntimeInfo()}");
+ API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------");
+ API.LogInfo(ClassName, "Runtime info:{ErrorReporting.RuntimeInfo()}");
RegisterAppDomainExceptions();
RegisterDispatcherUnhandledException();
@@ -176,7 +176,7 @@ namespace Flow.Launcher
_mainWindow = new MainWindow();
- Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}");
+ API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");
Current.MainWindow = _mainWindow;
Current.MainWindow.Title = Constant.FlowLauncher;
@@ -192,7 +192,7 @@ namespace Flow.Launcher
AutoUpdates();
API.SaveAppAllSettings();
- Log.Info("|App.OnStartup|End Flow Launcher startup ----------------------------------------------------");
+ API.LogInfo(ClassName, "End Flow Launcher startup ----------------------------------------------------");
});
}
@@ -250,19 +250,19 @@ namespace Flow.Launcher
{
AppDomain.CurrentDomain.ProcessExit += (s, e) =>
{
- Log.Info("|App.RegisterExitEvents|Process Exit");
+ API.LogInfo(ClassName, "Process Exit");
Dispose();
};
Current.Exit += (s, e) =>
{
- Log.Info("|App.RegisterExitEvents|Application Exit");
+ API.LogInfo(ClassName, "Application Exit");
Dispose();
};
Current.SessionEnding += (s, e) =>
{
- Log.Info("|App.RegisterExitEvents|Session Ending");
+ API.LogInfo(ClassName, "Session Ending");
Dispose();
};
}
@@ -326,7 +326,7 @@ namespace Flow.Launcher
API.StopwatchLogInfo(ClassName, "Dispose cost", () =>
{
- Log.Info("|App.Dispose|Begin Flow Launcher dispose ----------------------------------------------------");
+ API.LogInfo(ClassName, "Begin Flow Launcher dispose ----------------------------------------------------");
if (disposing)
{
@@ -336,7 +336,7 @@ namespace Flow.Launcher
_mainVM?.Dispose();
}
- Log.Info("|App.Dispose|End Flow Launcher dispose ----------------------------------------------------");
+ API.LogInfo(ClassName, "End Flow Launcher dispose ----------------------------------------------------");
});
}
diff --git a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
index 0d6f2e469..eb492e334 100644
--- a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
+++ b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
@@ -4,13 +4,14 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Converters;
public class QuerySuggestionBoxConverter : IMultiValueConverter
{
+ private static readonly string ClassName = nameof(QuerySuggestionBoxConverter);
+
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
// values[0] is TextBox: The textbox displaying the autocomplete suggestion
@@ -64,7 +65,7 @@ public class QuerySuggestionBoxConverter : IMultiValueConverter
}
catch (Exception e)
{
- Log.Exception(nameof(QuerySuggestionBoxConverter), "fail to convert text for suggestion box", e);
+ App.API.LogException(ClassName, "fail to convert text for suggestion box", e);
return string.Empty;
}
}
diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs
index c5e20504b..568ea7944 100644
--- a/Flow.Launcher/Helper/AutoStartup.cs
+++ b/Flow.Launcher/Helper/AutoStartup.cs
@@ -11,6 +11,8 @@ namespace Flow.Launcher.Helper;
public class AutoStartup
{
+ private static readonly string ClassName = nameof(AutoStartup);
+
private const string StartupPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
private const string LogonTaskName = $"{Constant.FlowLauncher} Startup";
private const string LogonTaskDesc = $"{Constant.FlowLauncher} Auto Startup";
@@ -34,7 +36,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Ignoring non-critical registry error (querying if enabled): {e}");
+ App.API.LogError(ClassName, $"Ignoring non-critical registry error (querying if enabled): {e}");
}
return false;
@@ -61,7 +63,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Failed to check logon task: {e}");
+ App.API.LogError(ClassName, $"Failed to check logon task: {e}");
}
}
@@ -112,7 +114,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Failed to disable auto-startup: {e}");
+ App.API.LogError(ClassName, $"Failed to disable auto-startup: {e}");
throw;
}
}
@@ -133,7 +135,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Failed to enable auto-startup: {e}");
+ App.API.LogError(ClassName, $"Failed to enable auto-startup: {e}");
throw;
}
}
@@ -161,7 +163,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Failed to schedule logon task: {e}");
+ App.API.LogError(ClassName, $"Failed to schedule logon task: {e}");
return false;
}
}
@@ -176,7 +178,7 @@ public class AutoStartup
}
catch (Exception e)
{
- Log.Error("AutoStartup", $"Failed to unschedule logon task: {e}");
+ App.API.LogError(ClassName, $"Failed to unschedule logon task: {e}");
return false;
}
}
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index 0771a6074..1e83415cc 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -12,6 +12,8 @@ namespace Flow.Launcher.Helper;
internal static class HotKeyMapper
{
+ private static readonly string ClassName = nameof(HotKeyMapper);
+
private static Settings _settings;
private static MainViewModel _mainViewModel;
@@ -51,7 +53,7 @@ internal static class HotKeyMapper
}
catch (Exception e)
{
- Log.Error(
+ App.API.LogError(ClassName,
string.Format("|HotkeyMapper.SetWithChefKeys|Error registering hotkey: {0} \nStackTrace:{1}",
e.Message,
e.StackTrace));
@@ -76,7 +78,7 @@ internal static class HotKeyMapper
}
catch (Exception e)
{
- Log.Error(
+ App.API.LogError(ClassName,
string.Format("|HotkeyMapper.SetHotkey|Error registering hotkey {2}: {0} \nStackTrace:{1}",
e.Message,
e.StackTrace,
@@ -102,7 +104,7 @@ internal static class HotKeyMapper
}
catch (Exception e)
{
- Log.Error(
+ App.API.LogError(ClassName,
string.Format("|HotkeyMapper.RemoveHotkey|Error removing hotkey: {0} \nStackTrace:{1}",
e.Message,
e.StackTrace));
diff --git a/Flow.Launcher/MessageBoxEx.xaml.cs b/Flow.Launcher/MessageBoxEx.xaml.cs
index 3d94769d0..a55aeb811 100644
--- a/Flow.Launcher/MessageBoxEx.xaml.cs
+++ b/Flow.Launcher/MessageBoxEx.xaml.cs
@@ -4,13 +4,13 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Image;
-using Flow.Launcher.Infrastructure.Logger;
namespace Flow.Launcher
{
public partial class MessageBoxEx : Window
{
+ private static readonly string ClassName = nameof(MessageBoxEx);
+
private static MessageBoxEx msgBox;
private static MessageBoxResult _result = MessageBoxResult.None;
@@ -59,7 +59,7 @@ namespace Flow.Launcher
}
catch (Exception e)
{
- Log.Error($"|MessageBoxEx.Show|An error occurred: {e.Message}");
+ App.API.LogError(ClassName, $"An error occurred: {e.Message}");
msgBox = null;
return MessageBoxResult.None;
}
diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs
index ff9accd62..110235cb5 100644
--- a/Flow.Launcher/Msg.xaml.cs
+++ b/Flow.Launcher/Msg.xaml.cs
@@ -5,7 +5,6 @@ using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media.Animation;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Image;
namespace Flow.Launcher
{
diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs
index 30b3a0673..be81e6ec6 100644
--- a/Flow.Launcher/Notification.cs
+++ b/Flow.Launcher/Notification.cs
@@ -1,5 +1,4 @@
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Microsoft.Toolkit.Uwp.Notifications;
using System;
using System.IO;
@@ -9,6 +8,8 @@ namespace Flow.Launcher
{
internal static class Notification
{
+ private static readonly string ClassName = nameof(Notification);
+
internal static bool legacy = !Win32Helper.IsNotificationSupported();
internal static void Uninstall()
@@ -51,12 +52,12 @@ namespace Flow.Launcher
{
// Temporary fix for the Windows 11 notification issue
// Possibly from 22621.1413 or 22621.1485, judging by post time of #2024
- Log.Exception("Flow.Launcher.Notification|Notification InvalidOperationException Error", e);
+ App.API.LogException(ClassName, "Notification InvalidOperationException Error", e);
LegacyShow(title, subTitle, iconPath);
}
catch (Exception e)
{
- Log.Exception("Flow.Launcher.Notification|Notification Error", e);
+ App.API.LogException(ClassName, "Notification Error", e);
LegacyShow(title, subTitle, iconPath);
}
}
diff --git a/Flow.Launcher/ProgressBoxEx.xaml.cs b/Flow.Launcher/ProgressBoxEx.xaml.cs
index 2395bdf34..840c8bade 100644
--- a/Flow.Launcher/ProgressBoxEx.xaml.cs
+++ b/Flow.Launcher/ProgressBoxEx.xaml.cs
@@ -2,12 +2,13 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
-using Flow.Launcher.Infrastructure.Logger;
namespace Flow.Launcher
{
public partial class ProgressBoxEx : Window
{
+ private static readonly string ClassName = nameof(ProgressBoxEx);
+
private readonly Action _cancelProgress;
private ProgressBoxEx(Action cancelProgress)
@@ -47,7 +48,7 @@ namespace Flow.Launcher
}
catch (Exception e)
{
- Log.Error($"|ProgressBoxEx.Show|An error occurred: {e.Message}");
+ App.API.LogError(ClassName, $"An error occurred: {e.Message}");
await reportProgressAsync(null).ConfigureAwait(false);
}
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 5438eac7d..3abc57b8a 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -435,16 +435,16 @@ namespace Flow.Launcher
PluginManager.UninstallPluginAsync(pluginMetadata, removePluginSettings);
public long StopwatchLogDebug(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
- Stopwatch.Debug($"|{className}.{methodName}|{message}", action);
+ Stopwatch.Debug(className, message, action, methodName);
public Task StopwatchLogDebugAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
- Stopwatch.DebugAsync($"|{className}.{methodName}|{message}", action);
+ Stopwatch.DebugAsync(className, message, action, methodName);
public long StopwatchLogInfo(string className, string message, Action action, [CallerMemberName] string methodName = "") =>
- Stopwatch.Normal($"|{className}.{methodName}|{message}", action);
+ Stopwatch.Info(className, message, action, methodName);
public Task StopwatchLogInfoAsync(string className, string message, Func action, [CallerMemberName] string methodName = "") =>
- Stopwatch.NormalAsync($"|{className}.{methodName}|{message}", action);
+ Stopwatch.InfoAsync(className, message, action, methodName);
#endregion
diff --git a/Flow.Launcher/ReportWindow.xaml.cs b/Flow.Launcher/ReportWindow.xaml.cs
index 6fe90783e..0ab785a17 100644
--- a/Flow.Launcher/ReportWindow.xaml.cs
+++ b/Flow.Launcher/ReportWindow.xaml.cs
@@ -8,13 +8,15 @@ using System.Windows;
using System.Windows.Documents;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin.SharedCommands;
+using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher
{
internal partial class ReportWindow
{
+ private static readonly string ClassName = nameof(ReportWindow);
+
public ReportWindow(Exception exception)
{
InitializeComponent();
@@ -38,7 +40,7 @@ namespace Flow.Launcher
private void SetException(Exception exception)
{
- string path = Log.CurrentLogDirectory;
+ var path = DataLocation.VersionLogDirectory;
var directory = new DirectoryInfo(path);
var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).First();
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index f6b9aa67c..998fdb906 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -16,7 +16,6 @@ using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
@@ -30,6 +29,8 @@ namespace Flow.Launcher.ViewModel
{
#region Private Fields
+ private static readonly string ClassName = nameof(MainViewModel);
+
private bool _isQueryRunning;
private Query _lastQuery;
private string _queryTextBeforeLeaveResults;
@@ -213,7 +214,7 @@ namespace Flow.Launcher.ViewModel
}
if (!_disposed)
- Log.Error("MainViewModel", "Unexpected ResultViewUpdate ends");
+ App.API.LogError(ClassName, "Unexpected ResultViewUpdate ends");
}
void continueAction(Task t)
@@ -257,7 +258,7 @@ namespace Flow.Launcher.ViewModel
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
token)))
{
- Log.Error("MainViewModel", "Unable to add item to Result Update Queue");
+ App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
};
}
@@ -1303,7 +1304,7 @@ namespace Flow.Launcher.ViewModel
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
token, reSelect)))
{
- Log.Error("MainViewModel", "Unable to add item to Result Update Queue");
+ App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
}
}
@@ -1347,8 +1348,8 @@ namespace Flow.Launcher.ViewModel
}
catch (Exception e)
{
- Log.Exception(
- $"{nameof(MainViewModel)}.{nameof(ConstructQuery)}|Error when expanding shortcut {shortcut.Key}",
+ App.API.LogException(ClassName,
+ $"Error when expanding shortcut {shortcut.Key}",
e);
}
}
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index 8d7569dc1..ef7e24c3b 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Drawing.Text;
using System.IO;
@@ -7,7 +6,6 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Flow.Launcher.Infrastructure.Image;
-using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
@@ -15,6 +13,8 @@ namespace Flow.Launcher.ViewModel
{
public class ResultViewModel : BaseModel
{
+ private static readonly string ClassName = nameof(ResultsViewModel);
+
private static readonly PrivateFontCollection FontCollection = new();
private static readonly Dictionary Fonts = new();
@@ -232,8 +232,8 @@ namespace Flow.Launcher.ViewModel
}
catch (Exception e)
{
- Log.Exception(
- $"|ResultViewModel.LoadImageInternalAsync|IcoPath is empty and exception when calling IconDelegate for result <{Result.Title}> of plugin <{Result.PluginDirectory}>",
+ App.API.LogException(ClassName,
+ $"IcoPath is empty and exception when calling IconDelegate for result <{Result.Title}> of plugin <{Result.PluginDirectory}>",
e);
}
}
From 3f57f944f620e3198a8a590bfeb9ecf4b30e62b7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:52:42 +0800
Subject: [PATCH 0772/1442] Remove useless debug
---
Plugins/Flow.Launcher.Plugin.Program/Main.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
index 16b6bcab2..d28845994 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs
@@ -109,7 +109,6 @@ namespace Flow.Launcher.Plugin.Program
}
catch (OperationCanceledException)
{
- Context.API.LogDebug(ClassName, "Query operation cancelled");
return emptyResults;
}
finally
From 50130e4b009ae5a808b7b65d3238d0785c60b0df Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 17:59:39 +0800
Subject: [PATCH 0773/1442] Use class name instead
---
Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs | 4 +++-
Flow.Launcher/Helper/WallpaperPathRetrieval.cs | 10 ++++++----
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 4 +++-
Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 4 +++-
.../Search/DirectoryInfo/DirectoryInfoSearch.cs | 4 +++-
.../ProcessHelper.cs | 4 +++-
.../SuggestionSources/Baidu.cs | 6 ++++--
.../SuggestionSources/Bing.cs | 6 ++++--
.../SuggestionSources/DuckDuckGo.cs | 6 ++++--
.../SuggestionSources/Google.cs | 6 ++++--
Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs | 2 ++
11 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
index 44d3ef0ff..7ca91eaec 100644
--- a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
@@ -9,6 +9,8 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
public static class PluginsManifest
{
+ private static readonly string ClassName = nameof(PluginsManifest);
+
private static readonly CommunityPluginStore mainPluginStore =
new("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json",
"https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json",
@@ -44,7 +46,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
}
catch (Exception e)
{
- Ioc.Default.GetRequiredService().LogException(nameof(PluginsManifest), "Http request failed", e);
+ Ioc.Default.GetRequiredService().LogException(ClassName, "Http request failed", e);
}
finally
{
diff --git a/Flow.Launcher/Helper/WallpaperPathRetrieval.cs b/Flow.Launcher/Helper/WallpaperPathRetrieval.cs
index 77bebe2d3..93b9a8aaa 100644
--- a/Flow.Launcher/Helper/WallpaperPathRetrieval.cs
+++ b/Flow.Launcher/Helper/WallpaperPathRetrieval.cs
@@ -12,6 +12,8 @@ namespace Flow.Launcher.Helper;
public static class WallpaperPathRetrieval
{
+ private static readonly string ClassName = nameof(WallpaperPathRetrieval);
+
private const int MaxCacheSize = 3;
private static readonly Dictionary<(string, DateTime), ImageBrush> WallpaperCache = new();
private static readonly object CacheLock = new();
@@ -29,7 +31,7 @@ public static class WallpaperPathRetrieval
var wallpaperPath = Win32Helper.GetWallpaperPath();
if (string.IsNullOrEmpty(wallpaperPath) || !File.Exists(wallpaperPath))
{
- App.API.LogInfo(nameof(WallpaperPathRetrieval), $"Wallpaper path is invalid: {wallpaperPath}");
+ App.API.LogInfo(ClassName, $"Wallpaper path is invalid: {wallpaperPath}");
var wallpaperColor = GetWallpaperColor();
return new SolidColorBrush(wallpaperColor);
}
@@ -54,7 +56,7 @@ public static class WallpaperPathRetrieval
if (originalWidth == 0 || originalHeight == 0)
{
- App.API.LogInfo(nameof(WallpaperPathRetrieval), $"Failed to load bitmap: Width={originalWidth}, Height={originalHeight}");
+ App.API.LogInfo(ClassName, $"Failed to load bitmap: Width={originalWidth}, Height={originalHeight}");
return new SolidColorBrush(Colors.Transparent);
}
@@ -95,7 +97,7 @@ public static class WallpaperPathRetrieval
}
catch (Exception ex)
{
- App.API.LogException(nameof(WallpaperPathRetrieval), "Error retrieving wallpaper", ex);
+ App.API.LogException(ClassName, "Error retrieving wallpaper", ex);
return new SolidColorBrush(Colors.Transparent);
}
}
@@ -113,7 +115,7 @@ public static class WallpaperPathRetrieval
}
catch (Exception ex)
{
- App.API.LogException(nameof(WallpaperPathRetrieval), "Error parsing wallpaper color", ex);
+ App.API.LogException(ClassName, "Error parsing wallpaper color", ex);
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index 3bee49bf2..9ad31ad14 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -15,6 +15,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark;
public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContextMenu, IDisposable
{
+ private static readonly string ClassName = nameof(Main);
+
internal static string _faviconCacheDir;
internal static PluginInitContext _context;
@@ -221,7 +223,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
catch (Exception e)
{
var message = "Failed to set url in clipboard";
- _context.API.LogException(nameof(Main), message, e);
+ _context.API.LogException(ClassName, message, e);
_context.API.ShowMsg(message);
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
index f47907824..633af7b6b 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
@@ -15,6 +15,8 @@ namespace Flow.Launcher.Plugin.Explorer
{
internal class ContextMenu : IContextMenu
{
+ private static readonly string ClassName = nameof(ContextMenu);
+
private PluginInitContext Context { get; set; }
private Settings Settings { get; set; }
@@ -469,7 +471,7 @@ namespace Flow.Launcher.Plugin.Explorer
private void LogException(string message, Exception e)
{
- Context.API.LogException(nameof(ContextMenu), message, e);
+ Context.API.LogException(ClassName, message, e);
}
private static bool CanRunAsDifferentUser(string path)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
index 1a0d3bd15..631744252 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs
@@ -9,6 +9,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
{
public static class DirectoryInfoSearch
{
+ private static readonly string ClassName = nameof(DirectoryInfoSearch);
+
internal static IEnumerable TopLevelDirectorySearch(Query query, string search, CancellationToken token)
{
var criteria = ConstructSearchCriteria(search);
@@ -75,7 +77,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
}
catch (Exception e)
{
- Main.Context.API.LogException(nameof(DirectoryInfoSearch), "Error occurred while searching path", e);
+ Main.Context.API.LogException(ClassName, "Error occurred while searching path", e);
throw;
}
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
index 4c07341ec..d7f44ccce 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
@@ -12,6 +12,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller
{
internal class ProcessHelper
{
+ private static readonly string ClassName = nameof(ProcessHelper);
+
private readonly HashSet _systemProcessList = new()
{
"conhost",
@@ -131,7 +133,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
}
catch (Exception e)
{
- context.API.LogException($"{nameof(ProcessHelper)}", $"Failed to kill process {p.ProcessName}", e);
+ context.API.LogException(ClassName, $"Failed to kill process {p.ProcessName}", e);
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
index 65be06b53..681c8b649 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs
@@ -11,6 +11,8 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
public class Baidu : SuggestionSource
{
+ private static readonly string ClassName = nameof(Baidu);
+
private readonly Regex _reg = new Regex("window.baidu.sug\\((.*)\\)");
public override async Task> SuggestionsAsync(string query, CancellationToken token)
@@ -24,7 +26,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Main._context.API.LogException(nameof(Baidu), "Can't get suggestion from Baidu", e);
+ Main._context.API.LogException(ClassName, "Can't get suggestion from Baidu", e);
return null;
}
@@ -39,7 +41,7 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (JsonException e)
{
- Main._context.API.LogException(nameof(Baidu), "Can't parse suggestions", e);
+ Main._context.API.LogException(ClassName, "Can't parse suggestions", e);
return new List();
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
index 9efc36263..ccfa5dcc8 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs
@@ -10,6 +10,8 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
public class Bing : SuggestionSource
{
+ private static readonly string ClassName = nameof(Bing);
+
public override async Task> SuggestionsAsync(string query, CancellationToken token)
{
try
@@ -33,12 +35,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or { InnerException: TimeoutException })
{
- Main._context.API.LogException(nameof(Bing), "Can't get suggestion from Bing", e);
+ Main._context.API.LogException(ClassName, "Can't get suggestion from Bing", e);
return null;
}
catch (JsonException e)
{
- Main._context.API.LogException(nameof(Bing), "Can't parse suggestions", e);
+ Main._context.API.LogException(ClassName, "Can't parse suggestions", e);
return new List();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
index 1d248caf3..0627f7220 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/DuckDuckGo.cs
@@ -10,6 +10,8 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
public class DuckDuckGo : SuggestionSource
{
+ private static readonly string ClassName = nameof(DuckDuckGo);
+
public override async Task> SuggestionsAsync(string query, CancellationToken token)
{
// When the search query is empty, DuckDuckGo returns `[]`. When it's not empty, it returns data
@@ -34,12 +36,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Main._context.API.LogException(nameof(DuckDuckGo), "Can't get suggestion from DuckDuckGo", e);
+ Main._context.API.LogException(ClassName, "Can't get suggestion from DuckDuckGo", e);
return null;
}
catch (JsonException e)
{
- Main._context.API.LogException(nameof(DuckDuckGo), "Can't parse suggestions", e);
+ Main._context.API.LogException(ClassName, "Can't parse suggestions", e);
return new List();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
index ad8fb508f..f28212524 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs
@@ -10,6 +10,8 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
{
public class Google : SuggestionSource
{
+ private static readonly string ClassName = nameof(Google);
+
public override async Task> SuggestionsAsync(string query, CancellationToken token)
{
try
@@ -27,12 +29,12 @@ namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources
}
catch (Exception e) when (e is HttpRequestException or {InnerException: TimeoutException})
{
- Main._context.API.LogException(nameof(Google), "Can't get suggestion from Google", e);
+ Main._context.API.LogException(ClassName, "Can't get suggestion from Google", e);
return null;
}
catch (JsonException e)
{
- Main._context.API.LogException(nameof(Google), "Can't parse suggestions", e);
+ Main._context.API.LogException(ClassName, "Can't parse suggestions", e);
return new List();
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs
index 257b0fa8b..c72230f2b 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs
@@ -11,10 +11,12 @@ namespace Flow.Launcher.Plugin.WindowsSettings
{
_api = api;
}
+
public static void Exception(string message, Exception exception, Type type, [CallerMemberName] string methodName = "")
{
_api?.LogException(type.FullName, message, exception, methodName);
}
+
public static void Warn(string message, Type type, [CallerMemberName] string methodName = "")
{
_api?.LogWarn(type.FullName, message, methodName);
From 20d266138047225f5bf02d1d4041955422789789 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 18:04:50 +0800
Subject: [PATCH 0774/1442] Code quality
---
.../Environments/JavaScriptEnvironment.cs | 1 -
.../Environments/JavaScriptV2Environment.cs | 1 -
.../Environments/PythonEnvironment.cs | 5 ++++-
.../Environments/TypeScriptEnvironment.cs | 5 ++++-
.../Environments/TypeScriptV2Environment.cs | 5 ++++-
Flow.Launcher.Core/Plugin/ProcessStreamPluginV2.cs | 14 +++++---------
6 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptEnvironment.cs
index b67059b1b..62d2d3e91 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptEnvironment.cs
@@ -4,7 +4,6 @@ using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
-
internal class JavaScriptEnvironment : TypeScriptEnvironment
{
internal override string Language => AllowedLanguage.JavaScript;
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptV2Environment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptV2Environment.cs
index 6c8c5aa57..726bc4cd4 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptV2Environment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/JavaScriptV2Environment.cs
@@ -4,7 +4,6 @@ using Flow.Launcher.Plugin;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
-
internal class JavaScriptV2Environment : TypeScriptV2Environment
{
internal override string Language => AllowedLanguage.JavaScriptV2;
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
index fab5738de..455ee096d 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs
@@ -5,6 +5,7 @@ using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
+using Microsoft.VisualStudio.Threading;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -30,13 +31,15 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal PythonEnvironment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
+ private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());
+
internal override void InstallEnvironment()
{
FilesFolders.RemoveFolderIfExists(InstallPath, (s) => API.ShowMsgBox(s));
// Python 3.11.4 is no longer Windows 7 compatible. If user is on Win 7 and
// uses Python plugin they need to custom install and use v3.8.9
- DroplexPackage.Drop(App.python_3_11_4_embeddable, InstallPath).Wait();
+ JTF.Run(() => DroplexPackage.Drop(App.python_3_11_4_embeddable, InstallPath));
PluginsSettingsFilePath = ExecutablePath;
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
index 8a4f527ba..12965286f 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs
@@ -5,6 +5,7 @@ using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
+using Microsoft.VisualStudio.Threading;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -27,11 +28,13 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal TypeScriptEnvironment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
+ private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());
+
internal override void InstallEnvironment()
{
FilesFolders.RemoveFolderIfExists(InstallPath, (s) => API.ShowMsgBox(s));
- DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath).Wait();
+ JTF.Run(() => DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath));
PluginsSettingsFilePath = ExecutablePath;
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
index 61fd28376..6960b79c9 100644
--- a/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs
@@ -5,6 +5,7 @@ using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
+using Microsoft.VisualStudio.Threading;
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{
@@ -27,11 +28,13 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments
internal TypeScriptV2Environment(List pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
+ private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());
+
internal override void InstallEnvironment()
{
FilesFolders.RemoveFolderIfExists(InstallPath, (s) => API.ShowMsgBox(s));
- DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath).Wait();
+ JTF.Run(() => DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath));
PluginsSettingsFilePath = ExecutablePath;
}
diff --git a/Flow.Launcher.Core/Plugin/ProcessStreamPluginV2.cs b/Flow.Launcher.Core/Plugin/ProcessStreamPluginV2.cs
index bae263157..7a6bf07e2 100644
--- a/Flow.Launcher.Core/Plugin/ProcessStreamPluginV2.cs
+++ b/Flow.Launcher.Core/Plugin/ProcessStreamPluginV2.cs
@@ -1,21 +1,19 @@
-#nullable enable
-
-using System;
-using System.Collections.Generic;
+using System;
using System.Diagnostics;
using System.IO.Pipelines;
using System.Threading.Tasks;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin;
using Meziantou.Framework.Win32;
-using Microsoft.VisualBasic.ApplicationServices;
using Nerdbank.Streams;
+#nullable enable
+
namespace Flow.Launcher.Core.Plugin
{
internal abstract class ProcessStreamPluginV2 : JsonRPCPluginV2
{
- private static JobObject _jobObject = new JobObject();
+ private static readonly JobObject _jobObject = new();
static ProcessStreamPluginV2()
{
@@ -66,11 +64,10 @@ namespace Flow.Launcher.Core.Plugin
ClientPipe = new DuplexPipe(reader, writer);
}
-
public override async Task ReloadDataAsync()
{
var oldProcess = ClientProcess;
- ClientProcess = Process.Start(StartInfo);
+ ClientProcess = Process.Start(StartInfo)!;
ArgumentNullException.ThrowIfNull(ClientProcess);
SetupPipe(ClientProcess);
await base.ReloadDataAsync();
@@ -79,7 +76,6 @@ namespace Flow.Launcher.Core.Plugin
oldProcess.Dispose();
}
-
public override async ValueTask DisposeAsync()
{
await base.DisposeAsync();
From 43dbf1a0ee013bcfda2bd9d43a1c22863a72e9b9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 18:13:55 +0800
Subject: [PATCH 0775/1442] Remove useless functions & Fix debug issue
---
Flow.Launcher.Core/Plugin/PluginsLoader.cs | 8 +--
Flow.Launcher.Infrastructure/Logger/Log.cs | 64 +---------------------
Flow.Launcher/ViewModel/MainViewModel.cs | 4 +-
3 files changed, 7 insertions(+), 69 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs
index 1010d9f08..256c36065 100644
--- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs
+++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs
@@ -89,19 +89,19 @@ namespace Flow.Launcher.Core.Plugin
#else
catch (Exception e) when (assembly == null)
{
- Log.Exception($"|PluginsLoader.DotNetPlugins|Couldn't load assembly for the plugin: {metadata.Name}", e);
+ Log.Exception(ClassName, $"Couldn't load assembly for the plugin: {metadata.Name}", e);
}
catch (InvalidOperationException e)
{
- Log.Exception($"|PluginsLoader.DotNetPlugins|Can't find the required IPlugin interface for the plugin: <{metadata.Name}>", e);
+ Log.Exception(ClassName, $"Can't find the required IPlugin interface for the plugin: <{metadata.Name}>", e);
}
catch (ReflectionTypeLoadException e)
{
- Log.Exception($"|PluginsLoader.DotNetPlugins|The GetTypes method was unable to load assembly types for the plugin: <{metadata.Name}>", e);
+ Log.Exception(ClassName, $"The GetTypes method was unable to load assembly types for the plugin: <{metadata.Name}>", e);
}
catch (Exception e)
{
- Log.Exception($"|PluginsLoader.DotNetPlugins|The following plugin has errored and can not be loaded: <{metadata.Name}>", e);
+ Log.Exception(ClassName, $"The following plugin has errored and can not be loaded: <{metadata.Name}>", e);
}
#endif
diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs
index 25cfbbd3d..09eb98f46 100644
--- a/Flow.Launcher.Infrastructure/Logger/Log.cs
+++ b/Flow.Launcher.Infrastructure/Logger/Log.cs
@@ -94,13 +94,6 @@ namespace Flow.Launcher.Infrastructure.Logger
logger.Fatal(message);
}
- private static bool FormatValid(string message)
- {
- var parts = message.Split('|');
- var valid = parts.Length == 3 && !string.IsNullOrWhiteSpace(parts[1]) && !string.IsNullOrWhiteSpace(parts[2]);
- return valid;
- }
-
public static void Exception(string className, string message, System.Exception exception, [CallerMemberName] string methodName = "")
{
exception = exception.Demystify();
@@ -135,57 +128,14 @@ namespace Flow.Launcher.Infrastructure.Logger
return className;
}
+#if !DEBUG
private static void ExceptionInternal(string classAndMethod, string message, System.Exception e)
{
var logger = LogManager.GetLogger(classAndMethod);
logger.Error(e, message);
}
-
- private static void LogInternal(string message, LogLevel level)
- {
- if (FormatValid(message))
- {
- var parts = message.Split('|');
- var prefix = parts[1];
- var unprefixed = parts[2];
- var logger = LogManager.GetLogger(prefix);
- logger.Log(level, unprefixed);
- }
- else
- {
- LogFaultyFormat(message);
- }
- }
-
- /// Example: "|ClassName.MethodName|Message"
- /// Example: "|ClassName.MethodName|Message"
- /// Exception
- public static void Exception(string message, System.Exception e)
- {
- e = e.Demystify();
-#if DEBUG
- ExceptionDispatchInfo.Capture(e).Throw();
-#else
- if (FormatValid(message))
- {
- var parts = message.Split('|');
- var prefix = parts[1];
- var unprefixed = parts[2];
- ExceptionInternal(prefix, unprefixed, e);
- }
- else
- {
- LogFaultyFormat(message);
- }
#endif
- }
-
- /// Example: "|ClassName.MethodName|Message"
- public static void Error(string message)
- {
- LogInternal(message, LogLevel.Error);
- }
public static void Error(string className, string message, [CallerMemberName] string methodName = "")
{
@@ -206,23 +156,11 @@ namespace Flow.Launcher.Infrastructure.Logger
LogInternal(LogLevel.Debug, className, message, methodName);
}
- /// Example: "|ClassName.MethodName|Message""
- public static void Debug(string message)
- {
- LogInternal(message, LogLevel.Debug);
- }
-
public static void Info(string className, string message, [CallerMemberName] string methodName = "")
{
LogInternal(LogLevel.Info, className, message, methodName);
}
- /// Example: "|ClassName.MethodName|Message"
- public static void Info(string message)
- {
- LogInternal(message, LogLevel.Info);
- }
-
public static void Warn(string className, string message, [CallerMemberName] string methodName = "")
{
LogInternal(LogLevel.Warn, className, message, methodName);
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 998fdb906..00675149b 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -222,7 +222,7 @@ namespace Flow.Launcher.ViewModel
#if DEBUG
throw t.Exception;
#else
- Log.Error($"Error happen in task dealing with viewupdate for results. {t.Exception}");
+ App.API.LogError(ClassName, $"Error happen in task dealing with viewupdate for results. {t.Exception}");
_resultsViewUpdateTask =
Task.Run(UpdateActionAsync).ContinueWith(continueAction, CancellationToken.None, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
#endif
@@ -892,7 +892,7 @@ namespace Flow.Launcher.ViewModel
#if DEBUG
throw new NotImplementedException("ResultAreaColumn should match ResultAreaColumnPreviewShown/ResultAreaColumnPreviewHidden value");
#else
- Log.Error("MainViewModel", "ResultAreaColumnPreviewHidden/ResultAreaColumnPreviewShown int value not implemented", "InternalPreviewVisible");
+ App.API.LogError(ClassName, "ResultAreaColumnPreviewHidden/ResultAreaColumnPreviewShown int value not implemented", "InternalPreviewVisible");
return false;
#endif
}
From 3fab9da633f5d7a13b28b379f43ac93bf170858a Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Sun, 13 Apr 2025 18:14:39 +0800
Subject: [PATCH 0776/1442] Fix incorrect class name reference
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---
Flow.Launcher/ViewModel/ResultViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs
index ef7e24c3b..648ac49bb 100644
--- a/Flow.Launcher/ViewModel/ResultViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultViewModel.cs
@@ -13,7 +13,7 @@ namespace Flow.Launcher.ViewModel
{
public class ResultViewModel : BaseModel
{
- private static readonly string ClassName = nameof(ResultsViewModel);
+ private static readonly string ClassName = nameof(ResultViewModel);
private static readonly PrivateFontCollection FontCollection = new();
private static readonly Dictionary Fonts = new();
From eec6145e1aca49f36be49a8b36099e8865ab97cf Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 13 Apr 2025 20:35:27 +0800
Subject: [PATCH 0777/1442] Fix possible win32 exception
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 54604a271..6be024389 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -376,7 +376,8 @@ namespace Flow.Launcher.Infrastructure
if (!IsForegroundWindow(hwnd))
{
var result = PInvoke.SetForegroundWindow(hwnd);
- if (!result) throw new Win32Exception(Marshal.GetLastWin32Error());
+ // If we cannot set the foreground window, we can use the foreground window and switch the layout
+ if (!result) hwnd = PInvoke.GetForegroundWindow();
}
// Get the current foreground window thread ID
From 0bdfaac6a9d2c73bce84ec9b4c5b2715da4c9a3f Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Mon, 14 Apr 2025 21:37:15 +1000
Subject: [PATCH 0778/1442] Add sponsor
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index cbb553bd1..d8ecfa671 100644
--- a/README.md
+++ b/README.md
@@ -351,6 +351,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea
+
From f8396892940ca99bb1e2c471408b1b4f18277969 Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 15 Apr 2025 05:54:46 +0900
Subject: [PATCH 0779/1442] Add Content Dialog owner
---
Flow.Launcher/HotkeyControl.xaml.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs
index 8762a934b..9af3b71aa 100644
--- a/Flow.Launcher/HotkeyControl.xaml.cs
+++ b/Flow.Launcher/HotkeyControl.xaml.cs
@@ -243,6 +243,9 @@ namespace Flow.Launcher
}
var dialog = new HotkeyControlDialog(Hotkey, DefaultHotkey, WindowTitle);
+
+ dialog.Owner = Window.GetWindow(this);
+
await dialog.ShowAsync();
switch (dialog.ResultType)
{
From 9035aa6fab026722ef5ca71ebc3d55b0cfcfea69 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 08:41:20 +0800
Subject: [PATCH 0780/1442] Fix dialog owner for all content dialog
---
Flow.Launcher/HotkeyControl.xaml.cs | 13 +++++++------
.../ViewModels/SettingsPanePluginsViewModel.cs | 3 +--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs
index 9af3b71aa..262727127 100644
--- a/Flow.Launcher/HotkeyControl.xaml.cs
+++ b/Flow.Launcher/HotkeyControl.xaml.cs
@@ -1,6 +1,4 @@
-#nullable enable
-
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
@@ -9,6 +7,8 @@ using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.UserSettings;
+#nullable enable
+
namespace Flow.Launcher
{
public partial class HotkeyControl
@@ -242,9 +242,10 @@ namespace Flow.Launcher
HotKeyMapper.RemoveHotkey(Hotkey);
}
- var dialog = new HotkeyControlDialog(Hotkey, DefaultHotkey, WindowTitle);
-
- dialog.Owner = Window.GetWindow(this);
+ var dialog = new HotkeyControlDialog(Hotkey, DefaultHotkey, WindowTitle)
+ {
+ Owner = Window.GetWindow(this)
+ };
await dialog.ShowAsync();
switch (dialog.ResultType)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index b89e970e9..916fd1ece 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -5,7 +5,6 @@ using System.Windows.Controls;
using System.Windows;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Plugin;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
@@ -116,6 +115,7 @@ public partial class SettingsPanePluginsViewModel : BaseModel
{
var helpDialog = new ContentDialog()
{
+ Owner = Application.Current.MainWindow,
Content = new StackPanel
{
Children =
@@ -146,7 +146,6 @@ public partial class SettingsPanePluginsViewModel : BaseModel
}
}
},
-
PrimaryButtonText = (string)Application.Current.Resources["commonOK"],
CornerRadius = new CornerRadius(8),
Style = (Style)Application.Current.Resources["ContentDialog"]
From 28c7538fc3b00bc88a62336bba79d04a0b841fc3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 09:06:31 +0800
Subject: [PATCH 0781/1442] Fix possible Win32Exception
---
Flow.Launcher.Infrastructure/Win32Helper.cs | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 6be024389..798501ae3 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -365,21 +365,10 @@ namespace Flow.Launcher.Infrastructure
// No installed English layout found
if (enHKL == HKL.Null) return;
- // When application is exiting, the Application.Current will be null
- if (Application.Current == null) return;
-
- // Get the FL main window
- var hwnd = GetWindowHandle(Application.Current.MainWindow, true);
+ // Get the foreground window
+ var hwnd = PInvoke.GetForegroundWindow();
if (hwnd == HWND.Null) return;
- // Check if the FL main window is the current foreground window
- if (!IsForegroundWindow(hwnd))
- {
- var result = PInvoke.SetForegroundWindow(hwnd);
- // If we cannot set the foreground window, we can use the foreground window and switch the layout
- if (!result) hwnd = PInvoke.GetForegroundWindow();
- }
-
// Get the current foreground window thread ID
var threadId = PInvoke.GetWindowThreadProcessId(hwnd);
if (threadId == 0) throw new Win32Exception(Marshal.GetLastWin32Error());
From d21ffce47af56b25bbf14e36d7b475ce3e7f4689 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 12:21:56 +0800
Subject: [PATCH 0782/1442] Use get window to get owner
---
.../SettingPages/ViewModels/SettingsPanePluginsViewModel.cs | 4 ++--
Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index 916fd1ece..de7cf15c3 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -111,11 +111,11 @@ public partial class SettingsPanePluginsViewModel : BaseModel
.ToList();
[RelayCommand]
- private async Task OpenHelperAsync()
+ private async Task OpenHelperAsync(Button button)
{
var helpDialog = new ContentDialog()
{
- Owner = Application.Current.MainWindow,
+ Owner = Window.GetWindow(button),
Content = new StackPanel
{
Children =
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index f9f708314..f3d630306 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -57,6 +57,7 @@
Height="34"
Margin="0 0 20 0"
Command="{Binding OpenHelperCommand}"
+ CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
Content=""
FontFamily="{DynamicResource SymbolThemeFontFamily}"
FontSize="14" />
From c382732f974d99211b4d739340f6fcd7fa3cedc9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 12:49:09 +0800
Subject: [PATCH 0783/1442] Improve windows exiting
---
Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
index 043eb7a19..39bf49654 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs
@@ -362,6 +362,7 @@ namespace Flow.Launcher.Plugin.Sys
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe89f"),
Action = c =>
{
+ _context.API.HideMainWindow();
Application.Current.MainWindow.Close();
return true;
}
From 8e51096ba9ded910e3c2c2906404e5bc5f247701 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 12:51:38 +0800
Subject: [PATCH 0784/1442] Improve log messages
---
Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index a49385a02..86df01a30 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -171,8 +171,8 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (System.Exception e2)
{
- Log.Exception(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on first try", e);
- Log.Exception(ClassName, $"|ImageLoader.Load|Failed to get thumbnail for {path} on second try", e2);
+ Log.Exception(ClassName, $"Failed to get thumbnail for {path} on first try", e);
+ Log.Exception(ClassName, $"Failed to get thumbnail for {path} on second try", e2);
ImageSource image = ImageCache[Constant.MissingImgIcon, false];
ImageCache[path, false] = image;
From a1b5941039da7370ee3c69d2c90ec61d7859ce35 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 12:52:09 +0800
Subject: [PATCH 0785/1442] Improve WindowsThumbnailProvider
---
.../Image/ThumbnailReader.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
index b98ea50fe..fe389a331 100644
--- a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
@@ -12,7 +12,7 @@ using Windows.Win32.Graphics.Gdi;
namespace Flow.Launcher.Infrastructure.Image
{
///
- /// Subclass of
+ /// Subclass of
///
[Flags]
public enum ThumbnailOptions
@@ -33,6 +33,8 @@ namespace Flow.Launcher.Infrastructure.Image
private static readonly HRESULT S_ExtractionFailed = (HRESULT)0x8004B200;
+ private static readonly HRESULT S_PATHNOTFOUND = (HRESULT)0x8004B205;
+
public static BitmapSource GetThumbnail(string fileName, int width, int height, ThumbnailOptions options)
{
HBITMAP hBitmap = GetHBitmap(Path.GetFullPath(fileName), width, height, options);
@@ -79,9 +81,10 @@ namespace Flow.Launcher.Infrastructure.Image
{
imageFactory.GetImage(size, (SIIGBF)options, &hBitmap);
}
- catch (COMException ex) when (ex.HResult == S_ExtractionFailed && options == ThumbnailOptions.ThumbnailOnly)
+ catch (COMException ex) when (options == ThumbnailOptions.ThumbnailOnly &&
+ (ex.HResult == S_PATHNOTFOUND || ex.HResult == S_ExtractionFailed))
{
- // Fallback to IconOnly if ThumbnailOnly fails
+ // Fallback to IconOnly if extraction fails or files cannot be found
imageFactory.GetImage(size, (SIIGBF)ThumbnailOptions.IconOnly, &hBitmap);
}
catch (FileNotFoundException) when (options == ThumbnailOptions.ThumbnailOnly)
@@ -89,6 +92,11 @@ namespace Flow.Launcher.Infrastructure.Image
// Fallback to IconOnly if files cannot be found
imageFactory.GetImage(size, (SIIGBF)ThumbnailOptions.IconOnly, &hBitmap);
}
+ catch (System.Exception ex)
+ {
+ // Handle other exceptions
+ throw new InvalidOperationException("Failed to get thumbnail", ex);
+ }
}
finally
{
From 83fa654e2733ef28af1bef3d4f85ac607b1000b9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 12:59:58 +0800
Subject: [PATCH 0786/1442] Improve constant name
---
Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
index fe389a331..4ce0df026 100644
--- a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs
@@ -31,7 +31,7 @@ namespace Flow.Launcher.Infrastructure.Image
private static readonly Guid GUID_IShellItem = typeof(IShellItem).GUID;
- private static readonly HRESULT S_ExtractionFailed = (HRESULT)0x8004B200;
+ private static readonly HRESULT S_EXTRACTIONFAILED = (HRESULT)0x8004B200;
private static readonly HRESULT S_PATHNOTFOUND = (HRESULT)0x8004B205;
@@ -82,7 +82,7 @@ namespace Flow.Launcher.Infrastructure.Image
imageFactory.GetImage(size, (SIIGBF)options, &hBitmap);
}
catch (COMException ex) when (options == ThumbnailOptions.ThumbnailOnly &&
- (ex.HResult == S_PATHNOTFOUND || ex.HResult == S_ExtractionFailed))
+ (ex.HResult == S_PATHNOTFOUND || ex.HResult == S_EXTRACTIONFAILED))
{
// Fallback to IconOnly if extraction fails or files cannot be found
imageFactory.GetImage(size, (SIIGBF)ThumbnailOptions.IconOnly, &hBitmap);
From 81007f79aee6ca7671880afaa8e329e99bacb9f4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:18:06 +0800
Subject: [PATCH 0787/1442] Remove mvvm command for code quality
---
Flow.Launcher/ViewModel/RelayCommand.cs | 29 ----------
.../Flow.Launcher.Plugin.Explorer.csproj | 1 +
.../ViewModels/RelayCommand.cs | 27 ---------
.../ViewModels/SettingsViewModel.cs | 55 +++++++------------
.../Views/ExplorerSettings.xaml | 6 +-
5 files changed, 24 insertions(+), 94 deletions(-)
delete mode 100644 Flow.Launcher/ViewModel/RelayCommand.cs
delete mode 100644 Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/RelayCommand.cs
diff --git a/Flow.Launcher/ViewModel/RelayCommand.cs b/Flow.Launcher/ViewModel/RelayCommand.cs
deleted file mode 100644
index e8d4af8b5..000000000
--- a/Flow.Launcher/ViewModel/RelayCommand.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Windows.Input;
-
-namespace Flow.Launcher.ViewModel
-{
- public class RelayCommand : ICommand
- {
- private readonly Action
@@ -272,7 +272,7 @@
Margin="{StaticResource SettingPanelItemLeftMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
- Command="{Binding OpenFolderEditorPath}"
+ Command="{Binding OpenFolderEditorPathCommand}"
Content="{DynamicResource select}" />
@@ -299,7 +299,7 @@
Margin="{StaticResource SettingPanelItemLeftMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
- Command="{Binding OpenShellPath}"
+ Command="{Binding OpenShellPathCommand}"
Content="{DynamicResource select}" />
From 1e603ea20f800704b939ccf1941a8d14d8274f73 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:21:00 +0800
Subject: [PATCH 0788/1442] Code quality
---
.../Helper/SortOptionTranslationHelper.cs | 2 +-
.../Views/ActionKeywordSetting.xaml.cs | 3 +++
.../Views/ExplorerSettings.xaml.cs | 12 +++---------
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/SortOptionTranslationHelper.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/SortOptionTranslationHelper.cs
index 0a3a2ae43..72f58f5b6 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/SortOptionTranslationHelper.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/SortOptionTranslationHelper.cs
@@ -16,7 +16,7 @@ public static class SortOptionTranslationHelper
ArgumentNullException.ThrowIfNull(API);
var enumName = Enum.GetName(sortOption);
- var splited = enumName.Split('_');
+ var splited = enumName!.Split('_');
var name = string.Join('_', splited[..^1]);
var direction = splited[^1];
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
index 73c35b1c8..000b2558d 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs
@@ -85,6 +85,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views
DialogResult = false;
Close();
}
+
private void TxtCurrentActionKeyword_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
@@ -94,11 +95,13 @@ namespace Flow.Launcher.Plugin.Explorer.Views
e.Handled = true;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
+
private bool SetField(ref T field, T value, [CallerMemberName] string propertyName = null)
{
if (EqualityComparer.Default.Equals(field, value))
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
index b7f5efc3c..9203ece9a 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
@@ -1,11 +1,10 @@
-using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
-using Flow.Launcher.Plugin.Explorer.ViewModels;
-using System.Collections.Generic;
-using System.ComponentModel;
+using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
+using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
+using Flow.Launcher.Plugin.Explorer.ViewModels;
using DataFormats = System.Windows.DataFormats;
using DragDropEffects = System.Windows.DragDropEffects;
using DragEventArgs = System.Windows.DragEventArgs;
@@ -19,9 +18,6 @@ namespace Flow.Launcher.Plugin.Explorer.Views
{
private readonly SettingsViewModel viewModel;
- private List actionKeywordsListView;
-
-
public ExplorerSettings(SettingsViewModel viewModel)
{
DataContext = viewModel;
@@ -39,8 +35,6 @@ namespace Flow.Launcher.Plugin.Explorer.Views
lbxExcludedPaths.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
}
-
-
private void AccessLinkDragDrop(string containerName, DragEventArgs e)
{
var files = (string[])e.Data.GetData(DataFormats.FileDrop);
From 1d16b30b64924af0b51dedf4d6f7f9186e9d1984 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:22:22 +0800
Subject: [PATCH 0789/1442] Suppress async void
---
Flow.Launcher/Msg.xaml.cs | 1 +
.../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 4 ++++
.../SearchSourceSetting.xaml.cs | 2 ++
3 files changed, 7 insertions(+)
diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs
index 110235cb5..923c3692f 100644
--- a/Flow.Launcher/Msg.xaml.cs
+++ b/Flow.Launcher/Msg.xaml.cs
@@ -59,6 +59,7 @@ namespace Flow.Launcher
Close();
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
public async void Show(string title, string subTitle, string iconPath)
{
tbTitle.Text = title;
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index c42bd4f30..deb110698 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -146,6 +146,7 @@ namespace Flow.Launcher.Plugin.Program.Views
programSourceView.Items.Refresh();
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void ReIndexing()
{
ViewRefresh();
@@ -183,6 +184,7 @@ namespace Flow.Launcher.Plugin.Program.Views
EditProgramSource(selectedProgramSource);
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void EditProgramSource(ProgramSource selectedProgramSource)
{
if (selectedProgramSource == null)
@@ -277,6 +279,7 @@ namespace Flow.Launcher.Plugin.Program.Views
}
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void btnLoadAllProgramSource_OnClick(object sender, RoutedEventArgs e)
{
await ProgramSettingDisplay.DisplayAllProgramsAsync();
@@ -284,6 +287,7 @@ namespace Flow.Launcher.Plugin.Program.Views
ViewRefresh();
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void btnProgramSourceStatus_OnClick(object sender, RoutedEventArgs e)
{
var selectedItems = programSourceView
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
index 58577dbc1..b44f130e4 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml.cs
@@ -28,6 +28,7 @@ namespace Flow.Launcher.Plugin.WebSearch
Initialize(sources, context, Action.Add);
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void Initialize(IList sources, PluginInitContext context, Action action)
{
InitializeComponent();
@@ -124,6 +125,7 @@ namespace Flow.Launcher.Plugin.WebSearch
}
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
private async void OnSelectIconClick(object sender, RoutedEventArgs e)
{
const string filter = "Image files (*.jpg, *.jpeg, *.gif, *.png, *.bmp) |*.jpg; *.jpeg; *.gif; *.png; *.bmp";
From abee9ba01550f3371c2018b5d50e97a9d8f5f3a7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:24:25 +0800
Subject: [PATCH 0790/1442] Fix nullable warning
---
.../ViewModels/ActionKeywordModel.cs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
index 2f614ead8..d4cd1348e 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
@@ -1,13 +1,15 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
+#nullable enable
+
namespace Flow.Launcher.Plugin.Explorer.Views
{
public class ActionKeywordModel : INotifyPropertyChanged
{
- private static Settings _settings;
+ private static Settings _settings = null!;
- public event PropertyChangedEventHandler PropertyChanged;
+ public event PropertyChangedEventHandler? PropertyChanged;
public static void Init(Settings settings)
{
@@ -54,4 +56,4 @@ namespace Flow.Launcher.Plugin.Explorer.Views
}
}
}
-}
\ No newline at end of file
+}
From 113bc589bda874eeba207d867032d0465cd12e43 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:24:41 +0800
Subject: [PATCH 0791/1442] Remove unused variable
---
Flow.Launcher/ReportWindow.xaml.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher/ReportWindow.xaml.cs b/Flow.Launcher/ReportWindow.xaml.cs
index 0ab785a17..24801cf52 100644
--- a/Flow.Launcher/ReportWindow.xaml.cs
+++ b/Flow.Launcher/ReportWindow.xaml.cs
@@ -15,8 +15,6 @@ namespace Flow.Launcher
{
internal partial class ReportWindow
{
- private static readonly string ClassName = nameof(ReportWindow);
-
public ReportWindow(Exception exception)
{
InitializeComponent();
From 5df56334eee4b0647803755d5713042a1e1c1ba7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:28:47 +0800
Subject: [PATCH 0792/1442] Code quality
---
.../Helper/ShellContextMenu.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs
index abb76580d..58b4e86f9 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
@@ -341,7 +341,7 @@ namespace Peter
return null;
}
- IShellFolder oParentFolder = GetParentFolder(arrFI[0].Parent.FullName);
+ IShellFolder oParentFolder = GetParentFolder(arrFI[0].Parent!.FullName);
if (null == oParentFolder)
{
return null;
@@ -1535,7 +1535,7 @@ namespace Peter
m_hookType,
m_filterFunc,
IntPtr.Zero,
- (int)AppDomain.GetCurrentThreadId());
+ Environment.CurrentManagedThreadId);
}
// ************************************************************************
From 222ef41c8f755fc76109f9c9f040863f583ec1ca Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:29:26 +0800
Subject: [PATCH 0793/1442] Fix nullabl warnings
---
.../Search/EnvironmentVariables.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs
index e526fb85a..6c4e6a3ed 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs
@@ -47,7 +47,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
foreach (DictionaryEntry special in Environment.GetEnvironmentVariables())
{
- var path = special.Value.ToString();
+ var path = special.Value!.ToString();
// we add a trailing slash to the path to make sure drive paths become valid absolute paths.
// for example, if %systemdrive% is C: we turn it to C:\
path = path.EnsureTrailingSlash();
@@ -61,7 +61,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
{
// Variables are returned with a mixture of all upper/lower case.
// Call ToUpper() to make the results look consistent
- _envStringPaths.Add(special.Key.ToString().ToUpper(), path);
+ _envStringPaths.Add(special.Key.ToString()!.ToUpper(), path);
}
}
}
From a3daac66ecc997020e13e4924c2a9318acdd080e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:30:46 +0800
Subject: [PATCH 0794/1442] Code quality
---
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index 22de4fcc0..f4c103ade 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -1,8 +1,8 @@
-using System.Windows.Navigation;
+using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
-using Page = ModernWpf.Controls.Page;
using Flow.Launcher.Infrastructure.UserSettings;
+using Page = ModernWpf.Controls.Page;
namespace Flow.Launcher.SettingPages.Views;
From 476829045d8eb9cbec9faae7fa4f298f65c3cfa8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 13:36:32 +0800
Subject: [PATCH 0795/1442] Adjust code comments
---
.../Flow.Launcher.Plugin.Explorer.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj
index f13460d3f..98164f489 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj
@@ -45,8 +45,8 @@
-
+
From f5830412c4acd994b875c4ed3b6c185bc41621db Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 20:45:00 +0800
Subject: [PATCH 0796/1442] Revert delegate to fields
---
Flow.Launcher.Plugin/Result.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index f561fcb1d..f0fcd48ff 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -128,12 +128,12 @@ namespace Flow.Launcher.Plugin
///
/// Delegate to load an icon for this result.
///
- public IconDelegate Icon { get; set; }
+ public IconDelegate Icon = null;
///
/// Delegate to load an icon for the badge of this result.
///
- public IconDelegate BadgeIcon { get; set; }
+ public IconDelegate BadgeIcon = null;
///
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
From 652e3bde86f67ad5cdd58a7000d1e77a5526f8c9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 21:21:27 +0800
Subject: [PATCH 0797/1442] Improve process killer performance
---
.../ProcessHelper.cs | 43 ++++++++++++++-----
1 file changed, 32 insertions(+), 11 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
index d7f44ccce..386782905 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs
@@ -1,9 +1,11 @@
-using Microsoft.Win32.SafeHandles;
-using System;
+using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Win32.SafeHandles;
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.System.Threading;
@@ -72,8 +74,21 @@ namespace Flow.Launcher.Plugin.ProcessKiller
///
public static unsafe Dictionary GetProcessesWithNonEmptyWindowTitle()
{
- var processDict = new Dictionary();
+ // Collect all window handles
+ var windowHandles = new List();
PInvoke.EnumWindows((hWnd, _) =>
+ {
+ if (PInvoke.IsWindowVisible(hWnd))
+ {
+ windowHandles.Add(hWnd);
+ }
+ return true;
+ }, IntPtr.Zero);
+
+ // Concurrently process each window handle
+ var processDict = new ConcurrentDictionary();
+ var processedProcessIds = new ConcurrentDictionary();
+ Parallel.ForEach(windowHandles, hWnd =>
{
var windowTitle = GetWindowTitle(hWnd);
if (!string.IsNullOrWhiteSpace(windowTitle) && PInvoke.IsWindowVisible(hWnd))
@@ -82,20 +97,26 @@ namespace Flow.Launcher.Plugin.ProcessKiller
var result = PInvoke.GetWindowThreadProcessId(hWnd, &processId);
if (result == 0u || processId == 0u)
{
- return false;
+ return;
}
- var process = Process.GetProcessById((int)processId);
- if (!processDict.ContainsKey((int)processId))
+ // Ensure each process ID is processed only once
+ if (processedProcessIds.TryAdd((int)processId, 0))
{
- processDict.Add((int)processId, windowTitle);
+ try
+ {
+ var process = Process.GetProcessById((int)processId);
+ processDict.TryAdd((int)processId, windowTitle);
+ }
+ catch
+ {
+ // Handle exceptions (e.g., process exited)
+ }
}
}
+ });
- return true;
- }, IntPtr.Zero);
-
- return processDict;
+ return new Dictionary(processDict);
}
private static unsafe string GetWindowTitle(HWND hwnd)
From 814afc75dd7ba9254c8cdfeaa6c567204223229e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 21:21:47 +0800
Subject: [PATCH 0798/1442] Add option to let process killer show window title
---
.../Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml | 1 +
Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs | 4 +++-
Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs | 2 ++
.../ViewModels/SettingsViewModel.cs | 6 ++++++
.../Views/SettingsControl.xaml | 6 ++++++
5 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml
index ea6e54fef..ddabd31f8 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml
@@ -10,6 +10,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
index 4f5d1becd..3f505139a 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
@@ -81,7 +81,9 @@ namespace Flow.Launcher.Plugin.ProcessKiller
// Filter processes based on search term
var searchTerm = query.Search;
var processlist = new List();
- var processWindowTitle = ProcessHelper.GetProcessesWithNonEmptyWindowTitle();
+ var processWindowTitle = Settings.ShowWindowTitle ?
+ ProcessHelper.GetProcessesWithNonEmptyWindowTitle() :
+ new Dictionary();
if (string.IsNullOrWhiteSpace(searchTerm))
{
foreach (var p in allPocessList)
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs
index 916bc6a39..57cd2ab86 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Settings.cs
@@ -2,6 +2,8 @@
{
public class Settings
{
+ public bool ShowWindowTitle { get; set; } = true;
+
public bool PutVisibleWindowProcessesTop { get; set; } = false;
}
}
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ViewModels/SettingsViewModel.cs
index bacf1ba08..0728d9c0f 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ViewModels/SettingsViewModel.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ViewModels/SettingsViewModel.cs
@@ -9,6 +9,12 @@
Settings = settings;
}
+ public bool ShowWindowTitle
+ {
+ get => Settings.ShowWindowTitle;
+ set => Settings.ShowWindowTitle = value;
+ }
+
public bool PutVisibleWindowProcessesTop
{
get => Settings.PutVisibleWindowProcessesTop;
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml
index d15d6c3e0..b969be4e8 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml
@@ -12,10 +12,16 @@
+
+
From 0cbd7ba1e2f422ee98960ea4bf2e0ff35633bde0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 15 Apr 2025 23:42:08 +0800
Subject: [PATCH 0799/1442] Improve option logic
---
.../Main.cs | 36 ++++++++++++++-----
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
index 3f505139a..8f5ba4bd2 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs
@@ -81,7 +81,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller
// Filter processes based on search term
var searchTerm = query.Search;
var processlist = new List();
- var processWindowTitle = Settings.ShowWindowTitle ?
+ var processWindowTitle =
+ Settings.ShowWindowTitle || Settings.PutVisibleWindowProcessesTop ?
ProcessHelper.GetProcessesWithNonEmptyWindowTitle() :
new Dictionary();
if (string.IsNullOrWhiteSpace(searchTerm))
@@ -93,12 +94,22 @@ namespace Flow.Launcher.Plugin.ProcessKiller
if (processWindowTitle.TryGetValue(p.Id, out var windowTitle))
{
// Add score to prioritize processes with visible windows
- // And use window title for those processes
- processlist.Add(new ProcessResult(p, Settings.PutVisibleWindowProcessesTop ? 200 : 0, windowTitle, null, progressNameIdTitle));
+ // Use window title for those processes if enabled
+ processlist.Add(new ProcessResult(
+ p,
+ Settings.PutVisibleWindowProcessesTop ? 200 : 0,
+ Settings.ShowWindowTitle ? windowTitle : progressNameIdTitle,
+ null,
+ progressNameIdTitle));
}
else
{
- processlist.Add(new ProcessResult(p, 0, progressNameIdTitle, null, progressNameIdTitle));
+ processlist.Add(new ProcessResult(
+ p,
+ 0,
+ progressNameIdTitle,
+ null,
+ progressNameIdTitle));
}
}
}
@@ -117,13 +128,17 @@ namespace Flow.Launcher.Plugin.ProcessKiller
if (score > 0)
{
// Add score to prioritize processes with visible windows
- // And use window title for those processes
+ // Use window title for those processes
if (Settings.PutVisibleWindowProcessesTop)
{
score += 200;
}
- processlist.Add(new ProcessResult(p, score, windowTitle,
- score == windowTitleMatch.Score ? windowTitleMatch : null, progressNameIdTitle));
+ processlist.Add(new ProcessResult(
+ p,
+ score,
+ Settings.ShowWindowTitle ? windowTitle : progressNameIdTitle,
+ score == windowTitleMatch.Score ? windowTitleMatch : null,
+ progressNameIdTitle));
}
}
else
@@ -132,7 +147,12 @@ namespace Flow.Launcher.Plugin.ProcessKiller
var score = processNameIdMatch.Score;
if (score > 0)
{
- processlist.Add(new ProcessResult(p, score, progressNameIdTitle, processNameIdMatch, progressNameIdTitle));
+ processlist.Add(new ProcessResult(
+ p,
+ score,
+ progressNameIdTitle,
+ processNameIdMatch,
+ progressNameIdTitle));
}
}
}
From a28ee701b8a562c6974a4b6139055854881bc45c Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 17 Apr 2025 18:45:31 +0900
Subject: [PATCH 0800/1442] Add settingwindowfont config and menu
---
.../UserSettings/Settings.cs | 21 ++++----
.../ViewModels/SettingsPaneAboutViewModel.cs | 49 +++++++++++++++++++
.../SettingPages/Views/SettingsPaneAbout.xaml | 46 ++++++++++++++---
.../Views/SettingsPaneAbout.xaml.cs | 22 ++++++++-
Flow.Launcher/SettingWindow.xaml | 1 +
Flow.Launcher/SettingWindow.xaml.cs | 1 +
.../ViewModel/SettingWindowViewModel.cs | 26 +++++++++-
7 files changed, 147 insertions(+), 19 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 0bd1a809b..d91574bdc 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -65,19 +65,21 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{ "pt", "Noto Sans" }
};
- public static string GetSystemDefaultFont()
+ public static string GetSystemDefaultFont(bool? useNoto = null)
{
try
{
- var culture = CultureInfo.CurrentCulture;
- var language = culture.Name; // e.g., "zh-TW"
- var langPrefix = language.Split('-')[0]; // e.g., "zh"
-
- // First, try to find by full name, and if not found, fallback to prefix
- if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
+ if (useNoto != false)
{
- if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
- return notoFont;
+ var culture = CultureInfo.CurrentCulture;
+ var language = culture.Name; // e.g., "zh-TW"
+ var langPrefix = language.Split('-')[0]; // e.g., "zh"
+
+ if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
+ {
+ if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
+ return notoFont;
+ }
}
var font = SystemFonts.MessageFontFamily;
@@ -162,6 +164,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultSubFontStyle { get; set; }
public string ResultSubFontWeight { get; set; }
public string ResultSubFontStretch { get; set; }
+ public string SettingWindowFont { get; set; } = GetSystemDefaultFont(false);
public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 6cfb98306..abc7a2d16 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Media;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Infrastructure;
@@ -268,4 +270,51 @@ public partial class SettingsPaneAboutViewModel : BaseModel
return "0 B";
}
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ private string _settingWindowFont;
+
+ public string SettingWindowFont
+ {
+ get => _settings.SettingWindowFont;
+ set
+ {
+ if (_settings.SettingWindowFont != value)
+ {
+ _settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+
+ [RelayCommand]
+ private void ResetSettingWindowFont()
+ {
+ string defaultFont = GetSystemDefaultFont();
+ _settings.SettingWindowFont = defaultFont;
+ }
+
+ public static string GetSystemDefaultFont()
+ {
+ try
+ {
+ var font = SystemFonts.MessageFontFamily;
+ if (font.FamilyNames.TryGetValue(System.Windows.Markup.XmlLanguage.GetLanguage("en-US"), out var englishName))
+ {
+ return englishName;
+ }
+
+ return font.Source ?? "Segoe UI";
+ }
+ catch
+ {
+ return "Segoe UI";
+ }
+ }
+
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
index f7deee7cf..b3991743d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
@@ -12,6 +12,11 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ _settings.SettingWindowLeft;
set => _settings.SettingWindowLeft = value;
}
+
+ public string SettingWindowFont
+ {
+ get => _settings.SettingWindowFont;
+ set
+ {
+ if (_settings.SettingWindowFont != value)
+ {
+ _settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
}
From e869b0c682e5a3b0c1d8f970f5a047592ff924a6 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 17 Apr 2025 22:47:58 +0800
Subject: [PATCH 0801/1442] Add remarks for AddActionKeyword function
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index a73ead814..61711d696 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -228,6 +228,10 @@ namespace Flow.Launcher.Plugin
///
/// ID for plugin that needs to add action keyword
/// The actionkeyword that is supposed to be added
+ ///
+ /// If new action keyword contains any whitespace, FL will still add it but it will not work for users.
+ /// So plugin should check the whitespace before calling this function.
+ ///
void AddActionKeyword(string pluginId, string newActionKeyword);
///
From 7797527dc7bec6521d03b0b7717fa390eccb4feb Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 17 Apr 2025 22:48:38 +0800
Subject: [PATCH 0802/1442] Improve API documents
---
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 61711d696..31580fbe8 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -223,7 +223,7 @@ namespace Flow.Launcher.Plugin
Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath, Action reportProgress = null, CancellationToken token = default);
///
- /// Add ActionKeyword and update action keyword metadata for specific plugin
+ /// Add ActionKeyword and update action keyword metadata for specific plugin.
/// Before adding, please check if action keyword is already assigned by
///
/// ID for plugin that needs to add action keyword
@@ -284,9 +284,10 @@ namespace Flow.Launcher.Plugin
T LoadSettingJsonStorage() where T : new();
///
- /// Save JsonStorage for current plugin's setting. This is the method used to save settings to json in Flow.Launcher
+ /// Save JsonStorage for current plugin's setting. This is the method used to save settings to json in Flow.
/// This method will save the original instance loaded with LoadJsonStorage.
- /// This API call is for manually Save. Flow will automatically save all setting type that has called LoadSettingJsonStorage or SaveSettingJsonStorage previously.
+ /// This API call is for manually Save.
+ /// Flow will automatically save all setting type that has called or previously.
///
/// Type for Serialization
///
@@ -428,9 +429,10 @@ namespace Flow.Launcher.Plugin
Task LoadCacheBinaryStorageAsync(string cacheName, string cacheDirectory, T defaultData) where T : new();
///
- /// Save BinaryStorage for current plugin's cache. This is the method used to save cache to binary in Flow.Launcher
+ /// Save BinaryStorage for current plugin's cache. This is the method used to save cache to binary in Flow.
/// This method will save the original instance loaded with LoadCacheBinaryStorageAsync.
- /// This API call is for manually Save. Flow will automatically save all cache type that has called LoadCacheBinaryStorageAsync or SaveCacheBinaryStorageAsync previously.
+ /// This API call is for manually Save.
+ /// Flow will automatically save all cache type that has called or previously.
///
/// Type for Serialization
/// Cache file name
From 3eb9493bdd23c6a3bf686d097c19a8ff481e93ab Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 17 Apr 2025 23:01:45 +0800
Subject: [PATCH 0803/1442] Remove unused usings
---
Flow.Launcher/Helper/AutoStartup.cs | 1 -
Flow.Launcher/Helper/HotKeyMapper.cs | 1 -
2 files changed, 2 deletions(-)
diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs
index 568ea7944..81568875e 100644
--- a/Flow.Launcher/Helper/AutoStartup.cs
+++ b/Flow.Launcher/Helper/AutoStartup.cs
@@ -3,7 +3,6 @@ using System.IO;
using System.Linq;
using System.Security.Principal;
using Flow.Launcher.Infrastructure;
-using Flow.Launcher.Infrastructure.Logger;
using Microsoft.Win32;
using Microsoft.Win32.TaskScheduler;
diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs
index 1e83415cc..e5fabb3a8 100644
--- a/Flow.Launcher/Helper/HotKeyMapper.cs
+++ b/Flow.Launcher/Helper/HotKeyMapper.cs
@@ -5,7 +5,6 @@ using NHotkey;
using NHotkey.Wpf;
using Flow.Launcher.ViewModel;
using ChefKeys;
-using Flow.Launcher.Infrastructure.Logger;
using CommunityToolkit.Mvvm.DependencyInjection;
namespace Flow.Launcher.Helper;
From 1b0c11425504bc024919af2f9b9132e8076c4e10 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 17 Apr 2025 23:14:41 +0800
Subject: [PATCH 0804/1442] Fix possible window show issue during startup
---
Flow.Launcher/App.xaml.cs | 11 +---
Flow.Launcher/Helper/AutoStartup.cs | 64 +++++++++++--------
.../SettingsPaneGeneralViewModel.cs | 4 +-
3 files changed, 43 insertions(+), 36 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 87677f58a..87698a545 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -202,18 +202,11 @@ namespace Flow.Launcher
{
// we try to enable auto-startup on first launch, or reenable if it was removed
// but the user still has the setting set
- if (_settings.StartFlowLauncherOnSystemStartup && !Helper.AutoStartup.IsEnabled)
+ if (_settings.StartFlowLauncherOnSystemStartup)
{
try
{
- if (_settings.UseLogonTaskForStartup)
- {
- Helper.AutoStartup.EnableViaLogonTask();
- }
- else
- {
- Helper.AutoStartup.EnableViaRegistry();
- }
+ Helper.AutoStartup.CheckIsEnabled(_settings.UseLogonTaskForStartup);
}
catch (Exception e)
{
diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs
index 81568875e..b83bb5948 100644
--- a/Flow.Launcher/Helper/AutoStartup.cs
+++ b/Flow.Launcher/Helper/AutoStartup.cs
@@ -16,29 +16,37 @@ public class AutoStartup
private const string LogonTaskName = $"{Constant.FlowLauncher} Startup";
private const string LogonTaskDesc = $"{Constant.FlowLauncher} Auto Startup";
- public static bool IsEnabled
+ public static void CheckIsEnabled(bool useLogonTaskForStartup)
{
- get
+ // We need to check both because if both of them are enabled,
+ // Hide Flow Launcher on startup will not work since the later one will trigger main window show event
+ var logonTaskEnabled = CheckLogonTask();
+ var registryEnabled = CheckRegistry();
+ if (useLogonTaskForStartup)
{
- // Check if logon task is enabled
- if (CheckLogonTask())
+ // Enable logon task
+ if (!logonTaskEnabled)
{
- return true;
+ Enable(true);
}
-
- // Check if registry is enabled
- try
+ // Disable registry
+ if (registryEnabled)
{
- using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
- var path = key?.GetValue(Constant.FlowLauncher) as string;
- return path == Constant.ExecutablePath;
+ Disable(false);
}
- catch (Exception e)
+ }
+ else
+ {
+ // Enable registry
+ if (!registryEnabled)
{
- App.API.LogError(ClassName, $"Ignoring non-critical registry error (querying if enabled): {e}");
+ Enable(false);
+ }
+ // Disable logon task
+ if (logonTaskEnabled)
+ {
+ Disable(true);
}
-
- return false;
}
}
@@ -69,22 +77,28 @@ public class AutoStartup
return false;
}
+ private static bool CheckRegistry()
+ {
+ try
+ {
+ using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
+ var path = key?.GetValue(Constant.FlowLauncher) as string;
+ return path == Constant.ExecutablePath;
+ }
+ catch (Exception e)
+ {
+ App.API.LogError(ClassName, $"Ignoring non-critical registry error (querying if enabled): {e}");
+ }
+
+ return false;
+ }
+
public static void DisableViaLogonTaskAndRegistry()
{
Disable(true);
Disable(false);
}
- public static void EnableViaLogonTask()
- {
- Enable(true);
- }
-
- public static void EnableViaRegistry()
- {
- Enable(false);
- }
-
public static void ChangeToViaLogonTask()
{
Disable(false);
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 021c9d7fe..6b56caf5e 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -48,11 +48,11 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
if (UseLogonTaskForStartup)
{
- AutoStartup.EnableViaLogonTask();
+ AutoStartup.ChangeToViaLogonTask();
}
else
{
- AutoStartup.EnableViaRegistry();
+ AutoStartup.ChangeToViaRegistry();
}
}
else
From dd61ab43cb5cc47d54edf21df77452d76b1ad1c3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 18 Apr 2025 07:17:33 +0800
Subject: [PATCH 0805/1442] Use null as flag to report community source error
---
.../ExternalPlugins/CommunityPluginSource.cs | 8 ++++----
.../ExternalPlugins/CommunityPluginStore.cs | 12 ++++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
index ac27c523c..6f3b23e11 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs
@@ -16,12 +16,12 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
public record CommunityPluginSource(string ManifestFileUrl)
{
+ private static readonly string ClassName = nameof(CommunityPluginSource);
+
// We should not initialize API in static constructor because it will create another API instance
private static IPublicAPI api = null;
private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService();
- private static readonly string ClassName = nameof(CommunityPluginSource);
-
private string latestEtag = "";
private List plugins = new();
@@ -70,7 +70,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
else
{
API.LogWarn(ClassName, $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
- return plugins;
+ return null;
}
}
catch (Exception e)
@@ -83,7 +83,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
API.LogException(ClassName, "Error Occurred", e);
}
- return plugins;
+ return null;
}
}
}
diff --git a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
index 1f23c2f66..bdc1ad3dd 100644
--- a/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/CommunityPluginStore.cs
@@ -40,10 +40,14 @@ namespace Flow.Launcher.Core.ExternalPlugins
var completedTask = await Task.WhenAny(tasks);
if (completedTask.IsCompletedSuccessfully)
{
- // one of the requests completed successfully; keep its results
- // and cancel the remaining http requests.
- pluginResults = await completedTask;
- cts.Cancel();
+ var result = await completedTask;
+ if (result != null)
+ {
+ // one of the requests completed successfully; keep its results
+ // and cancel the remaining http requests.
+ pluginResults = result;
+ cts.Cancel();
+ }
}
tasks.Remove(completedTask);
}
From 1cd699887083e1cd0a3de7b72bb02996e93d090f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 18 Apr 2025 07:39:02 +0800
Subject: [PATCH 0806/1442] Cleanup codes
---
.../UserSettings/Settings.cs | 85 ++-----------------
Flow.Launcher.Infrastructure/Win32Helper.cs | 72 ++++++++++++++++
.../ViewModels/SettingsPaneThemeViewModel.cs | 5 +-
3 files changed, 83 insertions(+), 79 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 0bd1a809b..8500e7aa4 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -1,12 +1,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Drawing;
-using System.Globalization;
-using System.Linq;
using System.Text.Json.Serialization;
using System.Windows;
-using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Logger;
@@ -14,7 +9,6 @@ using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
-using SystemFonts = System.Windows.SystemFonts;
namespace Flow.Launcher.Infrastructure.UserSettings
{
@@ -37,67 +31,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
_storage.Save();
}
-
- private string language = Constant.SystemLanguageCode;
- private static readonly Dictionary LanguageToNotoSans = new()
- {
- { "ko", "Noto Sans KR" },
- { "ja", "Noto Sans JP" },
- { "zh-CN", "Noto Sans SC" },
- { "zh-SG", "Noto Sans SC" },
- { "zh-Hans", "Noto Sans SC" },
- { "zh-TW", "Noto Sans TC" },
- { "zh-HK", "Noto Sans TC" },
- { "zh-MO", "Noto Sans TC" },
- { "zh-Hant", "Noto Sans TC" },
- { "th", "Noto Sans Thai" },
- { "ar", "Noto Sans Arabic" },
- { "he", "Noto Sans Hebrew" },
- { "hi", "Noto Sans Devanagari" },
- { "bn", "Noto Sans Bengali" },
- { "ta", "Noto Sans Tamil" },
- { "el", "Noto Sans Greek" },
- { "ru", "Noto Sans" },
- { "en", "Noto Sans" },
- { "fr", "Noto Sans" },
- { "de", "Noto Sans" },
- { "es", "Noto Sans" },
- { "pt", "Noto Sans" }
- };
-
- public static string GetSystemDefaultFont()
- {
- try
- {
- var culture = CultureInfo.CurrentCulture;
- var language = culture.Name; // e.g., "zh-TW"
- var langPrefix = language.Split('-')[0]; // e.g., "zh"
-
- // First, try to find by full name, and if not found, fallback to prefix
- if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
- {
- if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
- return notoFont;
- }
-
- var font = SystemFonts.MessageFontFamily;
- if (font.FamilyNames.TryGetValue(System.Windows.Markup.XmlLanguage.GetLanguage("en-US"), out var englishName))
- {
- return englishName;
- }
-
- return font.Source ?? "Segoe UI";
- }
- catch
- {
- return "Segoe UI";
- }
- }
-
- private static bool TryGetNotoFont(string langKey, out string notoFont)
- {
- return LanguageToNotoSans.TryGetValue(langKey, out notoFont);
- }
private string _theme = Constant.DefaultTheme;
public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}";
@@ -119,12 +52,13 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string CycleHistoryUpHotkey { get; set; } = $"{KeyConstant.Alt} + Up";
public string CycleHistoryDownHotkey { get; set; } = $"{KeyConstant.Alt} + Down";
+ private string _language = Constant.SystemLanguageCode;
public string Language
{
- get => language;
+ get => _language;
set
{
- language = value;
+ _language = value;
OnPropertyChanged();
}
}
@@ -150,15 +84,15 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public double QueryBoxFontSize { get; set; } = 16;
public double ResultItemFontSize { get; set; } = 16;
public double ResultSubItemFontSize { get; set; } = 13;
- public string QueryBoxFont { get; set; } = GetSystemDefaultFont();
+ public string QueryBoxFont { get; set; } = Win32Helper.GetSystemDefaultFont();
public string QueryBoxFontStyle { get; set; }
public string QueryBoxFontWeight { get; set; }
public string QueryBoxFontStretch { get; set; }
- public string ResultFont { get; set; } = GetSystemDefaultFont();
+ public string ResultFont { get; set; } = Win32Helper.GetSystemDefaultFont();
public string ResultFontStyle { get; set; }
public string ResultFontWeight { get; set; }
public string ResultFontStretch { get; set; }
- public string ResultSubFont { get; set; } = GetSystemDefaultFont();
+ public string ResultSubFont { get; set; } = Win32Helper.GetSystemDefaultFont();
public string ResultSubFontStyle { get; set; }
public string ResultSubFontWeight { get; set; }
public string ResultSubFontStretch { get; set; }
@@ -181,7 +115,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public double? SettingWindowLeft { get; set; } = null;
public WindowState SettingWindowState { get; set; } = WindowState.Normal;
- bool _showPlaceholder { get; set; } = true;
+ private bool _showPlaceholder { get; set; } = true;
public bool ShowPlaceholder
{
get => _showPlaceholder;
@@ -194,7 +128,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
}
- string _placeholderText { get; set; } = string.Empty;
+ private string _placeholderText { get; set; } = string.Empty;
public string PlaceholderText
{
get => _placeholderText;
@@ -373,7 +307,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool StartFlowLauncherOnSystemStartup { get; set; } = false;
public bool UseLogonTaskForStartup { get; set; } = false;
public bool HideOnStartup { get; set; } = true;
- bool _hideNotifyIcon { get; set; }
+ private bool _hideNotifyIcon;
public bool HideNotifyIcon
{
get => _hideNotifyIcon;
@@ -551,5 +485,4 @@ namespace Flow.Launcher.Infrastructure.UserSettings
Mica,
MicaAlt
}
-
}
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 798501ae3..6a5af41df 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -1,10 +1,13 @@
using System;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
+using System.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
+using System.Windows.Markup;
using System.Windows.Media;
using Flow.Launcher.Infrastructure.UserSettings;
using Microsoft.Win32;
@@ -14,6 +17,7 @@ using Windows.Win32.Graphics.Dwm;
using Windows.Win32.UI.Input.KeyboardAndMouse;
using Windows.Win32.UI.WindowsAndMessaging;
using Point = System.Windows.Point;
+using SystemFonts = System.Windows.SystemFonts;
namespace Flow.Launcher.Infrastructure
{
@@ -595,5 +599,73 @@ namespace Flow.Launcher.Infrastructure
}
#endregion
+
+ #region System Font
+
+ private static readonly Dictionary _languageToNotoSans = new()
+ {
+ { "ko", "Noto Sans KR" },
+ { "ja", "Noto Sans JP" },
+ { "zh-CN", "Noto Sans SC" },
+ { "zh-SG", "Noto Sans SC" },
+ { "zh-Hans", "Noto Sans SC" },
+ { "zh-TW", "Noto Sans TC" },
+ { "zh-HK", "Noto Sans TC" },
+ { "zh-MO", "Noto Sans TC" },
+ { "zh-Hant", "Noto Sans TC" },
+ { "th", "Noto Sans Thai" },
+ { "ar", "Noto Sans Arabic" },
+ { "he", "Noto Sans Hebrew" },
+ { "hi", "Noto Sans Devanagari" },
+ { "bn", "Noto Sans Bengali" },
+ { "ta", "Noto Sans Tamil" },
+ { "el", "Noto Sans Greek" },
+ { "ru", "Noto Sans" },
+ { "en", "Noto Sans" },
+ { "fr", "Noto Sans" },
+ { "de", "Noto Sans" },
+ { "es", "Noto Sans" },
+ { "pt", "Noto Sans" }
+ };
+
+ public static string GetSystemDefaultFont()
+ {
+ try
+ {
+ var culture = CultureInfo.CurrentCulture;
+ var language = culture.Name; // e.g., "zh-TW"
+ var langPrefix = language.Split('-')[0]; // e.g., "zh"
+
+ // First, try to find by full name, and if not found, fallback to prefix
+ if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
+ {
+ // If the font is installed, return it
+ if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
+ {
+ return notoFont;
+ }
+ }
+
+ // If Noto font is not found, fallback to the system default font
+ var font = SystemFonts.MessageFontFamily;
+ if (font.FamilyNames.TryGetValue(XmlLanguage.GetLanguage("en-US"), out var englishName))
+ {
+ return englishName;
+ }
+
+ return font.Source ?? "Segoe UI";
+ }
+ catch
+ {
+ return "Segoe UI";
+ }
+ }
+
+ private static bool TryGetNotoFont(string langKey, out string notoFont)
+ {
+ return _languageToNotoSans.TryGetValue(langKey, out notoFont);
+ }
+
+ #endregion
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index d62fd906b..1138b2869 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Windows;
+using System.Windows.Controls;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -17,13 +17,12 @@ using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using ModernWpf;
using ThemeManagerForColorSchemeSwitch = ModernWpf.ThemeManager;
-using System.Windows.Controls;
namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneThemeViewModel : BaseModel
{
- private string DefaultFont = Settings.GetSystemDefaultFont();
+ private readonly string DefaultFont = Win32Helper.GetSystemDefaultFont();
public string BackdropSubText => !Win32Helper.IsBackdropSupported() ? App.API.GetTranslation("BackdropTypeDisabledToolTip") : "";
public Settings Settings { get; }
private readonly Theme _theme = Ioc.Default.GetRequiredService();
From e70ce114726b5f22717496efba47aa746d805182 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 19 Apr 2025 09:39:02 +0900
Subject: [PATCH 0807/1442] Change Search Window Position to Location
---
Flow.Launcher/Languages/en.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 5a6fd3d74..caa9a7129 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -58,7 +58,7 @@
Error setting launch on startupHide Flow Launcher when focus is lostDo not show new version notifications
- Search Window Position
+ Search Window LocationRemember Last PositionMonitor with Mouse CursorMonitor with Focused Window
From e60e117cf924d0cf559c9fe1c94c535f4de6d8d9 Mon Sep 17 00:00:00 2001
From: DB P
Date: Sat, 19 Apr 2025 10:20:59 +0900
Subject: [PATCH 0808/1442] Fix Color
---
Flow.Launcher/Resources/Light.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/Light.xaml b/Flow.Launcher/Resources/Light.xaml
index 4d765d161..112815ed0 100644
--- a/Flow.Launcher/Resources/Light.xaml
+++ b/Flow.Launcher/Resources/Light.xaml
@@ -22,7 +22,7 @@
-
+
From 8674fca082dd74cb503e0a9a4b238a4cb05aa59a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 19 Apr 2025 11:20:08 +0800
Subject: [PATCH 0809/1442] Resolve conflicts
---
.../UserSettings/Settings.cs | 2 +-
Flow.Launcher.Infrastructure/Win32Helper.cs | 32 +++++++++++++------
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 17792c0c1..52bc63ec6 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -96,7 +96,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultSubFontStyle { get; set; }
public string ResultSubFontWeight { get; set; }
public string ResultSubFontStretch { get; set; }
- public string SettingWindowFont { get; set; } = GetSystemDefaultFont(false);
+ public string SettingWindowFont { get; set; } = Win32Helper.GetSystemDefaultFont(false);
public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 6a5af41df..2788060eb 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -628,21 +628,33 @@ namespace Flow.Launcher.Infrastructure
{ "pt", "Noto Sans" }
};
- public static string GetSystemDefaultFont()
+ ///
+ /// Gets the system default font.
+ ///
+ ///
+ /// If true, it will try to find the Noto font for the current culture.
+ ///
+ ///
+ /// The name of the system default font.
+ ///
+ public static string GetSystemDefaultFont(bool useNoto = true)
{
try
{
- var culture = CultureInfo.CurrentCulture;
- var language = culture.Name; // e.g., "zh-TW"
- var langPrefix = language.Split('-')[0]; // e.g., "zh"
-
- // First, try to find by full name, and if not found, fallback to prefix
- if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
+ if (useNoto)
{
- // If the font is installed, return it
- if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
+ var culture = CultureInfo.CurrentCulture;
+ var language = culture.Name; // e.g., "zh-TW"
+ var langPrefix = language.Split('-')[0]; // e.g., "zh"
+
+ // First, try to find by full name, and if not found, fallback to prefix
+ if (TryGetNotoFont(language, out var notoFont) || TryGetNotoFont(langPrefix, out notoFont))
{
- return notoFont;
+ // If the font is installed, return it
+ if (Fonts.SystemFontFamilies.Any(f => f.Source.Equals(notoFont)))
+ {
+ return notoFont;
+ }
}
}
From a15b789eb03f8cc7e0174c201b91e53b1a66290c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 19 Apr 2025 11:25:39 +0800
Subject: [PATCH 0810/1442] Cleanup codes
---
.../ViewModels/SettingsPaneAboutViewModel.cs | 33 ++-----------------
1 file changed, 2 insertions(+), 31 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index abc7a2d16..ee0865f9d 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
-using System.Windows.Media;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Infrastructure;
@@ -271,14 +269,6 @@ public partial class SettingsPaneAboutViewModel : BaseModel
return "0 B";
}
- public event PropertyChangedEventHandler PropertyChanged;
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
-
- private string _settingWindowFont;
-
public string SettingWindowFont
{
get => _settings.SettingWindowFont;
@@ -287,7 +277,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
if (_settings.SettingWindowFont != value)
{
_settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
+ OnPropertyChanged();
}
}
}
@@ -295,26 +285,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
[RelayCommand]
private void ResetSettingWindowFont()
{
- string defaultFont = GetSystemDefaultFont();
+ string defaultFont = Win32Helper.GetSystemDefaultFont(false);
_settings.SettingWindowFont = defaultFont;
}
-
- public static string GetSystemDefaultFont()
- {
- try
- {
- var font = SystemFonts.MessageFontFamily;
- if (font.FamilyNames.TryGetValue(System.Windows.Markup.XmlLanguage.GetLanguage("en-US"), out var englishName))
- {
- return englishName;
- }
-
- return font.Source ?? "Segoe UI";
- }
- catch
- {
- return "Segoe UI";
- }
- }
-
}
From 3f5e69be7f385cec24097a2479025b5ba569c071 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Sat, 19 Apr 2025 11:27:43 +0800
Subject: [PATCH 0811/1442] Fix possible property change issue
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.../SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index ee0865f9d..55d6b0a1c 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -286,6 +286,6 @@ public partial class SettingsPaneAboutViewModel : BaseModel
private void ResetSettingWindowFont()
{
string defaultFont = Win32Helper.GetSystemDefaultFont(false);
- _settings.SettingWindowFont = defaultFont;
+ SettingWindowFont = defaultFont;
}
}
From 647f2bb0a16fd7c5d142469c3365701376fa32dc Mon Sep 17 00:00:00 2001
From: DB P
Date: Sat, 19 Apr 2025 15:05:15 +0900
Subject: [PATCH 0812/1442] Add String
---
Flow.Launcher/Languages/en.xaml | 1 +
Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index caa9a7129..b66b2ba03 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -356,6 +356,7 @@
Log LevelDebugInfo
+ Setting Window FontSelect File Manager
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
index b3991743d..44a0490ca 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
@@ -148,7 +148,7 @@
SelectedValuePath="Value" />
From 942b29061edfbd9102f63c7d3f14316408cd6954 Mon Sep 17 00:00:00 2001
From: DB P
Date: Sat, 19 Apr 2025 15:40:11 +0900
Subject: [PATCH 0813/1442] Add FontFamily Style
---
Flow.Launcher/CustomQueryHotkeySetting.xaml | 1 +
.../CustomQueryHotkeySetting.xaml.cs | 21 +++++++-
Flow.Launcher/CustomShortcutSetting.xaml.cs | 23 ++++++++-
Flow.Launcher/SelectBrowserWindow.xaml | 51 +++++++++----------
Flow.Launcher/SelectBrowserWindow.xaml.cs | 17 ++++++-
Flow.Launcher/SelectFileManagerWindow.xaml | 1 +
Flow.Launcher/SelectFileManagerWindow.xaml.cs | 16 ++++++
7 files changed, 101 insertions(+), 29 deletions(-)
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml b/Flow.Launcher/CustomQueryHotkeySetting.xaml
index 0171e6d79..a460ffae0 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml
@@ -4,6 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
+ FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
Title="{DynamicResource customeQueryHotkeyTitle}"
Width="530"
Background="{DynamicResource PopuBGColor}"
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
index 8b193fa1d..c377fb250 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -1,6 +1,7 @@
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure.UserSettings;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Input;
@@ -13,7 +14,25 @@ namespace Flow.Launcher
private readonly Settings _settings;
private bool update;
private CustomPluginHotkey updateCustomHotkey;
-
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public string SettingWindowFont
+ {
+ get => _settings.SettingWindowFont;
+ set
+ {
+ if (_settings.SettingWindowFont != value)
+ {
+ _settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
public CustomQueryHotkeySetting(Settings settings)
{
_settings = settings;
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index ecbdea606..dcfa572f4 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -1,6 +1,8 @@
using System;
+using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher
@@ -13,7 +15,26 @@ namespace Flow.Launcher
private string originalKey { get; } = null;
private string originalValue { get; } = null;
private bool update { get; } = false;
-
+ private readonly Settings _settings;
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public string SettingWindowFont
+ {
+ get => _settings.SettingWindowFont;
+ set
+ {
+ if (_settings.SettingWindowFont != value)
+ {
+ _settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
public CustomShortcutSetting(SettingsPaneHotkeyViewModel vm)
{
_hotkeyVm = vm;
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml b/Flow.Launcher/SelectBrowserWindow.xaml
index c12879a04..b16de2770 100644
--- a/Flow.Launcher/SelectBrowserWindow.xaml
+++ b/Flow.Launcher/SelectBrowserWindow.xaml
@@ -10,6 +10,7 @@
Width="550"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
+ FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
@@ -54,11 +55,11 @@
-
-
+
+
-
+
@@ -108,10 +109,10 @@
@@ -129,7 +130,7 @@
-
-
+
+
@@ -239,18 +238,18 @@
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
- BorderThickness="0,1,0,0">
+ BorderThickness="0 1 0 0">
Settings.SettingWindowFont;
+ set
+ {
+ if (Settings.SettingWindowFont != value)
+ {
+ Settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
public int SelectedCustomBrowserIndex
{
get => selectedCustomBrowserIndex; set
diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml
index 0287af9b0..bfe6914e5 100644
--- a/Flow.Launcher/SelectFileManagerWindow.xaml
+++ b/Flow.Launcher/SelectFileManagerWindow.xaml
@@ -10,6 +10,7 @@
Width="600"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
+ FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
index b7bda4565..80c0cf1f6 100644
--- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs
+++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
@@ -17,6 +17,22 @@ namespace Flow.Launcher
public Settings Settings { get; }
+ public string SettingWindowFont
+ {
+ get => Settings.SettingWindowFont;
+ set
+ {
+ if (Settings.SettingWindowFont != value)
+ {
+ Settings.SettingWindowFont = value;
+ OnPropertyChanged(nameof(SettingWindowFont));
+ }
+ }
+ }
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
public int SelectedCustomExplorerIndex
{
get => selectedCustomExplorerIndex; set
From 4c54294074f9b0f8912c8fbd1cd7011b803b45de Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sat, 19 Apr 2025 21:22:43 +1000
Subject: [PATCH 0814/1442] deploy website on release
---
.github/workflows/website_deploy.yml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 .github/workflows/website_deploy.yml
diff --git a/.github/workflows/website_deploy.yml b/.github/workflows/website_deploy.yml
new file mode 100644
index 000000000..0cb623174
--- /dev/null
+++ b/.github/workflows/website_deploy.yml
@@ -0,0 +1,21 @@
+---
+
+name: Deploy Website On Release
+on:
+ release:
+ types: [published]
+ workflow_dispatch:
+
+jobs:
+ dispatch:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Dispatch event
+ run: |
+ http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer ${{ secrets.DEPLOY_WEBSITE }}" \
+ https://api.github.com/repos/Flow-Launcher/flow-launcher.github.io/dispatches \
+ -d '{"event_type":"deploy"}')
+ if [ "$http_status" -ne 204 ]; then echo "Error: Deploy trigger failed, HTTP status code is $http_status"; exit 1; fi
From 827c7520f9d011583ab135ce1e65fb086d94925d Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sat, 19 Apr 2025 21:27:24 +1000
Subject: [PATCH 0815/1442] update token name
---
.github/workflows/website_deploy.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/website_deploy.yml b/.github/workflows/website_deploy.yml
index 0cb623174..2d44e4a2c 100644
--- a/.github/workflows/website_deploy.yml
+++ b/.github/workflows/website_deploy.yml
@@ -15,7 +15,7 @@ jobs:
http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \
-X POST \
-H "Accept: application/vnd.github+json" \
- -H "Authorization: Bearer ${{ secrets.DEPLOY_WEBSITE }}" \
+ -H "Authorization: Bearer ${{ secrets.DEPLOY_FLOW_WEBSITE }}" \
https://api.github.com/repos/Flow-Launcher/flow-launcher.github.io/dispatches \
-d '{"event_type":"deploy"}')
if [ "$http_status" -ne 204 ]; then echo "Error: Deploy trigger failed, HTTP status code is $http_status"; exit 1; fi
From 908d1b74bf0fdcf1ebbb50e499efaae957c295b3 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sun, 20 Apr 2025 08:12:31 +0900
Subject: [PATCH 0816/1442] Fix typo
---
Flow.Launcher/Languages/en.xaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index caa9a7129..8501f083b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -142,8 +142,8 @@
Current action keywordNew action keywordChange Action Keywords
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay TimeAdvanced Settings:EnabledPriority
From d5f48da3f70f2b73dda8e618e7b38a6c890b2929 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sun, 20 Apr 2025 08:12:31 +0900
Subject: [PATCH 0817/1442] Fix typo
---
Flow.Launcher/Languages/en.xaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index caa9a7129..8501f083b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -142,8 +142,8 @@
Current action keywordNew action keywordChange Action Keywords
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay TimeAdvanced Settings:EnabledPriority
From 5765baa5026334791f144a54fabf6bbbf12041c1 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sun, 20 Apr 2025 08:15:35 +0900
Subject: [PATCH 0818/1442] Fix Typo
---
Flow.Launcher/Languages/en.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 8501f083b..554e5ed9d 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -235,7 +235,7 @@
AcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
From f9a201a33c8c2492b2fbac91b4f2f6a5f673a68f Mon Sep 17 00:00:00 2001
From: DB p
Date: Sun, 20 Apr 2025 08:15:35 +0900
Subject: [PATCH 0819/1442] "disable from displaying" to "Hide"
---
Flow.Launcher/Languages/en.xaml | 2 +-
Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 8501f083b..554e5ed9d 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -235,7 +235,7 @@
AcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
index 790c9d2c6..ee6b4379d 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
@@ -76,7 +76,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
From 31f286607dd9dc50f7f53ddb864b22eed7b2d85b Mon Sep 17 00:00:00 2001
From: DB p
Date: Sun, 20 Apr 2025 10:31:35 +0900
Subject: [PATCH 0820/1442] Adjust Badge Text and remove subtitle
---
Flow.Launcher/Languages/en.xaml | 3 +--
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml | 5 +----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 554e5ed9d..f1b41eb3c 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -303,9 +303,8 @@
Use Segoe Fluent Icons for query results where supportedPress KeyShow Result Badges
- Show badges for query results where supported
+ For supported plugins, badges are displayed to help distinguish them more easily.Show Result Badges for Global Query Only
- Show badges for global query results onlyHTTP Proxy
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 0b5de1280..f7853515a 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -740,10 +740,7 @@
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
-
+
Date: Mon, 21 Apr 2025 22:07:23 +0000
Subject: [PATCH 0821/1442] Bump vers-one/dotnet-project-version-updater from
1.5 to 1.7
Bumps [vers-one/dotnet-project-version-updater](https://github.com/vers-one/dotnet-project-version-updater) from 1.5 to 1.7.
- [Release notes](https://github.com/vers-one/dotnet-project-version-updater/releases)
- [Commits](https://github.com/vers-one/dotnet-project-version-updater/compare/v1.5...v1.7)
---
updated-dependencies:
- dependency-name: vers-one/dotnet-project-version-updater
dependency-version: '1.7'
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
.github/workflows/dotnet.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 718a28dbd..7498262de 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- name: Set Flow.Launcher.csproj version
id: update
- uses: vers-one/dotnet-project-version-updater@v1.5
+ uses: vers-one/dotnet-project-version-updater@v1.7
with:
file: |
"**/SolutionAssemblyInfo.cs"
From 0a41072f33a7196402db93e2266a8f9d52ca2b13 Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 22 Apr 2025 11:21:11 +0900
Subject: [PATCH 0822/1442] Add animation option when showing the main window
---
Flow.Launcher/MainWindow.xaml.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index bf7a45b1d..ee84dfeb4 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -138,8 +138,12 @@ namespace Flow.Launcher
else
{
_viewModel.Show();
+ if (_settings.UseAnimation)
+ {
+ WindowAnimation();
+ }
}
-
+
// Show notify icon when flowlauncher is hidden
InitializeNotifyIcon();
From 9b52cb6a1029329d23f0964b13a0494d8849b71f Mon Sep 17 00:00:00 2001
From: DB p
Date: Wed, 23 Apr 2025 11:53:54 +0900
Subject: [PATCH 0823/1442] Remove unused PropertyChanged event and
OnPropertyChanged method from SettingWindowViewModel
---
Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index b6fd9555b..4468b7865 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -58,11 +58,5 @@ public partial class SettingWindowViewModel : BaseModel
}
}
}
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
+
}
From 284fe2b922e6145bbb14dc3960890338d6232f9c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 23 Apr 2025 11:42:16 +0800
Subject: [PATCH 0824/1442] Cleanup codes
---
Flow.Launcher/SettingWindow.xaml.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 70b5a22ed..b4a3ae47a 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -3,7 +3,6 @@ using System.Windows;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Interop;
-using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
From 83e5654a5ce2a4651cdfb38f234d4b49bea2ccae Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 23 Apr 2025 11:42:55 +0800
Subject: [PATCH 0825/1442] Fix possible null exception
---
Flow.Launcher/CustomShortcutSetting.xaml.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index dcfa572f4..ba326fb9e 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -9,13 +9,14 @@ namespace Flow.Launcher
{
public partial class CustomShortcutSetting : Window
{
+ private static readonly Settings _settings = Ioc.Default.GetRequiredService();
+
private readonly SettingsPaneHotkeyViewModel _hotkeyVm;
public string Key { get; set; } = String.Empty;
public string Value { get; set; } = String.Empty;
private string originalKey { get; } = null;
private string originalValue { get; } = null;
private bool update { get; } = false;
- private readonly Settings _settings;
public event PropertyChangedEventHandler PropertyChanged;
public string SettingWindowFont
From cdbe45d4dcf5e37e9810c755407560516a18e9f9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 23 Apr 2025 11:48:11 +0800
Subject: [PATCH 0826/1442] Cleanup codes
---
.../SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 55d6b0a1c..acffe1e85 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -285,7 +285,6 @@ public partial class SettingsPaneAboutViewModel : BaseModel
[RelayCommand]
private void ResetSettingWindowFont()
{
- string defaultFont = Win32Helper.GetSystemDefaultFont(false);
- SettingWindowFont = defaultFont;
+ SettingWindowFont = Win32Helper.GetSystemDefaultFont(false);
}
}
From c3509c3b20bcc4bc914d5ac39b678f0aef91f052 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 23 Apr 2025 12:43:34 +0800
Subject: [PATCH 0827/1442] Use property change event for settings & Use
INotifyPropertyChanged instead
---
.../UserSettings/Settings.cs | 15 ++++++-
Flow.Launcher/CustomQueryHotkeySetting.xaml | 2 +-
.../CustomQueryHotkeySetting.xaml.cs | 38 +++++-------------
Flow.Launcher/CustomShortcutSetting.xaml | 27 +++++++------
Flow.Launcher/CustomShortcutSetting.xaml.cs | 31 +++-----------
Flow.Launcher/SelectBrowserWindow.xaml | 2 +-
Flow.Launcher/SelectBrowserWindow.xaml.cs | 36 +++++------------
Flow.Launcher/SelectFileManagerWindow.xaml | 2 +-
Flow.Launcher/SelectFileManagerWindow.xaml.cs | 38 +++++-------------
.../SettingPages/Views/SettingsPaneAbout.xaml | 3 +-
.../Views/SettingsPaneAbout.xaml.cs | 22 +---------
Flow.Launcher/SettingWindow.xaml | 2 +-
.../ViewModel/SettingWindowViewModel.cs | 40 ++++++-------------
13 files changed, 81 insertions(+), 177 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 52bc63ec6..0f878151e 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -96,7 +96,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultSubFontStyle { get; set; }
public string ResultSubFontWeight { get; set; }
public string ResultSubFontStretch { get; set; }
- public string SettingWindowFont { get; set; } = Win32Helper.GetSystemDefaultFont(false);
public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
@@ -104,6 +103,20 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool ShowBadges { get; set; } = false;
public bool ShowBadgesGlobalOnly { get; set; } = false;
+ private string _settingWindowFont { get; set; } = Win32Helper.GetSystemDefaultFont(false);
+ public string SettingWindowFont
+ {
+ get => _settingWindowFont;
+ set
+ {
+ if (_settingWindowFont != value)
+ {
+ _settingWindowFont = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
public string TimeFormat { get; set; } = "hh:mm tt";
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml b/Flow.Launcher/CustomQueryHotkeySetting.xaml
index a460ffae0..d3c31c6da 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml
@@ -4,11 +4,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
- FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
Title="{DynamicResource customeQueryHotkeyTitle}"
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
+ FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
MouseDown="window_MouseDown"
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
index c377fb250..3c501d41a 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -1,41 +1,23 @@
-using Flow.Launcher.Helper;
-using Flow.Launcher.Infrastructure.UserSettings;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;
+using Flow.Launcher.Helper;
+using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher
{
public partial class CustomQueryHotkeySetting : Window
{
- private readonly Settings _settings;
+ public Settings Settings { get; set; }
+
private bool update;
private CustomPluginHotkey updateCustomHotkey;
- public event PropertyChangedEventHandler PropertyChanged;
-
- public string SettingWindowFont
- {
- get => _settings.SettingWindowFont;
- set
- {
- if (_settings.SettingWindowFont != value)
- {
- _settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
- }
- }
- }
-
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
+
public CustomQueryHotkeySetting(Settings settings)
{
- _settings = settings;
+ Settings = settings;
InitializeComponent();
}
@@ -48,13 +30,13 @@ namespace Flow.Launcher
{
if (!update)
{
- _settings.CustomPluginHotkeys ??= new ObservableCollection();
+ Settings.CustomPluginHotkeys ??= new ObservableCollection();
var pluginHotkey = new CustomPluginHotkey
{
Hotkey = HotkeyControl.CurrentHotkey.ToString(), ActionKeyword = tbAction.Text
};
- _settings.CustomPluginHotkeys.Add(pluginHotkey);
+ Settings.CustomPluginHotkeys.Add(pluginHotkey);
HotKeyMapper.SetCustomQueryHotkey(pluginHotkey);
}
@@ -73,7 +55,7 @@ namespace Flow.Launcher
public void UpdateItem(CustomPluginHotkey item)
{
- updateCustomHotkey = _settings.CustomPluginHotkeys.FirstOrDefault(o =>
+ updateCustomHotkey = Settings.CustomPluginHotkeys.FirstOrDefault(o =>
o.ActionKeyword == item.ActionKeyword && o.Hotkey == item.Hotkey);
if (updateCustomHotkey == null)
{
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml b/Flow.Launcher/CustomShortcutSetting.xaml
index 9256a2c52..cbdcecea6 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml
+++ b/Flow.Launcher/CustomShortcutSetting.xaml
@@ -7,6 +7,7 @@
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
+ FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
ResizeMode="NoResize"
@@ -56,11 +57,11 @@
-
-
+
+
-
+
@@ -124,14 +125,14 @@
LastChildFill="True">
@@ -142,21 +143,21 @@
+ BorderThickness="0 1 0 0">
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index ba326fb9e..183cc3a7f 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -1,7 +1,6 @@
-using System;
-using System.ComponentModel;
-using System.Windows;
+using System.Windows;
using System.Windows.Input;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
@@ -9,33 +8,15 @@ namespace Flow.Launcher
{
public partial class CustomShortcutSetting : Window
{
- private static readonly Settings _settings = Ioc.Default.GetRequiredService();
+ public Settings Settings { get; set; } = Ioc.Default.GetRequiredService();
private readonly SettingsPaneHotkeyViewModel _hotkeyVm;
- public string Key { get; set; } = String.Empty;
- public string Value { get; set; } = String.Empty;
+ public string Key { get; set; } = string.Empty;
+ public string Value { get; set; } = string.Empty;
private string originalKey { get; } = null;
private string originalValue { get; } = null;
private bool update { get; } = false;
- public event PropertyChangedEventHandler PropertyChanged;
-
- public string SettingWindowFont
- {
- get => _settings.SettingWindowFont;
- set
- {
- if (_settings.SettingWindowFont != value)
- {
- _settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
- }
- }
- }
-
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
+
public CustomShortcutSetting(SettingsPaneHotkeyViewModel vm)
{
_hotkeyVm = vm;
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml b/Flow.Launcher/SelectBrowserWindow.xaml
index b16de2770..4fc5a91c5 100644
--- a/Flow.Launcher/SelectBrowserWindow.xaml
+++ b/Flow.Launcher/SelectBrowserWindow.xaml
@@ -10,7 +10,7 @@
Width="550"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
- FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
+ FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml.cs b/Flow.Launcher/SelectBrowserWindow.xaml.cs
index e8365819b..849056ab1 100644
--- a/Flow.Launcher/SelectBrowserWindow.xaml.cs
+++ b/Flow.Launcher/SelectBrowserWindow.xaml.cs
@@ -1,42 +1,25 @@
-using Flow.Launcher.Infrastructure.UserSettings;
-using System;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
+using CommunityToolkit.Mvvm.ComponentModel;
+using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher
{
- public partial class SelectBrowserWindow : Window, INotifyPropertyChanged
+ [INotifyPropertyChanged]
+ public partial class SelectBrowserWindow : Window
{
+ public Settings Settings { get; }
+
private int selectedCustomBrowserIndex;
- public event PropertyChangedEventHandler PropertyChanged;
-
- public Settings Settings { get; }
- public string SettingWindowFont
- {
- get => Settings.SettingWindowFont;
- set
- {
- if (Settings.SettingWindowFont != value)
- {
- Settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
- }
- }
- }
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
public int SelectedCustomBrowserIndex
{
get => selectedCustomBrowserIndex; set
{
selectedCustomBrowserIndex = value;
- PropertyChanged?.Invoke(this, new(nameof(CustomBrowser)));
+ OnPropertyChanged(nameof(CustomBrowser));
}
}
public ObservableCollection CustomBrowsers { get; set; }
@@ -79,8 +62,7 @@ namespace Flow.Launcher
private void btnBrowseFile_Click(object sender, RoutedEventArgs e)
{
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
- Nullable result = dlg.ShowDialog();
-
+ var result = dlg.ShowDialog();
if (result == true)
{
TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox");
diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml
index bfe6914e5..7d1fe0f56 100644
--- a/Flow.Launcher/SelectFileManagerWindow.xaml
+++ b/Flow.Launcher/SelectFileManagerWindow.xaml
@@ -10,7 +10,7 @@
Width="600"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
- FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
+ FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
index 80c0cf1f6..946052e32 100644
--- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs
+++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
@@ -1,44 +1,27 @@
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.ViewModel;
-using System;
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
+using CommunityToolkit.Mvvm.ComponentModel;
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher
{
- public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged
+ [INotifyPropertyChanged]
+ public partial class SelectFileManagerWindow : Window
{
- private int selectedCustomExplorerIndex;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
public Settings Settings { get; }
- public string SettingWindowFont
- {
- get => Settings.SettingWindowFont;
- set
- {
- if (Settings.SettingWindowFont != value)
- {
- Settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
- }
- }
- }
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
+ private int selectedCustomExplorerIndex;
+
public int SelectedCustomExplorerIndex
{
get => selectedCustomExplorerIndex; set
{
selectedCustomExplorerIndex = value;
- PropertyChanged?.Invoke(this, new(nameof(CustomExplorer)));
+ OnPropertyChanged(nameof(CustomExplorer));
}
}
public ObservableCollection CustomExplorers { get; set; }
@@ -81,8 +64,7 @@ namespace Flow.Launcher
private void btnBrowseFile_Click(object sender, RoutedEventArgs e)
{
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
- Nullable result = dlg.ShowDialog();
-
+ var result = dlg.ShowDialog();
if (result == true)
{
TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox");
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
index 44a0490ca..4bf5df227 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
@@ -160,8 +160,7 @@
DisplayMemberPath="Source"
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
SelectedValue="{Binding SettingWindowFont, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- SelectedValuePath="Source"
- SelectionChanged="SettingWindowFontComboBox_SelectionChanged" />
+ SelectedValuePath="Source" />
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
index cedc19633..1ecc02aa6 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
@@ -1,7 +1,4 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Navigation;
+using System.Windows.Navigation;
using Flow.Launcher.Core;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -31,21 +28,4 @@ public partial class SettingsPaneAbout
App.API.OpenUrl(e.Uri.AbsoluteUri);
e.Handled = true;
}
-
- private void SettingWindowFontComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (sender is ComboBox comboBox && comboBox.SelectedItem is FontFamily selectedFont)
- {
- if (DataContext is SettingsPaneAboutViewModel viewModel)
- {
- viewModel.SettingWindowFont = selectedFont.Source;
-
- // 설정 창 글꼴 즉시 업데이트
- if (Window.GetWindow(this) is SettingWindow settingWindow)
- {
- settingWindow.FontFamily = selectedFont;
- }
- }
- }
- }
}
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index f2cf9fab2..a34777d30 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -13,7 +13,7 @@
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
- FontFamily="{Binding SettingWindowFont, Mode=TwoWay}"
+ FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 4468b7865..19edba4d9 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -1,17 +1,15 @@
-using System.ComponentModel;
-using System.Windows.Media;
-using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.ViewModel;
public partial class SettingWindowViewModel : BaseModel
{
- private readonly Settings _settings;
+ public Settings Settings { get; set; }
public SettingWindowViewModel(Settings settings)
{
- _settings = settings;
+ Settings = settings;
}
///
@@ -19,44 +17,30 @@ public partial class SettingWindowViewModel : BaseModel
///
public void Save()
{
- _settings.Save();
+ Settings.Save();
}
public double SettingWindowWidth
{
- get => _settings.SettingWindowWidth;
- set => _settings.SettingWindowWidth = value;
+ get => Settings.SettingWindowWidth;
+ set => Settings.SettingWindowWidth = value;
}
public double SettingWindowHeight
{
- get => _settings.SettingWindowHeight;
- set => _settings.SettingWindowHeight = value;
+ get => Settings.SettingWindowHeight;
+ set => Settings.SettingWindowHeight = value;
}
public double? SettingWindowTop
{
- get => _settings.SettingWindowTop;
- set => _settings.SettingWindowTop = value;
+ get => Settings.SettingWindowTop;
+ set => Settings.SettingWindowTop = value;
}
public double? SettingWindowLeft
{
- get => _settings.SettingWindowLeft;
- set => _settings.SettingWindowLeft = value;
+ get => Settings.SettingWindowLeft;
+ set => Settings.SettingWindowLeft = value;
}
-
- public string SettingWindowFont
- {
- get => _settings.SettingWindowFont;
- set
- {
- if (_settings.SettingWindowFont != value)
- {
- _settings.SettingWindowFont = value;
- OnPropertyChanged(nameof(SettingWindowFont));
- }
- }
- }
-
}
From f4f8e9af5247c2004e6771236784ebe2e5e13b61 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 23 Apr 2025 12:49:36 +0800
Subject: [PATCH 0828/1442] Make settings readonly
---
Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | 2 +-
Flow.Launcher/CustomShortcutSetting.xaml.cs | 2 +-
Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
index 3c501d41a..cc07caaa2 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -10,7 +10,7 @@ namespace Flow.Launcher
{
public partial class CustomQueryHotkeySetting : Window
{
- public Settings Settings { get; set; }
+ public Settings Settings { get; }
private bool update;
private CustomPluginHotkey updateCustomHotkey;
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index 183cc3a7f..fcee0c961 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -8,7 +8,7 @@ namespace Flow.Launcher
{
public partial class CustomShortcutSetting : Window
{
- public Settings Settings { get; set; } = Ioc.Default.GetRequiredService();
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
private readonly SettingsPaneHotkeyViewModel _hotkeyVm;
public string Key { get; set; } = string.Empty;
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 19edba4d9..f05893cf4 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -5,7 +5,7 @@ namespace Flow.Launcher.ViewModel;
public partial class SettingWindowViewModel : BaseModel
{
- public Settings Settings { get; set; }
+ public Settings Settings { get; }
public SettingWindowViewModel(Settings settings)
{
From f79ef493b8eab23ce66cb7f25e68c76836ddd149 Mon Sep 17 00:00:00 2001
From: DB p
Date: Wed, 23 Apr 2025 13:58:01 +0900
Subject: [PATCH 0829/1442] Remove background setter for disabled state and add
placeholder color for NumberBox
---
Flow.Launcher/Resources/CustomControlTemplate.xaml | 1 -
Flow.Launcher/Resources/Dark.xaml | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index ef85e8724..251d74c14 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -2802,7 +2802,6 @@
-
diff --git a/Flow.Launcher/Resources/Dark.xaml b/Flow.Launcher/Resources/Dark.xaml
index 1ec01f8d1..3fd66d623 100644
--- a/Flow.Launcher/Resources/Dark.xaml
+++ b/Flow.Launcher/Resources/Dark.xaml
@@ -107,6 +107,7 @@
#f5f5f5#464646#ffffff
+ #272727
From f50f2ff27c1aedd064e2b213adee24d4b485df30 Mon Sep 17 00:00:00 2001
From: DB p
Date: Thu, 24 Apr 2025 10:18:38 +0900
Subject: [PATCH 0830/1442] Implement dynamic font settings for the setting
window
---
.../UserSettings/Settings.cs | 2 ++
Flow.Launcher/CustomQueryHotkeySetting.xaml | 1 -
Flow.Launcher/CustomShortcutSetting.xaml | 1 -
Flow.Launcher/Languages/en.xaml | 2 +-
Flow.Launcher/Resources/CustomControlTemplate.xaml | 14 ++++++++++++++
Flow.Launcher/Resources/SettingWindowStyle.xaml | 1 +
Flow.Launcher/SelectBrowserWindow.xaml | 1 -
Flow.Launcher/SelectFileManagerWindow.xaml | 1 -
.../SettingPages/Views/SettingsPaneAbout.xaml | 8 +++-----
.../SettingPages/Views/SettingsPanePlugins.xaml | 6 +++---
Flow.Launcher/SettingWindow.xaml | 1 -
Flow.Launcher/WelcomeWindow.xaml | 14 ++++++--------
12 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 0f878151e..ca015fd70 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -2,6 +2,7 @@
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
using System.Windows;
+using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Logger;
@@ -113,6 +114,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
_settingWindowFont = value;
OnPropertyChanged();
+ Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
}
}
}
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml b/Flow.Launcher/CustomQueryHotkeySetting.xaml
index d3c31c6da..0171e6d79 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml
@@ -8,7 +8,6 @@
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
- FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
MouseDown="window_MouseDown"
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml b/Flow.Launcher/CustomShortcutSetting.xaml
index cbdcecea6..d8623753f 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml
+++ b/Flow.Launcher/CustomShortcutSetting.xaml
@@ -7,7 +7,6 @@
Width="530"
Background="{DynamicResource PopuBGColor}"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
- FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Foreground="{DynamicResource PopupTextColor}"
Icon="Images\app.png"
ResizeMode="NoResize"
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 04a26f09c..72897521b 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -355,7 +355,7 @@
Log LevelDebugInfo
- Setting Window Font
+ Setting Window FontSelect File Manager
diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml
index ef85e8724..be68fc1b1 100644
--- a/Flow.Launcher/Resources/CustomControlTemplate.xaml
+++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml
@@ -4,6 +4,20 @@
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019">
+
+
+
+
+
+
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
index f5017ced5..80b004ff9 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
@@ -60,17 +60,17 @@
-
-
+
+
-
+
@@ -86,23 +86,23 @@
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
- Margin="5,0,0,20">
+ Margin="5 0 0 20">
@@ -180,18 +180,18 @@
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
- BorderThickness="0,1,0,0">
+ BorderThickness="0 1 0 0">
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
index 37a7ccb8d..ae0f91d93 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
@@ -57,20 +57,20 @@
-
-
+
+
-
+
-
+
+ BorderThickness="0 1 0 0">
diff --git a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
index 9848f51cf..26efc6813 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
@@ -5,21 +5,21 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Flow.Launcher.Plugin.Program.ViewModels"
- mc:Ignorable="d"
Title="{DynamicResource flowlauncher_plugin_program_directory}"
- d:DataContext="{d:DesignInstance vm:AddProgramSourceViewModel}"
Width="Auto"
Height="276"
+ d:DataContext="{d:DesignInstance vm:AddProgramSourceViewModel}"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Width"
- WindowStartupLocation="CenterScreen">
+ WindowStartupLocation="CenterScreen"
+ mc:Ignorable="d">
-
+
@@ -59,11 +59,11 @@
-
-
+
+
-
+
@@ -104,16 +104,16 @@
HorizontalAlignment="Stretch"
Click="BrowseButton_Click"
Content="{DynamicResource flowlauncher_plugin_program_browse}"
- Visibility="{Binding IsCustomSource, Converter={StaticResource BooleanToVisibilityConverter}}"
- DockPanel.Dock="Right" />
+ DockPanel.Dock="Right"
+ Visibility="{Binding IsCustomSource, Converter={StaticResource BooleanToVisibilityConverter}}" />
+ VerticalAlignment="Center"
+ IsReadOnly="{Binding IsNotCustomSource}"
+ Text="{Binding Location, Mode=TwoWay}" />
+ Margin="10 0"
+ VerticalAlignment="Center"
+ IsChecked="{Binding Enabled, Mode=TwoWay}" />
+ BorderThickness="0 1 0 0">
diff --git a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml
index 71bc12a86..53baa79a3 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml
@@ -46,8 +46,8 @@
-
-
+
+
@@ -65,8 +65,8 @@
-
-
+
+
@@ -120,20 +120,20 @@
-
+
-
+
@@ -151,82 +151,82 @@
TextWrapping="Wrap" />
-
+
-
+
appref-ms
exe
lnk
+ BorderThickness="1 0 0 0">
@@ -237,27 +237,27 @@
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
- BorderThickness="0,1,0,0">
+ BorderThickness="0 1 0 0">
Date: Thu, 24 Apr 2025 19:48:42 +0800
Subject: [PATCH 0837/1442] Improve code quality
---
.../CustomQueryHotkeySetting.xaml.cs | 10 +--
Flow.Launcher/CustomShortcutSetting.xaml.cs | 4 --
.../Resources/Controls/HotkeyDisplay.xaml.cs | 9 +--
.../Resources/Pages/WelcomePage1.xaml.cs | 20 ++++--
.../Resources/Pages/WelcomePage2.xaml.cs | 24 ++++---
.../Resources/Pages/WelcomePage3.xaml.cs | 16 +++--
.../Resources/Pages/WelcomePage4.xaml.cs | 20 ++++--
.../Resources/Pages/WelcomePage5.xaml.cs | 67 ++++++++++++-------
Flow.Launcher/SelectBrowserWindow.xaml.cs | 15 +++--
Flow.Launcher/SelectFileManagerWindow.xaml.cs | 15 +++--
.../SettingsPaneGeneralViewModel.cs | 3 +-
.../SettingsPanePluginStoreViewModel.cs | 1 -
12 files changed, 121 insertions(+), 83 deletions(-)
diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
index cc07caaa2..77febde9d 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -10,14 +10,14 @@ namespace Flow.Launcher
{
public partial class CustomQueryHotkeySetting : Window
{
- public Settings Settings { get; }
+ private readonly Settings _settings;
private bool update;
private CustomPluginHotkey updateCustomHotkey;
public CustomQueryHotkeySetting(Settings settings)
{
- Settings = settings;
+ _settings = settings;
InitializeComponent();
}
@@ -30,13 +30,13 @@ namespace Flow.Launcher
{
if (!update)
{
- Settings.CustomPluginHotkeys ??= new ObservableCollection();
+ _settings.CustomPluginHotkeys ??= new ObservableCollection();
var pluginHotkey = new CustomPluginHotkey
{
Hotkey = HotkeyControl.CurrentHotkey.ToString(), ActionKeyword = tbAction.Text
};
- Settings.CustomPluginHotkeys.Add(pluginHotkey);
+ _settings.CustomPluginHotkeys.Add(pluginHotkey);
HotKeyMapper.SetCustomQueryHotkey(pluginHotkey);
}
@@ -55,7 +55,7 @@ namespace Flow.Launcher
public void UpdateItem(CustomPluginHotkey item)
{
- updateCustomHotkey = Settings.CustomPluginHotkeys.FirstOrDefault(o =>
+ updateCustomHotkey = _settings.CustomPluginHotkeys.FirstOrDefault(o =>
o.ActionKeyword == item.ActionKeyword && o.Hotkey == item.Hotkey);
if (updateCustomHotkey == null)
{
diff --git a/Flow.Launcher/CustomShortcutSetting.xaml.cs b/Flow.Launcher/CustomShortcutSetting.xaml.cs
index fcee0c961..e180f6570 100644
--- a/Flow.Launcher/CustomShortcutSetting.xaml.cs
+++ b/Flow.Launcher/CustomShortcutSetting.xaml.cs
@@ -1,15 +1,11 @@
using System.Windows;
using System.Windows.Input;
-using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher
{
public partial class CustomShortcutSetting : Window
{
- public Settings Settings { get; } = Ioc.Default.GetRequiredService();
-
private readonly SettingsPaneHotkeyViewModel _hotkeyVm;
public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
diff --git a/Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs b/Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs
index 9b19ffd86..bc167184b 100644
--- a/Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs
+++ b/Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs
@@ -42,14 +42,11 @@ namespace Flow.Launcher.Resources.Controls
private static void keyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
- var control = d as UserControl;
- if (null == control) return; // This should not be possible
+ if (d is not UserControl) return; // This should not be possible
- var newValue = e.NewValue as string;
- if (null == newValue) return;
+ if (e.NewValue is not string newValue) return;
- if (d is not HotkeyDisplay hotkeyDisplay)
- return;
+ if (d is not HotkeyDisplay hotkeyDisplay) return;
hotkeyDisplay.Values.Clear();
foreach (var key in newValue.Split('+'))
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
index 64f52edff..a3b008206 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
@@ -1,29 +1,35 @@
using System.Collections.Generic;
using System.Windows.Navigation;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Flow.Launcher.Core.Resource;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Core.Resource;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage1
{
+ public Settings Settings { get; private set; }
+ private WelcomeViewModel _viewModel;
+
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- Settings = Ioc.Default.GetRequiredService();
+ if (!IsInitialized)
+ {
+ Settings = Ioc.Default.GetRequiredService();
+ _viewModel = Ioc.Default.GetRequiredService();
+ InitializeComponent();
+ }
// Sometimes the navigation is not triggered by button click,
// so we need to reset the page number
- Ioc.Default.GetRequiredService().PageNum = 1;
- InitializeComponent();
+ _viewModel.PageNum = 1;
+ base.OnNavigatedTo(e);
}
private readonly Internationalization _translater = Ioc.Default.GetRequiredService();
public List Languages => _translater.LoadAvailableLanguages();
- public Settings Settings { get; set; }
-
public string CustomLanguage
{
get
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
index 786b4d506..a63edbcda 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
@@ -1,25 +1,31 @@
-using Flow.Launcher.Helper;
-using Flow.Launcher.Infrastructure.Hotkey;
-using Flow.Launcher.Infrastructure.UserSettings;
+using System.Windows.Media;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.Input;
-using Flow.Launcher.ViewModel;
-using System.Windows.Media;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Helper;
+using Flow.Launcher.Infrastructure.Hotkey;
+using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage2
{
- public Settings Settings { get; set; }
+ public Settings Settings { get; private set; }
+ private WelcomeViewModel _viewModel;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- Settings = Ioc.Default.GetRequiredService();
+ if (!IsInitialized)
+ {
+ Settings = Ioc.Default.GetRequiredService();
+ _viewModel = Ioc.Default.GetRequiredService();
+ InitializeComponent();
+ }
// Sometimes the navigation is not triggered by button click,
// so we need to reset the page number
- Ioc.Default.GetRequiredService().PageNum = 2;
- InitializeComponent();
+ _viewModel.PageNum = 2;
+ base.OnNavigatedTo(e);
}
[RelayCommand]
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
index f59b65c1c..4a6610e61 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
@@ -7,15 +7,21 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage3
{
+ public Settings Settings { get; private set; }
+ private WelcomeViewModel _viewModel;
+
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- Settings = Ioc.Default.GetRequiredService();
+ if (!IsInitialized)
+ {
+ Settings = Ioc.Default.GetRequiredService();
+ _viewModel = Ioc.Default.GetRequiredService();
+ InitializeComponent();
+ }
// Sometimes the navigation is not triggered by button click,
// so we need to reset the page number
- Ioc.Default.GetRequiredService().PageNum = 3;
- InitializeComponent();
+ _viewModel.PageNum = 3;
+ base.OnNavigatedTo(e);
}
-
- public Settings Settings { get; set; }
}
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
index 4c83f3a83..1ee3284d2 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
@@ -1,21 +1,27 @@
-using CommunityToolkit.Mvvm.DependencyInjection;
+using System.Windows.Navigation;
+using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.ViewModel;
-using System.Windows.Navigation;
namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage4
{
+ public Settings Settings { get; private set; }
+ private WelcomeViewModel _viewModel;
+
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- Settings = Ioc.Default.GetRequiredService();
+ if (!IsInitialized)
+ {
+ Settings = Ioc.Default.GetRequiredService();
+ _viewModel = Ioc.Default.GetRequiredService();
+ InitializeComponent();
+ }
// Sometimes the navigation is not triggered by button click,
// so we need to reset the page number
- Ioc.Default.GetRequiredService().PageNum = 4;
- InitializeComponent();
+ _viewModel.PageNum = 4;
+ base.OnNavigatedTo(e);
}
-
- public Settings Settings { get; set; }
}
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
index 95d7ff1a0..6328c9914 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
@@ -1,54 +1,74 @@
-using System.Windows;
+using System;
+using System.Windows;
using System.Windows.Navigation;
-using Flow.Launcher.Infrastructure.UserSettings;
-using Microsoft.Win32;
-using Flow.Launcher.Infrastructure;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.Helper;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage5
{
- private const string StartupPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
- public Settings Settings { get; set; }
- public bool HideOnStartup { get; set; }
+ public Settings Settings { get; private set; }
+ private WelcomeViewModel _viewModel;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- Settings = Ioc.Default.GetRequiredService();
+ if (!IsInitialized)
+ {
+ Settings = Ioc.Default.GetRequiredService();
+ _viewModel = Ioc.Default.GetRequiredService();
+ InitializeComponent();
+ }
// Sometimes the navigation is not triggered by button click,
// so we need to reset the page number
- Ioc.Default.GetRequiredService().PageNum = 5;
- InitializeComponent();
+ _viewModel.PageNum = 5;
+ base.OnNavigatedTo(e);
}
private void OnAutoStartupChecked(object sender, RoutedEventArgs e)
{
- SetStartup();
- }
- private void OnAutoStartupUncheck(object sender, RoutedEventArgs e)
- {
- RemoveStartup();
+ ChangeAutoStartup(true);
}
- private void RemoveStartup()
+ private void OnAutoStartupUncheck(object sender, RoutedEventArgs e)
{
- using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
- key?.DeleteValue(Constant.FlowLauncher, false);
- Settings.StartFlowLauncherOnSystemStartup = false;
+ ChangeAutoStartup(false);
}
- private void SetStartup()
+
+ private void ChangeAutoStartup(bool value)
{
- using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
- key?.SetValue(Constant.FlowLauncher, Constant.ExecutablePath);
- Settings.StartFlowLauncherOnSystemStartup = true;
+ Settings.StartFlowLauncherOnSystemStartup = value;
+ try
+ {
+ if (value)
+ {
+ if (Settings.UseLogonTaskForStartup)
+ {
+ AutoStartup.ChangeToViaLogonTask();
+ }
+ else
+ {
+ AutoStartup.ChangeToViaRegistry();
+ }
+ }
+ else
+ {
+ AutoStartup.DisableViaLogonTaskAndRegistry();
+ }
+ }
+ catch (Exception e)
+ {
+ App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message);
+ }
}
private void OnHideOnStartupChecked(object sender, RoutedEventArgs e)
{
Settings.HideOnStartup = true;
}
+
private void OnHideOnStartupUnchecked(object sender, RoutedEventArgs e)
{
Settings.HideOnStartup = false;
@@ -59,6 +79,5 @@ namespace Flow.Launcher.Resources.Pages
var window = Window.GetWindow(this);
window.Close();
}
-
}
}
diff --git a/Flow.Launcher/SelectBrowserWindow.xaml.cs b/Flow.Launcher/SelectBrowserWindow.xaml.cs
index 849056ab1..bea5b4352 100644
--- a/Flow.Launcher/SelectBrowserWindow.xaml.cs
+++ b/Flow.Launcher/SelectBrowserWindow.xaml.cs
@@ -10,13 +10,14 @@ namespace Flow.Launcher
[INotifyPropertyChanged]
public partial class SelectBrowserWindow : Window
{
- public Settings Settings { get; }
+ private readonly Settings _settings;
private int selectedCustomBrowserIndex;
public int SelectedCustomBrowserIndex
{
- get => selectedCustomBrowserIndex; set
+ get => selectedCustomBrowserIndex;
+ set
{
selectedCustomBrowserIndex = value;
OnPropertyChanged(nameof(CustomBrowser));
@@ -27,9 +28,9 @@ namespace Flow.Launcher
public CustomBrowserViewModel CustomBrowser => CustomBrowsers[SelectedCustomBrowserIndex];
public SelectBrowserWindow(Settings settings)
{
- Settings = settings;
- CustomBrowsers = new ObservableCollection(Settings.CustomBrowserList.Select(x => x.Copy()));
- SelectedCustomBrowserIndex = Settings.CustomBrowserIndex;
+ _settings = settings;
+ CustomBrowsers = new ObservableCollection(_settings.CustomBrowserList.Select(x => x.Copy()));
+ SelectedCustomBrowserIndex = _settings.CustomBrowserIndex;
InitializeComponent();
}
@@ -40,8 +41,8 @@ namespace Flow.Launcher
private void btnDone_Click(object sender, RoutedEventArgs e)
{
- Settings.CustomBrowserList = CustomBrowsers.ToList();
- Settings.CustomBrowserIndex = SelectedCustomBrowserIndex;
+ _settings.CustomBrowserList = CustomBrowsers.ToList();
+ _settings.CustomBrowserIndex = SelectedCustomBrowserIndex;
Close();
}
diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
index 946052e32..bf94ddacb 100644
--- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs
+++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs
@@ -12,13 +12,14 @@ namespace Flow.Launcher
[INotifyPropertyChanged]
public partial class SelectFileManagerWindow : Window
{
- public Settings Settings { get; }
+ private readonly Settings _settings;
private int selectedCustomExplorerIndex;
public int SelectedCustomExplorerIndex
{
- get => selectedCustomExplorerIndex; set
+ get => selectedCustomExplorerIndex;
+ set
{
selectedCustomExplorerIndex = value;
OnPropertyChanged(nameof(CustomExplorer));
@@ -29,9 +30,9 @@ namespace Flow.Launcher
public CustomExplorerViewModel CustomExplorer => CustomExplorers[SelectedCustomExplorerIndex];
public SelectFileManagerWindow(Settings settings)
{
- Settings = settings;
- CustomExplorers = new ObservableCollection(Settings.CustomExplorerList.Select(x => x.Copy()));
- SelectedCustomExplorerIndex = Settings.CustomExplorerIndex;
+ _settings = settings;
+ CustomExplorers = new ObservableCollection(_settings.CustomExplorerList.Select(x => x.Copy()));
+ SelectedCustomExplorerIndex = _settings.CustomExplorerIndex;
InitializeComponent();
}
@@ -42,8 +43,8 @@ namespace Flow.Launcher
private void btnDone_Click(object sender, RoutedEventArgs e)
{
- Settings.CustomExplorerList = CustomExplorers.ToList();
- Settings.CustomExplorerIndex = SelectedCustomExplorerIndex;
+ _settings.CustomExplorerList = CustomExplorers.ToList();
+ _settings.CustomExplorerIndex = SelectedCustomExplorerIndex;
Close();
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 6b56caf5e..c8b83c730 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -17,6 +17,7 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneGeneralViewModel : BaseModel
{
public Settings Settings { get; }
+
private readonly Updater _updater;
private readonly IPortable _portable;
private readonly Internationalization _translater;
@@ -78,7 +79,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
try
{
- if (UseLogonTaskForStartup)
+ if (value)
{
AutoStartup.ChangeToViaLogonTask();
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
index fd2c8e09f..68c69f841 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
-using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
From 94ff72c8f27d48201bc195ef32bdf801ddeb4d13 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 19:49:03 +0800
Subject: [PATCH 0838/1442] Check startup only for Release
---
Flow.Launcher/App.xaml.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 6a7b892be..ba0f4e5ed 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -201,6 +201,10 @@ namespace Flow.Launcher
#pragma warning restore VSTHRD100 // Avoid async void methods
+ ///
+ /// Check startup only for Release
+ ///
+ [Conditional("RELEASE")]
private void AutoStartup()
{
// we try to enable auto-startup on first launch, or reenable if it was removed
From 4df9c04702062a177a517bd1328ff547eb03a06b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 19:49:34 +0800
Subject: [PATCH 0839/1442] Update dynamic resource earilier
---
Flow.Launcher/App.xaml.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index ba0f4e5ed..e91676b7b 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -147,6 +147,10 @@ namespace Flow.Launcher
Log.SetLogLevel(_settings.LogLevel);
+ // Update dynamic resources base on settings
+ Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
+ Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);
+
Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate();
API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------");
@@ -176,8 +180,6 @@ namespace Flow.Launcher
await imageLoadertask;
_mainWindow = new MainWindow();
- Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
- Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);
API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");
From 71ab7a69328a904b7cf4d97f5bd526f098e1ad22 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 19:49:58 +0800
Subject: [PATCH 0840/1442] Fix log message & Improve code comments
---
Flow.Launcher/App.xaml.cs | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index e91676b7b..ac134fb5f 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -154,7 +154,7 @@ namespace Flow.Launcher
Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate();
API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------");
- API.LogInfo(ClassName, "Runtime info:{ErrorReporting.RuntimeInfo()}");
+ API.LogInfo(ClassName, $"Runtime info:{ErrorReporting.RuntimeInfo()}");
RegisterAppDomainExceptions();
RegisterDispatcherUnhandledException();
@@ -174,19 +174,16 @@ namespace Flow.Launcher
await PluginManager.InitializePluginsAsync();
// Change language after all plugins are initialized because we need to update plugin title based on their api
- // TODO: Clean InternationalizationManager.Instance and InternationalizationManager.Instance.GetTranslation in future
await Ioc.Default.GetRequiredService().InitializeLanguageAsync();
await imageLoadertask;
_mainWindow = new MainWindow();
- API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");
-
Current.MainWindow = _mainWindow;
Current.MainWindow.Title = Constant.FlowLauncher;
- // main windows needs initialized before theme change because of blur settings
+ // Main windows needs initialized before theme change because of blur settings
Ioc.Default.GetRequiredService().ChangeTheme();
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
@@ -270,7 +267,7 @@ namespace Flow.Launcher
}
///
- /// let exception throw as normal is better for Debug
+ /// Let exception throw as normal is better for Debug
///
[Conditional("RELEASE")]
private void RegisterDispatcherUnhandledException()
@@ -279,7 +276,7 @@ namespace Flow.Launcher
}
///
- /// let exception throw as normal is better for Debug
+ /// Let exception throw as normal is better for Debug
///
[Conditional("RELEASE")]
private static void RegisterAppDomainExceptions()
@@ -288,7 +285,7 @@ namespace Flow.Launcher
}
///
- /// let exception throw as normal is better for Debug
+ /// Let exception throw as normal is better for Debug
///
[Conditional("RELEASE")]
private static void RegisterTaskSchedulerUnhandledException()
From 89127895d0541d8bab36dc57a1e6b2183980e7b0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 19:50:20 +0800
Subject: [PATCH 0841/1442] Use http client for code quality
---
.../ViewModels/SettingsPaneProxyViewModel.cs | 38 +++++++++----------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
index 38a6ef31e..6cddee8d8 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
@@ -1,4 +1,6 @@
using System.Net;
+using System.Net.Http;
+using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core;
using Flow.Launcher.Infrastructure.UserSettings;
@@ -8,49 +10,43 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneProxyViewModel : BaseModel
{
- private readonly Updater _updater;
public Settings Settings { get; }
+ private readonly Updater _updater;
+
public SettingsPaneProxyViewModel(Settings settings, Updater updater)
{
- _updater = updater;
Settings = settings;
+ _updater = updater;
}
[RelayCommand]
- private void OnTestProxyClicked()
+ private async Task OnTestProxyClickedAsync()
{
- var message = TestProxy();
+ var message = await TestProxyAsync();
App.API.ShowMsgBox(App.API.GetTranslation(message));
}
- private string TestProxy()
+ private async Task TestProxyAsync()
{
if (string.IsNullOrEmpty(Settings.Proxy.Server)) return "serverCantBeEmpty";
if (Settings.Proxy.Port <= 0) return "portCantBeEmpty";
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_updater.GitHubRepository);
+ var handler = new HttpClientHandler
+ {
+ Proxy = new WebProxy(Settings.Proxy.Server, Settings.Proxy.Port)
+ };
- if (string.IsNullOrEmpty(Settings.Proxy.UserName) || string.IsNullOrEmpty(Settings.Proxy.Password))
+ if (!string.IsNullOrEmpty(Settings.Proxy.UserName) && !string.IsNullOrEmpty(Settings.Proxy.Password))
{
- request.Proxy = new WebProxy(Settings.Proxy.Server, Settings.Proxy.Port);
- }
- else
- {
- request.Proxy = new WebProxy(Settings.Proxy.Server, Settings.Proxy.Port)
- {
- Credentials = new NetworkCredential(Settings.Proxy.UserName, Settings.Proxy.Password)
- };
+ handler.Proxy.Credentials = new NetworkCredential(Settings.Proxy.UserName, Settings.Proxy.Password);
}
+ using var client = new HttpClient(handler);
try
{
- var response = (HttpWebResponse)request.GetResponse();
- return response.StatusCode switch
- {
- HttpStatusCode.OK => "proxyIsCorrect",
- _ => "proxyConnectFailed"
- };
+ var response = await client.GetAsync(_updater.GitHubRepository);
+ return response.IsSuccessStatusCode ? "proxyIsCorrect" : "proxyConnectFailed";
}
catch
{
From 8463304bd4811ed70a13d75b916153b12dd9fed0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 19:56:31 +0800
Subject: [PATCH 0842/1442] Fix clock panel font issue & Improve preview
performance & Improve code quality
---
.../ViewModels/SettingsPaneThemeViewModel.cs | 104 +++++++++---------
.../SettingPages/Views/SettingsPaneTheme.xaml | 4 +-
.../Views/SettingsPaneTheme.xaml.cs | 6 +-
3 files changed, 59 insertions(+), 55 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index 1138b2869..d542eb019 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -6,7 +6,6 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Media;
-using CommunityToolkit.Mvvm.DependencyInjection;
using CommunityToolkit.Mvvm.Input;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
@@ -22,10 +21,12 @@ namespace Flow.Launcher.SettingPages.ViewModels;
public partial class SettingsPaneThemeViewModel : BaseModel
{
+ public Settings Settings { get; }
+
+ private readonly Theme _theme;
+
private readonly string DefaultFont = Win32Helper.GetSystemDefaultFont();
public string BackdropSubText => !Win32Helper.IsBackdropSupported() ? App.API.GetTranslation("BackdropTypeDisabledToolTip") : "";
- public Settings Settings { get; }
- private readonly Theme _theme = Ioc.Default.GetRequiredService();
public static string LinkHowToCreateTheme => @"https://www.flowlauncher.com/theme-builder/";
public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438";
@@ -289,59 +290,14 @@ public partial class SettingsPaneThemeViewModel : BaseModel
set => Settings.UseDate = value;
}
+ public FontFamily ClockPanelFont { get; }
+
public Brush PreviewBackground
{
get => WallpaperPathRetrieval.GetWallpaperBrush();
}
- public ResultsViewModel PreviewResults
- {
- get
- {
- var results = new List
- {
- new()
- {
- Title = App.API.GetTranslation("SampleTitleExplorer"),
- SubTitle = App.API.GetTranslation("SampleSubTitleExplorer"),
- IcoPath = Path.Combine(
- Constant.ProgramDirectory,
- @"Plugins\Flow.Launcher.Plugin.Explorer\Images\explorer.png"
- )
- },
- new()
- {
- Title = App.API.GetTranslation("SampleTitleWebSearch"),
- SubTitle = App.API.GetTranslation("SampleSubTitleWebSearch"),
- IcoPath = Path.Combine(
- Constant.ProgramDirectory,
- @"Plugins\Flow.Launcher.Plugin.WebSearch\Images\web_search.png"
- )
- },
- new()
- {
- Title = App.API.GetTranslation("SampleTitleProgram"),
- SubTitle = App.API.GetTranslation("SampleSubTitleProgram"),
- IcoPath = Path.Combine(
- Constant.ProgramDirectory,
- @"Plugins\Flow.Launcher.Plugin.Program\Images\program.png"
- )
- },
- new()
- {
- Title = App.API.GetTranslation("SampleTitleProcessKiller"),
- SubTitle = App.API.GetTranslation("SampleSubTitleProcessKiller"),
- IcoPath = Path.Combine(
- Constant.ProgramDirectory,
- @"Plugins\Flow.Launcher.Plugin.ProcessKiller\Images\app.png"
- )
- }
- };
- var vm = new ResultsViewModel(Settings);
- vm.AddResults(results, "PREVIEW");
- return vm;
- }
- }
+ public ResultsViewModel PreviewResults { get; }
public FontFamily SelectedQueryBoxFont
{
@@ -479,9 +435,53 @@ public partial class SettingsPaneThemeViewModel : BaseModel
public string ThemeImage => Constant.QueryTextBoxIconImagePath;
- public SettingsPaneThemeViewModel(Settings settings)
+ public SettingsPaneThemeViewModel(Settings settings, Theme theme)
{
Settings = settings;
+ _theme = theme;
+ ClockPanelFont = new FontFamily(DefaultFont);
+ var results = new List
+ {
+ new()
+ {
+ Title = App.API.GetTranslation("SampleTitleExplorer"),
+ SubTitle = App.API.GetTranslation("SampleSubTitleExplorer"),
+ IcoPath = Path.Combine(
+ Constant.ProgramDirectory,
+ @"Plugins\Flow.Launcher.Plugin.Explorer\Images\explorer.png"
+ )
+ },
+ new()
+ {
+ Title = App.API.GetTranslation("SampleTitleWebSearch"),
+ SubTitle = App.API.GetTranslation("SampleSubTitleWebSearch"),
+ IcoPath = Path.Combine(
+ Constant.ProgramDirectory,
+ @"Plugins\Flow.Launcher.Plugin.WebSearch\Images\web_search.png"
+ )
+ },
+ new()
+ {
+ Title = App.API.GetTranslation("SampleTitleProgram"),
+ SubTitle = App.API.GetTranslation("SampleSubTitleProgram"),
+ IcoPath = Path.Combine(
+ Constant.ProgramDirectory,
+ @"Plugins\Flow.Launcher.Plugin.Program\Images\program.png"
+ )
+ },
+ new()
+ {
+ Title = App.API.GetTranslation("SampleTitleProcessKiller"),
+ SubTitle = App.API.GetTranslation("SampleSubTitleProcessKiller"),
+ IcoPath = Path.Combine(
+ Constant.ProgramDirectory,
+ @"Plugins\Flow.Launcher.Plugin.ProcessKiller\Images\app.png"
+ )
+ }
+ };
+ var vm = new ResultsViewModel(Settings);
+ vm.AddResults(results, "PREVIEW");
+ PreviewResults = vm;
}
[RelayCommand]
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index f7853515a..4640165f6 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -331,20 +331,22 @@
IsReadOnly="True"
Style="{DynamicResource QueryBoxStyle}"
Text="{DynamicResource hiThere}" />
-
+
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index f4c103ade..a1a0231a5 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -1,7 +1,8 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.Core.Resource;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.SettingPages.ViewModels;
using Page = ModernWpf.Controls.Page;
namespace Flow.Launcher.SettingPages.Views;
@@ -15,7 +16,8 @@ public partial class SettingsPaneTheme : Page
if (!IsInitialized)
{
var settings = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneThemeViewModel(settings);
+ var theme = Ioc.Default.GetRequiredService();
+ _viewModel = new SettingsPaneThemeViewModel(settings, theme);
DataContext = _viewModel;
InitializeComponent();
}
From 82d97fd05af3014eb9acb18092dd86d359b44fdc Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 20:24:02 +0800
Subject: [PATCH 0843/1442] Improve code quality
---
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
index e0a217251..32ee3c043 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
@@ -113,7 +113,7 @@ namespace Flow.Launcher.Core.Plugin
// If can parse the default value to bool, use it, otherwise use false
: value is string stringValue && bool.TryParse(stringValue, out var boolValueFromString)
&& boolValueFromString;
- checkBox.Dispatcher.Invoke(() =>checkBox.IsChecked = isChecked);
+ checkBox.Dispatcher.Invoke(() => checkBox.IsChecked = isChecked);
break;
}
}
@@ -154,8 +154,7 @@ namespace Flow.Launcher.Core.Plugin
public Control CreateSettingPanel()
{
- // No need to check if NeedCreateSettingPanel is true because CreateSettingPanel will only be called if it's true
- // if (!NeedCreateSettingPanel()) return null;
+ if (!NeedCreateSettingPanel()) return null;
// Create main grid with two columns (Column 1: Auto, Column 2: *)
var mainPanel = new Grid { Margin = SettingPanelMargin, VerticalAlignment = VerticalAlignment.Center };
From 686d106a0c099b94c066ea180b33298cb708b6d9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 20:52:24 +0800
Subject: [PATCH 0844/1442] Add todo
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 1cccc38d9..c7a973b2f 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -116,6 +116,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
OnPropertyChanged();
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
Application.Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(value);
+ // TODO: Context Menu Font
}
}
}
From 192e2efca1c65a5d0b6c9fa26ab8e8635e48e4c0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 21:40:31 +0800
Subject: [PATCH 0845/1442] Remove property change
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index c7a973b2f..e623ba400 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -113,7 +113,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
if (_settingWindowFont != value)
{
_settingWindowFont = value;
- OnPropertyChanged();
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
Application.Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(value);
// TODO: Context Menu Font
From 22fb5b1b65f48184364991cbb75ca6f054150e2e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 21:40:40 +0800
Subject: [PATCH 0846/1442] Remove unused binding
---
Flow.Launcher/SettingWindow.xaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index a34777d30..ab27b235a 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -13,7 +13,6 @@
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
- FontFamily="{Binding Settings.SettingWindowFont, Mode=TwoWay}"
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
From cbcebad4d0aecbd879c01bdf34f25fcb881d76eb Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 21:49:50 +0800
Subject: [PATCH 0847/1442] Improve code quality
---
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
index 32ee3c043..003e72a5d 100644
--- a/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
+++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
@@ -154,7 +154,7 @@ namespace Flow.Launcher.Core.Plugin
public Control CreateSettingPanel()
{
- if (!NeedCreateSettingPanel()) return null;
+ if (!NeedCreateSettingPanel()) return null!;
// Create main grid with two columns (Column 1: Auto, Column 2: *)
var mainPanel = new Grid { Margin = SettingPanelMargin, VerticalAlignment = VerticalAlignment.Center };
From 84b0393fd0fd4ef457bce71b457568ca9473d238 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 21:51:14 +0800
Subject: [PATCH 0848/1442] Use dependency injection for setting page view
models
---
Flow.Launcher/App.xaml.cs | 12 +++++++++-
.../SettingsPaneGeneralViewModel.cs | 4 ++--
.../Views/SettingsPaneAbout.xaml.cs | 8 ++-----
.../Views/SettingsPaneGeneral.xaml.cs | 10 +--------
.../Views/SettingsPaneHotkey.xaml.cs | 4 +---
.../Views/SettingsPanePluginStore.xaml.cs | 4 +---
.../Views/SettingsPanePlugins.xaml.cs | 4 +---
.../Views/SettingsPaneProxy.xaml.cs | 7 +-----
.../Views/SettingsPaneTheme.xaml.cs | 10 ++-------
.../ViewModel/SettingWindowViewModel.cs | 22 +++++++++----------
Flow.Launcher/ViewModel/WelcomeViewModel.cs | 2 +-
11 files changed, 34 insertions(+), 53 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index ac134fb5f..20dd50668 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -19,6 +19,7 @@ using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.ViewModel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -74,14 +75,23 @@ namespace Flow.Launcher
.AddSingleton(_ => _settings)
.AddSingleton(sp => new Updater(sp.GetRequiredService(), Launcher.Properties.Settings.Default.GithubRepo))
.AddSingleton()
- .AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
+ // Welcome view model & setting window view model is very simple so we just use one instance
+ .AddSingleton()
.AddSingleton()
+ // Setting page view models are complex so we use transient instance
+ .AddTransient()
+ .AddTransient()
+ .AddTransient()
+ .AddTransient()
+ .AddTransient()
+ .AddTransient()
+ .AddTransient()
).Build();
Ioc.Default.ConfigureServices(host.Services);
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index c8b83c730..1a887c4b7 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -19,10 +19,10 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public Settings Settings { get; }
private readonly Updater _updater;
- private readonly IPortable _portable;
+ private readonly Portable _portable;
private readonly Internationalization _translater;
- public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortable portable, Internationalization translater)
+ public SettingsPaneGeneralViewModel(Settings settings, Updater updater, Portable portable, Internationalization translater)
{
Settings = settings;
_updater = updater;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
index 1ecc02aa6..e57cba6d4 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
@@ -1,8 +1,6 @@
using System.Windows.Navigation;
-using Flow.Launcher.Core;
-using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.Infrastructure.UserSettings;
using CommunityToolkit.Mvvm.DependencyInjection;
+using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher.SettingPages.Views;
@@ -14,9 +12,7 @@ public partial class SettingsPaneAbout
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- var updater = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneAboutViewModel(settings, updater);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index 569d489d2..31653962d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -1,9 +1,5 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core;
-using Flow.Launcher.Core.Configuration;
-using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher.SettingPages.Views;
@@ -16,11 +12,7 @@ public partial class SettingsPaneGeneral
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- var updater = Ioc.Default.GetRequiredService();
- var portable = Ioc.Default.GetRequiredService();
- var translater = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneGeneralViewModel(settings, updater, portable, translater);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
index eb100da0c..8b757bd60 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
@@ -1,7 +1,6 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.SettingPages.Views;
@@ -13,8 +12,7 @@ public partial class SettingsPaneHotkey
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneHotkeyViewModel(settings);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
index 3bd24bc13..131dfab6d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
@@ -5,7 +5,6 @@ using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.ViewModel;
-using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.SettingPages.Views;
@@ -17,8 +16,7 @@ public partial class SettingsPanePluginStore
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPanePluginStoreViewModel();
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
index f6b435186..97574b3ce 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
@@ -2,7 +2,6 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.SettingPages.Views;
@@ -14,8 +13,7 @@ public partial class SettingsPanePlugins
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPanePluginsViewModel(settings);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
index 26350b8bb..258f2a4ad 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
@@ -1,8 +1,6 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core;
using Flow.Launcher.SettingPages.ViewModels;
-using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.SettingPages.Views;
@@ -14,13 +12,10 @@ public partial class SettingsPaneProxy
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- var updater = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneProxyViewModel(settings, updater);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
-
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index a1a0231a5..cee8e4ae4 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -1,13 +1,10 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.ViewModels;
-using Page = ModernWpf.Controls.Page;
namespace Flow.Launcher.SettingPages.Views;
-public partial class SettingsPaneTheme : Page
+public partial class SettingsPaneTheme
{
private SettingsPaneThemeViewModel _viewModel = null!;
@@ -15,13 +12,10 @@ public partial class SettingsPaneTheme : Page
{
if (!IsInitialized)
{
- var settings = Ioc.Default.GetRequiredService();
- var theme = Ioc.Default.GetRequiredService();
- _viewModel = new SettingsPaneThemeViewModel(settings, theme);
+ _viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
-
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index f05893cf4..0fe4557a7 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -5,11 +5,11 @@ namespace Flow.Launcher.ViewModel;
public partial class SettingWindowViewModel : BaseModel
{
- public Settings Settings { get; }
+ private readonly Settings _settings;
public SettingWindowViewModel(Settings settings)
{
- Settings = settings;
+ _settings = settings;
}
///
@@ -17,30 +17,30 @@ public partial class SettingWindowViewModel : BaseModel
///
public void Save()
{
- Settings.Save();
+ _settings.Save();
}
public double SettingWindowWidth
{
- get => Settings.SettingWindowWidth;
- set => Settings.SettingWindowWidth = value;
+ get => _settings.SettingWindowWidth;
+ set => _settings.SettingWindowWidth = value;
}
public double SettingWindowHeight
{
- get => Settings.SettingWindowHeight;
- set => Settings.SettingWindowHeight = value;
+ get => _settings.SettingWindowHeight;
+ set => _settings.SettingWindowHeight = value;
}
public double? SettingWindowTop
{
- get => Settings.SettingWindowTop;
- set => Settings.SettingWindowTop = value;
+ get => _settings.SettingWindowTop;
+ set => _settings.SettingWindowTop = value;
}
public double? SettingWindowLeft
{
- get => Settings.SettingWindowLeft;
- set => Settings.SettingWindowLeft = value;
+ get => _settings.SettingWindowLeft;
+ set => _settings.SettingWindowLeft = value;
}
}
diff --git a/Flow.Launcher/ViewModel/WelcomeViewModel.cs b/Flow.Launcher/ViewModel/WelcomeViewModel.cs
index 5eecabfde..82d19273f 100644
--- a/Flow.Launcher/ViewModel/WelcomeViewModel.cs
+++ b/Flow.Launcher/ViewModel/WelcomeViewModel.cs
@@ -18,6 +18,7 @@ namespace Flow.Launcher.ViewModel
{
_pageNum = value;
OnPropertyChanged();
+ OnPropertyChanged(nameof(PageDisplay));
UpdateView();
}
}
@@ -47,7 +48,6 @@ namespace Flow.Launcher.ViewModel
private void UpdateView()
{
- OnPropertyChanged(nameof(PageDisplay));
if (PageNum == 1)
{
BackEnabled = false;
From 79452921282887aac22de6d5891067aaae382e48 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 22:01:38 +0800
Subject: [PATCH 0849/1442] Update context menu font when setting is changed
---
.../UserSettings/Settings.cs | 1 -
Flow.Launcher/MainWindow.xaml.cs | 76 +++++++++++--------
2 files changed, 43 insertions(+), 34 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index e623ba400..cf194b366 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -115,7 +115,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
_settingWindowFont = value;
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
Application.Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(value);
- // TODO: Context Menu Font
}
}
}
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index bf7a45b1d..ae05d1124 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -140,7 +140,8 @@ namespace Flow.Launcher
_viewModel.Show();
}
- // Show notify icon when flowlauncher is hidden
+ // Initialize context menu & notify icon
+ InitializeContextMenu();
InitializeNotifyIcon();
// Initialize color scheme
@@ -270,6 +271,9 @@ namespace Flow.Launcher
case nameof(Settings.KeepMaxResults):
SetupResizeMode();
break;
+ case nameof(Settings.SettingWindowFont):
+ InitializeContextMenu();
+ break;
}
};
@@ -563,6 +567,44 @@ namespace Flow.Launcher
Icon = Constant.Version == "1.0.0" ? Properties.Resources.dev : Properties.Resources.app,
Visible = !_settings.HideNotifyIcon
};
+
+ _notifyIcon.MouseClick += (o, e) =>
+ {
+ switch (e.Button)
+ {
+ case MouseButtons.Left:
+ _viewModel.ToggleFlowLauncher();
+ break;
+ case MouseButtons.Right:
+
+ _contextMenu.IsOpen = true;
+ // Get context menu handle and bring it to the foreground
+ if (PresentationSource.FromVisual(_contextMenu) is HwndSource hwndSource)
+ {
+ Win32Helper.SetForegroundWindow(hwndSource.Handle);
+ }
+
+ _contextMenu.Focus();
+ break;
+ }
+ };
+ }
+
+ private void UpdateNotifyIconText()
+ {
+ var menu = _contextMenu;
+ ((MenuItem)menu.Items[0]).Header = App.API.GetTranslation("iconTrayOpen") +
+ " (" + _settings.Hotkey + ")";
+ ((MenuItem)menu.Items[1]).Header = App.API.GetTranslation("GameMode");
+ ((MenuItem)menu.Items[2]).Header = App.API.GetTranslation("PositionReset");
+ ((MenuItem)menu.Items[3]).Header = App.API.GetTranslation("iconTraySettings");
+ ((MenuItem)menu.Items[4]).Header = App.API.GetTranslation("iconTrayExit");
+ }
+
+ private void InitializeContextMenu()
+ {
+ var menu = _contextMenu;
+ menu.Items.Clear();
var openIcon = new FontIcon { Glyph = "\ue71e" };
var open = new MenuItem
{
@@ -608,38 +650,6 @@ namespace Flow.Launcher
_contextMenu.Items.Add(positionreset);
_contextMenu.Items.Add(settings);
_contextMenu.Items.Add(exit);
-
- _notifyIcon.MouseClick += (o, e) =>
- {
- switch (e.Button)
- {
- case MouseButtons.Left:
- _viewModel.ToggleFlowLauncher();
- break;
- case MouseButtons.Right:
-
- _contextMenu.IsOpen = true;
- // Get context menu handle and bring it to the foreground
- if (PresentationSource.FromVisual(_contextMenu) is HwndSource hwndSource)
- {
- Win32Helper.SetForegroundWindow(hwndSource.Handle);
- }
-
- _contextMenu.Focus();
- break;
- }
- };
- }
-
- private void UpdateNotifyIconText()
- {
- var menu = _contextMenu;
- ((MenuItem)menu.Items[0]).Header = App.API.GetTranslation("iconTrayOpen") +
- " (" + _settings.Hotkey + ")";
- ((MenuItem)menu.Items[1]).Header = App.API.GetTranslation("GameMode");
- ((MenuItem)menu.Items[2]).Header = App.API.GetTranslation("PositionReset");
- ((MenuItem)menu.Items[3]).Header = App.API.GetTranslation("iconTraySettings");
- ((MenuItem)menu.Items[4]).Header = App.API.GetTranslation("iconTrayExit");
}
#endregion
From 5665758ee6dd3c70d0e35f4923e698053643316b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 24 Apr 2025 22:04:48 +0800
Subject: [PATCH 0850/1442] Add property change back
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index cf194b366..1cccc38d9 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -113,6 +113,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
if (_settingWindowFont != value)
{
_settingWindowFont = value;
+ OnPropertyChanged();
Application.Current.Resources["SettingWindowFont"] = new FontFamily(value);
Application.Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(value);
}
From 197e9c45ce91738edea1e2170de4fbe4a21856f9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 25 Apr 2025 08:19:03 +0800
Subject: [PATCH 0851/1442] Improve code comments
---
Flow.Launcher/App.xaml.cs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 20dd50668..b1ff136b3 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -79,12 +79,16 @@ namespace Flow.Launcher
.AddSingleton()
.AddSingleton()
.AddSingleton()
- .AddSingleton()
.AddSingleton()
- // Welcome view model & setting window view model is very simple so we just use one instance
- .AddSingleton()
+ // Use one instance for main window view model because we only have one main window
+ .AddSingleton()
+ // Use one instance for welcome window view model & setting window view model because
+ // pages in welcome window & setting window need to share the same instance and
+ // these two view models do not need to be reset when creating new windows
.AddSingleton()
- // Setting page view models are complex so we use transient instance
+ .AddSingleton()
+ // Use transient instance for setting window page view models because
+ // pages in setting window need to be recreated when setting window is closed
.AddTransient()
.AddTransient()
.AddTransient()
From e3573f32d52b3e1e007516d4c818da5851a1cae0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 25 Apr 2025 08:42:41 +0800
Subject: [PATCH 0852/1442] Improve code quality
---
Flow.Launcher/SettingWindow.xaml.cs | 39 ++++++++++++++-----
.../ViewModel/SettingWindowViewModel.cs | 8 ----
Flow.Launcher/WelcomeWindow.xaml.cs | 10 +++--
3 files changed, 36 insertions(+), 21 deletions(-)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index b4a3ae47a..cd3e5414f 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -1,6 +1,6 @@
using System;
using System.Windows;
-using System.Windows.Forms;
+using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using CommunityToolkit.Mvvm.DependencyInjection;
@@ -9,35 +9,45 @@ using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.SettingPages.Views;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
-using TextBox = System.Windows.Controls.TextBox;
+using Screen = System.Windows.Forms.Screen;
namespace Flow.Launcher;
public partial class SettingWindow
{
+ #region Private Fields
+
private readonly Settings _settings;
- private readonly SettingWindowViewModel _viewModel;
+
+ #endregion
+
+ #region Constructor
public SettingWindow()
{
- var viewModel = Ioc.Default.GetRequiredService();
_settings = Ioc.Default.GetRequiredService();
+ var viewModel = Ioc.Default.GetRequiredService();
DataContext = viewModel;
- _viewModel = viewModel;
- InitializePosition();
InitializeComponent();
+
+ UpdatePositionAndState();
}
+ #endregion
+
+ #region Window Events
+
private void OnLoaded(object sender, RoutedEventArgs e)
{
RefreshMaximizeRestoreButton();
+
// Fix (workaround) for the window freezes after lock screen (Win+L) or sleep
// https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
HwndTarget hwndTarget = hwndSource.CompositionTarget;
hwndTarget.RenderMode = RenderMode.SoftwareOnly; // Must use software only render mode here
- InitializePosition();
+ UpdatePositionAndState();
}
private void OnClosed(object sender, EventArgs e)
@@ -45,7 +55,7 @@ public partial class SettingWindow
_settings.SettingWindowState = WindowState;
_settings.SettingWindowTop = Top;
_settings.SettingWindowLeft = Left;
- _viewModel.Save();
+ _settings.Save();
App.API.SavePluginSettings();
}
@@ -104,7 +114,11 @@ public partial class SettingWindow
RefreshMaximizeRestoreButton();
}
- public void InitializePosition()
+ #endregion
+
+ #region Window Position
+
+ public void UpdatePositionAndState()
{
var previousTop = _settings.SettingWindowTop;
var previousLeft = _settings.SettingWindowLeft;
@@ -119,6 +133,7 @@ public partial class SettingWindow
Top = previousTop.Value;
Left = previousLeft.Value;
}
+
WindowState = _settings.SettingWindowState;
}
@@ -155,6 +170,10 @@ public partial class SettingWindow
return top;
}
+ #endregion
+
+ #region Navigation View Events
+
private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
{
if (args.IsSettingsSelected)
@@ -201,4 +220,6 @@ public partial class SettingWindow
{
NavView.SelectedItem ??= NavView.MenuItems[0]; /* Set First Page */
}
+
+ #endregion
}
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 0fe4557a7..17a1a2b50 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -12,14 +12,6 @@ public partial class SettingWindowViewModel : BaseModel
_settings = settings;
}
- ///
- /// Save Flow settings. Plugins settings are not included.
- ///
- public void Save()
- {
- _settings.Save();
- }
-
public double SettingWindowWidth
{
get => _settings.SettingWindowWidth;
diff --git a/Flow.Launcher/WelcomeWindow.xaml.cs b/Flow.Launcher/WelcomeWindow.xaml.cs
index 637f9448d..d23bd4937 100644
--- a/Flow.Launcher/WelcomeWindow.xaml.cs
+++ b/Flow.Launcher/WelcomeWindow.xaml.cs
@@ -2,16 +2,17 @@
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;
-using Flow.Launcher.Resources.Pages;
-using ModernWpf.Media.Animation;
using CommunityToolkit.Mvvm.DependencyInjection;
-using Flow.Launcher.ViewModel;
using Flow.Launcher.Infrastructure.UserSettings;
+using Flow.Launcher.Resources.Pages;
+using Flow.Launcher.ViewModel;
+using ModernWpf.Media.Animation;
namespace Flow.Launcher
{
public partial class WelcomeWindow : Window
{
+ private readonly Settings _settings;
private readonly WelcomeViewModel _viewModel;
private readonly NavigationTransitionInfo _forwardTransitionInfo = new SlideNavigationTransitionInfo()
@@ -25,6 +26,7 @@ namespace Flow.Launcher
public WelcomeWindow()
{
+ _settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
@@ -97,7 +99,7 @@ namespace Flow.Launcher
private void Window_Closed(object sender, EventArgs e)
{
// Save settings when window is closed
- Ioc.Default.GetRequiredService().Save();
+ _settings.Save();
}
}
}
From 856346acebe94adadd178616e157607d497c4e8e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 25 Apr 2025 09:03:04 +0800
Subject: [PATCH 0853/1442] Always update main window position when window is
loaded
---
Flow.Launcher/MainWindow.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index ae05d1124..381d03c1f 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -324,7 +324,7 @@ namespace Flow.Launcher
private void OnLocationChanged(object sender, EventArgs e)
{
- if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation)
+ if (IsLoaded)
{
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
From defb2830d632fbebc05f570d149fb078f4a9e2a0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 25 Apr 2025 09:04:14 +0800
Subject: [PATCH 0854/1442] Change setting window position & window state
faster & Do not save settings for faster exiting experience
---
Flow.Launcher/App.xaml.cs | 3 ++-
Flow.Launcher/SettingWindow.xaml | 1 +
Flow.Launcher/SettingWindow.xaml.cs | 38 +++++++++++++++++++----------
Flow.Launcher/WelcomeWindow.xaml.cs | 7 +++---
4 files changed, 31 insertions(+), 18 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index b1ff136b3..1b57d5cbe 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -31,6 +31,7 @@ namespace Flow.Launcher
#region Public Properties
public static IPublicAPI API { get; private set; }
+ public static bool Exiting => _mainWindow.CanClose;
#endregion
@@ -39,7 +40,7 @@ namespace Flow.Launcher
private static readonly string ClassName = nameof(App);
private static bool _disposed;
- private MainWindow _mainWindow;
+ private static MainWindow _mainWindow;
private readonly MainViewModel _mainVM;
private readonly Settings _settings;
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index ab27b235a..a75a51c8f 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -16,6 +16,7 @@
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
+ LocationChanged="Window_LocationChanged"
MouseDown="window_MouseDown"
ResizeMode="CanResize"
SnapsToDevicePixels="True"
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index cd3e5414f..79bd171ed 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -52,9 +52,9 @@ public partial class SettingWindow
private void OnClosed(object sender, EventArgs e)
{
- _settings.SettingWindowState = WindowState;
- _settings.SettingWindowTop = Top;
- _settings.SettingWindowLeft = Left;
+ // If app is exiting, settings save is not needed because main window closing event will handle this
+ if (App.Exiting) return;
+ // Save settings when window is closed
_settings.Save();
App.API.SavePluginSettings();
}
@@ -66,15 +66,32 @@ public partial class SettingWindow
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
{
- if (Keyboard.FocusedElement is not TextBox textBox)
- {
- return;
- }
+ if (Keyboard.FocusedElement is not TextBox textBox) return;
var tRequest = new TraversalRequest(FocusNavigationDirection.Next);
textBox.MoveFocus(tRequest);
}
- /* Custom TitleBar */
+ private void Window_StateChanged(object sender, EventArgs e)
+ {
+ RefreshMaximizeRestoreButton();
+ if (IsLoaded)
+ {
+ _settings.SettingWindowState = WindowState;
+ }
+ }
+
+ private void Window_LocationChanged(object sender, EventArgs e)
+ {
+ if (IsLoaded)
+ {
+ _settings.SettingWindowTop = Top;
+ _settings.SettingWindowLeft = Left;
+ }
+ }
+
+ #endregion
+
+ #region Window Custom TitleBar
private void OnMinimizeButtonClick(object sender, RoutedEventArgs e)
{
@@ -109,11 +126,6 @@ public partial class SettingWindow
}
}
- private void Window_StateChanged(object sender, EventArgs e)
- {
- RefreshMaximizeRestoreButton();
- }
-
#endregion
#region Window Position
diff --git a/Flow.Launcher/WelcomeWindow.xaml.cs b/Flow.Launcher/WelcomeWindow.xaml.cs
index d23bd4937..ef0706765 100644
--- a/Flow.Launcher/WelcomeWindow.xaml.cs
+++ b/Flow.Launcher/WelcomeWindow.xaml.cs
@@ -78,10 +78,7 @@ namespace Flow.Launcher
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
{
- if (Keyboard.FocusedElement is not TextBox textBox)
- {
- return;
- }
+ if (Keyboard.FocusedElement is not TextBox textBox) return;
var tRequest = new TraversalRequest(FocusNavigationDirection.Next);
textBox.MoveFocus(tRequest);
}
@@ -98,6 +95,8 @@ namespace Flow.Launcher
private void Window_Closed(object sender, EventArgs e)
{
+ // If app is exiting, settings save is not needed because main window closing event will handle this
+ if (App.Exiting) return;
// Save settings when window is closed
_settings.Save();
}
From f0512d7861f0e9698b093bb69296c21f1f652d54 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 25 Apr 2025 09:13:51 +0800
Subject: [PATCH 0855/1442] Add blank line
---
Flow.Launcher/Resources/SettingWindowStyle.xaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher/Resources/SettingWindowStyle.xaml b/Flow.Launcher/Resources/SettingWindowStyle.xaml
index 60655fa7c..fc9246aa3 100644
--- a/Flow.Launcher/Resources/SettingWindowStyle.xaml
+++ b/Flow.Launcher/Resources/SettingWindowStyle.xaml
@@ -7,6 +7,7 @@
+
F1 M512,512z M0,0z M448,256C448,150,362,64,256,64L256,448C362,448,448,362,448,256z M0,256A256,256,0,1,1,512,256A256,256,0,1,1,0,256z
-
-
-
+ Orientation="Horizontal">
+
+
+
+
+
+
+
+
+
+
+
+
Date: Tue, 29 Apr 2025 10:46:16 +0800
Subject: [PATCH 0863/1442] Remove unused image
---
Flow.Launcher/Images/EXE.png | Bin 2173 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 Flow.Launcher/Images/EXE.png
diff --git a/Flow.Launcher/Images/EXE.png b/Flow.Launcher/Images/EXE.png
deleted file mode 100644
index ecc91bdb3ab7b81b7a01f5a46cc127a883e6a6ed..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 2173
zcmbVOc~BEq99|F)u$FkWlv-Eqc0&R>mf~Q=
zO6%yL1xE*vPN`aHwH_6Z`bVLTil|f++o@9=!D0)wYQ4a|g^*E;$GEebeQ)3QzTffv
z-fvQpmYOssBs>IypfUPnT{?K9{4;6<_{|Kw`!RS0JComK!FntI1jJ9-?1iA=^|UdI
z%QB?kBx4s7CMJgxd+knuhM-xoUME53QXHH^S!jnw*j;~A2-7BwFjH
zR7OFnku1n1)h1!=Y|Or;|;=DhBR2q
zxF}dD#zZ8FqOejeCR9o(mZP2lOHc`hplWc7P!yLcaj6RST|!{aWisRGx2}%rjhje>vQc)*!La~~`LRwb!!fLt
zc?z|E`7r|^w+4gX#*n_)?S2z1myid-@FiqOG;7RvQb;<*GHw@1CFB7&qxoo@xYk7x
z9OE)FjBQYEJrvH(iWDS)iPUnLLPRL!5|LV|$|2P<(yWx4
z2lwk3(#PT
zdH4gzmjs?nvp}qT--*bemik6E8t$(GoFMt?)(A;nR>~yweWr)Vz>7sNK;EsmmvP;fR?#Bk;hV~U
zD9Dp~^{+kBfCk~9tMNmBKLrziN2VNr+6DS;@hPhWf>U7XSS(Vv?P^Tx-8HGX*7
zR-aW>Sqe{Be87uFMZ{DFSA^AVUAy>LPq_?hV3r)Z6O2Zz9&vNd>Y{`iq-bJWQNTfI
zM4PdqHs!)zZF?WGdCLRo>3=Te=b0n0hUQc0yT*^&5%$C0gAp)67NlL-ip^4>;fl-m
zPW+t7hBi7bdhLp^9TS^ZCC!fs{bs|ClzFp{pGw4Dzp$yfxHfRj*gRL+wXeSXzIFb|
zjw_LZ=$3`kl-mkBRfTY=MJL!Y5C`@Lb$f-bhY
z9qRb&)yUxay$3Y*(NT)VTfKp)6{|X;4cm{_b|EZQnCsRQE{N@!Tz(@orK)YVs%7Nj
z+;#e@#Is9YDOfuG-tw4VS02x7yT0BKZOLeCifRe@yfnLL|8VZenx@v~yWuUvPF@uk
z+?GxX>MZLHVs5OitNi6=UFM<{dsx9c#m?!?6<3Q(W=WzPq>XkBgbGKCL#lL;K^W
zSEbiSR@U@>H?z!^DCjwy_b?7>%er+aY3ewLkz9H|{(iu*_sGIS@?zhj~*!+bdW%sp6eRO$ycYGC8^IKB(
z?3EYWX3EYFTjoAgGQ)+Jc-(@0|Dwg=>-F*nW!gT$aqaSQwhqXd1GTORcyIa$=ht9j
z3pn!N+>8}<@;5iURfuXWQRjoqwzUiQpV_eU;nhghw*c8SxvTSb({^ik4gUv0pOC8C
I6~CnDKgG8Q3jhEB
From 7e50eb542676f711c6e5ed272ff0bb4fac6bf4bc Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 29 Apr 2025 10:47:13 +0800
Subject: [PATCH 0864/1442] Code quality
---
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
index 7867fa980..66c1cb1bf 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
@@ -377,9 +377,7 @@
Text="{Binding Description, Mode=OneWay}"
TextTrimming="WordEllipsis"
TextWrapping="Wrap" />
-
-
From 9b666d31363796bef10e8f031fe99b7d7e13ee73 Mon Sep 17 00:00:00 2001
From: DB p
Date: Tue, 29 Apr 2025 20:06:46 +0900
Subject: [PATCH 0865/1442] Add Flyout UI for Filter
---
.../Views/SettingsPanePluginStore.xaml | 55 +++++++++----------
1 file changed, 27 insertions(+), 28 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
index 66c1cb1bf..fde022da7 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
@@ -65,34 +65,33 @@
Command="{Binding RefreshExternalPluginsCommand}"
Content="{DynamicResource refresh}"
FontSize="13" />
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
Date: Tue, 29 Apr 2025 19:31:37 +0800
Subject: [PATCH 0866/1442] Adjust margin & Improve ui
---
.../SettingPages/Views/SettingsPanePluginStore.xaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
index fde022da7..df9cc3556 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
@@ -58,14 +58,14 @@
Orientation="Horizontal">
-
+
@@ -80,7 +80,7 @@
IsChecked="{Binding ShowPython, Mode=TwoWay}"
StaysOpenOnClick="True" />
From d0b44854ca282999fdba8f72be7c9306acfa00e2 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 29 Apr 2025 19:33:56 +0800
Subject: [PATCH 0867/1442] Set menu flyout to bottom
---
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
index df9cc3556..9312b0c2d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
@@ -68,7 +68,7 @@
-
+
Date: Wed, 30 Apr 2025 10:45:09 +0800
Subject: [PATCH 0868/1442] Change function name to suppress warning
---
Flow.Launcher/ActionKeywords.xaml.cs | 2 +-
Flow.Launcher/ViewModel/PluginViewModel.cs | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/ActionKeywords.xaml.cs b/Flow.Launcher/ActionKeywords.xaml.cs
index ad24f2a76..9420b4c38 100644
--- a/Flow.Launcher/ActionKeywords.xaml.cs
+++ b/Flow.Launcher/ActionKeywords.xaml.cs
@@ -80,7 +80,7 @@ namespace Flow.Launcher
}
// Update action keywords text and close window
- _pluginViewModel.OnActionKeywordsChanged();
+ _pluginViewModel.OnActionKeywordsTextChanged();
Close();
}
}
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 8312806fb..64a7f3db8 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -155,16 +155,11 @@ namespace Flow.Launcher.ViewModel
public bool SearchDelayEnabled => Settings.SearchQueryResultsWithDelay;
public string DefaultSearchDelay => Settings.SearchDelayTime.ToString();
- public void OnActionKeywordsChanged()
+ public void OnActionKeywordsTextChanged()
{
OnPropertyChanged(nameof(ActionKeywordsText));
}
- public void OnSearchDelayTimeChanged()
- {
- OnPropertyChanged(nameof(SearchDelayTimeText));
- }
-
[RelayCommand]
private void OpenPluginDirectory()
{
From 6b9a710145c5e4022e3b977ad31b3533dbef4148 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 30 Apr 2025 10:45:18 +0800
Subject: [PATCH 0869/1442] Set private assets all for PropertyChanged.Fody
---
.../Flow.Launcher.Infrastructure.csproj | 4 +++-
Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj | 4 +++-
Flow.Launcher/Flow.Launcher.csproj | 4 +++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
index f02b2297f..31547200b 100644
--- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
+++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
@@ -66,7 +66,9 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+ all
+
diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
index 1472813b8..ce3b7ab1a 100644
--- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
+++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj
@@ -76,7 +76,9 @@
allruntime; build; native; contentfiles; analyzers; buildtransitive
-
+
+ all
+
diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj
index 91cab9fa0..8d43eff98 100644
--- a/Flow.Launcher/Flow.Launcher.csproj
+++ b/Flow.Launcher/Flow.Launcher.csproj
@@ -98,7 +98,9 @@
-
+
+ all
+
From a9641505b63a19248d68a6c1b118fece029fe582 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 30 Apr 2025 19:21:59 +0800
Subject: [PATCH 0870/1442] Fix clean cache issue
---
.../ViewModels/SettingsPaneAboutViewModel.cs | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 231d14d55..3889b9b00 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -186,6 +186,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
{
try
{
+ // Make sure directory clean
dir.Delete(true);
}
catch (Exception e)
@@ -214,6 +215,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
{
var success = true;
var cacheDirectory = GetCacheDir();
+ var pluginCacheDirectory = GetPluginCacheDir();
var cacheFiles = GetCacheFiles();
cacheFiles.ForEach(f =>
@@ -229,12 +231,31 @@ public partial class SettingsPaneAboutViewModel : BaseModel
}
});
+ // Firstly, delete plugin cache directories
+ pluginCacheDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
+ .ToList()
+ .ForEach(dir =>
+ {
+ try
+ {
+ // Plugin may create directories in its cache directory
+ dir.Delete(true);
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete cache directory: {dir.Name}", e);
+ success = false;
+ }
+ });
+
+ // Then, delete plugin directory
cacheDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
.ToList()
.ForEach(dir =>
{
try
{
+ // Make sure directory clean
dir.Delete(true);
}
catch (Exception e)
@@ -254,6 +275,11 @@ public partial class SettingsPaneAboutViewModel : BaseModel
return new DirectoryInfo(DataLocation.CacheDirectory);
}
+ private static DirectoryInfo GetPluginCacheDir()
+ {
+ return new DirectoryInfo(DataLocation.PluginCacheDirectory);
+ }
+
private static List GetCacheFiles()
{
return GetCacheDir().EnumerateFiles("*", SearchOption.AllDirectories).ToList();
From c9e85a1888f0936342ea74121c7e070ff7322777 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 30 Apr 2025 19:35:35 +0800
Subject: [PATCH 0871/1442] Use recursive false
---
.../ViewModels/SettingsPaneAboutViewModel.cs | 29 ++++++++-----------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 3889b9b00..652fc1ce5 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -186,8 +186,8 @@ public partial class SettingsPaneAboutViewModel : BaseModel
{
try
{
- // Make sure directory clean
- dir.Delete(true);
+ // Log folders are the last level of folders
+ dir.Delete(false);
}
catch (Exception e)
{
@@ -249,21 +249,16 @@ public partial class SettingsPaneAboutViewModel : BaseModel
});
// Then, delete plugin directory
- cacheDirectory.EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
- .ToList()
- .ForEach(dir =>
- {
- try
- {
- // Make sure directory clean
- dir.Delete(true);
- }
- catch (Exception e)
- {
- App.API.LogException(ClassName, $"Failed to delete cache directory: {dir.Name}", e);
- success = false;
- }
- });
+ try
+ {
+ // Log folders are the last level of folders
+ GetPluginCacheDir().Delete(false);
+ }
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Failed to delete cache directory: {dir.Name}", e);
+ success = false;
+ }
OnPropertyChanged(nameof(CacheFolderSize));
From 7762c7929e5837d0c3606c4cb2f0e53e5105991f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 30 Apr 2025 19:38:15 +0800
Subject: [PATCH 0872/1442] Explictly add recursive & Fix build
---
.../SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 652fc1ce5..374dcb3ad 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -187,7 +187,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
try
{
// Log folders are the last level of folders
- dir.Delete(false);
+ dir.Delete(recursive: false);
}
catch (Exception e)
{
@@ -239,7 +239,7 @@ public partial class SettingsPaneAboutViewModel : BaseModel
try
{
// Plugin may create directories in its cache directory
- dir.Delete(true);
+ dir.Delete(recursive: true);
}
catch (Exception e)
{
@@ -249,10 +249,11 @@ public partial class SettingsPaneAboutViewModel : BaseModel
});
// Then, delete plugin directory
+ var dir = GetPluginCacheDir();
try
{
// Log folders are the last level of folders
- GetPluginCacheDir().Delete(false);
+ dir.Delete(recursive: false);
}
catch (Exception e)
{
From 541e1981a93a727ad81b55c2a26954f2f6c0f847 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 30 Apr 2025 19:40:23 +0800
Subject: [PATCH 0873/1442] Fix code comments
---
.../SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
index 374dcb3ad..00f40b009 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
@@ -252,7 +252,6 @@ public partial class SettingsPaneAboutViewModel : BaseModel
var dir = GetPluginCacheDir();
try
{
- // Log folders are the last level of folders
dir.Delete(recursive: false);
}
catch (Exception e)
From 980b792cb360515f4d4b17c49a955a156a50bc15 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 11:06:52 +0800
Subject: [PATCH 0874/1442] Wrap operation in one class
---
Flow.Launcher/Storage/TopMostRecord.cs | 34 ++++++++++++++++++++++++
Flow.Launcher/ViewModel/MainViewModel.cs | 8 +++---
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 7f35904a5..63f0a2fce 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -1,10 +1,44 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text.Json.Serialization;
+using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.Storage
{
+ public class FlowLauncherJsonStorageTopMostRecord : ISavable
+ {
+ private readonly FlowLauncherJsonStorage _topMostRecordStorage;
+
+ private readonly TopMostRecord _topMostRecord;
+
+ public FlowLauncherJsonStorageTopMostRecord()
+ {
+ _topMostRecordStorage = new FlowLauncherJsonStorage();
+ _topMostRecord = _topMostRecordStorage.Load();
+ }
+
+ public void Save()
+ {
+ _topMostRecordStorage.Save();
+ }
+
+ public bool IsTopMost(Result result)
+ {
+ return _topMostRecord.IsTopMost(result);
+ }
+
+ public void Remove(Result result)
+ {
+ _topMostRecord.Remove(result);
+ }
+
+ public void AddOrUpdate(Result result)
+ {
+ _topMostRecord.AddOrUpdate(result);
+ }
+ }
+
public class TopMostRecord
{
[JsonInclude]
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 00675149b..54ad6c288 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -37,11 +37,10 @@ namespace Flow.Launcher.ViewModel
private readonly FlowLauncherJsonStorage _historyItemsStorage;
private readonly FlowLauncherJsonStorage _userSelectedRecordStorage;
- private readonly FlowLauncherJsonStorage _topMostRecordStorage;
+ private readonly FlowLauncherJsonStorageTopMostRecord _topMostRecord;
private readonly History _history;
private int lastHistoryIndex = 1;
private readonly UserSelectedRecord _userSelectedRecord;
- private readonly TopMostRecord _topMostRecord;
private CancellationTokenSource _updateSource;
private CancellationToken _updateToken;
@@ -134,10 +133,9 @@ namespace Flow.Launcher.ViewModel
_historyItemsStorage = new FlowLauncherJsonStorage();
_userSelectedRecordStorage = new FlowLauncherJsonStorage();
- _topMostRecordStorage = new FlowLauncherJsonStorage();
+ _topMostRecord = new FlowLauncherJsonStorageTopMostRecord();
_history = _historyItemsStorage.Load();
_userSelectedRecord = _userSelectedRecordStorage.Load();
- _topMostRecord = _topMostRecordStorage.Load();
ContextMenu = new ResultsViewModel(Settings)
{
@@ -1612,7 +1610,7 @@ namespace Flow.Launcher.ViewModel
{
_historyItemsStorage.Save();
_userSelectedRecordStorage.Save();
- _topMostRecordStorage.Save();
+ _topMostRecord.Save();
}
///
From 0d619085753cb8e443044c6cd016b86b5fc5b1d3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 11:41:53 +0800
Subject: [PATCH 0875/1442] Support multiple topmost records
---
.../Storage/JsonStorage.cs | 5 +
Flow.Launcher/Storage/TopMostRecord.cs | 137 ++++++++++++++++--
2 files changed, 132 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index 0b10382ee..20aacb344 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -45,6 +45,11 @@ namespace Flow.Launcher.Infrastructure.Storage
FilesFolders.ValidateDirectory(DirectoryPath);
}
+ public bool Exists()
+ {
+ return File.Exists(FilePath);
+ }
+
public async Task LoadAsync()
{
if (Data != null)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 63f0a2fce..25774a2c0 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -1,5 +1,6 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Linq;
using System.Text.Json.Serialization;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Plugin;
@@ -8,14 +9,29 @@ namespace Flow.Launcher.Storage
{
public class FlowLauncherJsonStorageTopMostRecord : ISavable
{
- private readonly FlowLauncherJsonStorage _topMostRecordStorage;
-
- private readonly TopMostRecord _topMostRecord;
+ private readonly FlowLauncherJsonStorage _topMostRecordStorage;
+ private readonly MultipleTopMostRecord _topMostRecord;
public FlowLauncherJsonStorageTopMostRecord()
{
- _topMostRecordStorage = new FlowLauncherJsonStorage();
- _topMostRecord = _topMostRecordStorage.Load();
+ var topMostRecordStorage = new FlowLauncherJsonStorage();
+ var exist = topMostRecordStorage.Exists();
+ if (exist)
+ {
+ // Get old data
+ var topMostRecord = topMostRecordStorage.Load();
+
+ // Convert to new data
+ _topMostRecordStorage = new FlowLauncherJsonStorage();
+ _topMostRecord = _topMostRecordStorage.Load();
+ _topMostRecord.Add(topMostRecord);
+ }
+ else
+ {
+ // Get new data
+ _topMostRecordStorage = new FlowLauncherJsonStorage();
+ _topMostRecord = _topMostRecordStorage.Load();
+ }
}
public void Save()
@@ -42,7 +58,7 @@ namespace Flow.Launcher.Storage
public class TopMostRecord
{
[JsonInclude]
- public ConcurrentDictionary records { get; private set; } = new ConcurrentDictionary();
+ public ConcurrentDictionary records { get; private set; } = new();
internal bool IsTopMost(Result result)
{
@@ -90,12 +106,113 @@ namespace Flow.Launcher.Storage
}
}
+ public class MultipleTopMostRecord
+ {
+ [JsonInclude]
+ public ConcurrentDictionary> records { get; private set; } = new();
+
+ internal void Add(TopMostRecord topMostRecord)
+ {
+ if (topMostRecord == null || topMostRecord.records.IsEmpty)
+ {
+ return;
+ }
+
+ foreach (var record in topMostRecord.records)
+ {
+ records.AddOrUpdate(record.Key, new ConcurrentBag { record.Value }, (key, oldValue) =>
+ {
+ oldValue.Add(record.Value);
+ return oldValue;
+ });
+ }
+ }
+
+ internal bool IsTopMost(Result result)
+ {
+ // origin query is null when user select the context menu item directly of one item from query list
+ // in this case, we do not need to check if the result is top most
+ if (records.IsEmpty || result.OriginQuery == null ||
+ !records.TryGetValue(result.OriginQuery.RawQuery, out var value))
+ {
+ return false;
+ }
+
+ // since this dictionary should be very small (or empty) going over it should be pretty fast.
+ return value.Any(record => record.Equals(result));
+ }
+
+ internal void Remove(Result result)
+ {
+ // origin query is null when user select the context menu item directly of one item from query list
+ // in this case, we do not need to remove the record
+ if (result.OriginQuery == null ||
+ !records.TryGetValue(result.OriginQuery.RawQuery, out var value))
+ {
+ return;
+ }
+
+ // remove the record from the bag
+ var recordToRemove = value.FirstOrDefault(r => r.Equals(result));
+ if (recordToRemove != null)
+ {
+ value.TryTake(out recordToRemove);
+ }
+ }
+
+ internal void AddOrUpdate(Result result)
+ {
+ // origin query is null when user select the context menu item directly of one item from query list
+ // in this case, we do not need to add or update the record
+ if (result.OriginQuery == null)
+ {
+ return;
+ }
+
+ var record = new Record
+ {
+ PluginID = result.PluginID,
+ Title = result.Title,
+ SubTitle = result.SubTitle,
+ RecordKey = result.RecordKey
+ };
+ if (!records.TryGetValue(result.OriginQuery.RawQuery, out var value))
+ {
+ // create a new bag if it does not exist
+ value = new ConcurrentBag()
+ {
+ record
+ };
+ records.TryAdd(result.OriginQuery.RawQuery, value);
+ }
+ else
+ {
+ // add or update the record in the bag
+ if (value.Any(r => r.Equals(result)))
+ {
+ // update the record
+ var recordToUpdate = value.FirstOrDefault(r => r.Equals(result));
+ if (recordToUpdate != null)
+ {
+ value.TryTake(out recordToUpdate);
+ value.Add(record);
+ }
+ }
+ else
+ {
+ // add the record
+ value.Add(record);
+ }
+ }
+ }
+ }
+
public class Record
{
- public string Title { get; set; }
- public string SubTitle { get; set; }
- public string PluginID { get; set; }
- public string RecordKey { get; set; }
+ public string Title { get; init; }
+ public string SubTitle { get; init; }
+ public string PluginID { get; init; }
+ public string RecordKey { get; init; }
public bool Equals(Result r)
{
From af087fb85b50096b69fc8965436b109eecdc3950 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 12:49:20 +0800
Subject: [PATCH 0876/1442] Support multiple topmost records storage
---
.../Storage/JsonStorage.cs | 16 ++++
Flow.Launcher/Storage/TopMostRecord.cs | 78 ++++++++++++++++---
2 files changed, 82 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index 20aacb344..db9ccc28a 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -50,6 +50,22 @@ namespace Flow.Launcher.Infrastructure.Storage
return File.Exists(FilePath);
}
+ public void Delete()
+ {
+ if (File.Exists(FilePath))
+ {
+ File.Delete(FilePath);
+ }
+ if (File.Exists(BackupFilePath))
+ {
+ File.Delete(BackupFilePath);
+ }
+ if (File.Exists(TempFilePath))
+ {
+ File.Delete(TempFilePath);
+ }
+ }
+
public async Task LoadAsync()
{
if (Data != null)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 25774a2c0..f7459dc40 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -1,35 +1,64 @@
-using System.Collections.Concurrent;
+using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
+using System.Text.Json;
using System.Text.Json.Serialization;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Plugin;
namespace Flow.Launcher.Storage
{
- public class FlowLauncherJsonStorageTopMostRecord : ISavable
+ public class FlowLauncherJsonStorageTopMostRecord
{
private readonly FlowLauncherJsonStorage _topMostRecordStorage;
private readonly MultipleTopMostRecord _topMostRecord;
public FlowLauncherJsonStorageTopMostRecord()
{
+ // Get old data & new data
var topMostRecordStorage = new FlowLauncherJsonStorage();
- var exist = topMostRecordStorage.Exists();
- if (exist)
- {
- // Get old data
- var topMostRecord = topMostRecordStorage.Load();
+ _topMostRecordStorage = new FlowLauncherJsonStorage();
- // Convert to new data
- _topMostRecordStorage = new FlowLauncherJsonStorage();
+ // Check if data exist
+ var oldDataExist = topMostRecordStorage.Exists();
+ var newDataExist = _topMostRecordStorage.Exists();
+
+ // If new data exist, it means we have already migrated the old data
+ // So we can safely delete the old data and load the new data
+ if (newDataExist)
+ {
+ try
+ {
+ topMostRecordStorage.Delete();
+ }
+ catch
+ {
+ // Ignored
+ }
_topMostRecord = _topMostRecordStorage.Load();
- _topMostRecord.Add(topMostRecord);
}
+ // If new data does not exist and old data exist, we need to migrate the old data to the new data
+ else if (oldDataExist)
+ {
+ // Migrate old data to new data
+ _topMostRecord = _topMostRecordStorage.Load();
+ _topMostRecord.Add(topMostRecordStorage.Load());
+
+ // Delete old data and save the new data
+ try
+ {
+ topMostRecordStorage.Delete();
+ }
+ catch
+ {
+ // Ignored
+ }
+ Save();
+ }
+ // If both data do not exist, we just need to create a new data
else
{
- // Get new data
- _topMostRecordStorage = new FlowLauncherJsonStorage();
_topMostRecord = _topMostRecordStorage.Load();
}
}
@@ -109,6 +138,7 @@ namespace Flow.Launcher.Storage
public class MultipleTopMostRecord
{
[JsonInclude]
+ [JsonConverter(typeof(ConcurrentDictionaryConcurrentBagConverter))]
public ConcurrentDictionary> records { get; private set; } = new();
internal void Add(TopMostRecord topMostRecord)
@@ -207,6 +237,30 @@ namespace Flow.Launcher.Storage
}
}
+ public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>>
+ {
+ public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var dictionary = JsonSerializer.Deserialize>>(ref reader, options);
+ var concurrentDictionary = new ConcurrentDictionary>();
+ foreach (var kvp in dictionary)
+ {
+ concurrentDictionary.TryAdd(kvp.Key, new ConcurrentBag(kvp.Value));
+ }
+ return concurrentDictionary;
+ }
+
+ public override void Write(Utf8JsonWriter writer, ConcurrentDictionary> value, JsonSerializerOptions options)
+ {
+ var dict = new Dictionary>();
+ foreach (var kvp in value)
+ {
+ dict.Add(kvp.Key, kvp.Value.ToList());
+ }
+ JsonSerializer.Serialize(writer, dict, options);
+ }
+ }
+
public class Record
{
public string Title { get; init; }
From 845c331cac40301da43d107ae547c2818faaff29 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:16:16 +0800
Subject: [PATCH 0877/1442] Remove the bag from dictionary if the bag is empty
---
Flow.Launcher/Storage/TopMostRecord.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index f7459dc40..aaf7194e7 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -188,6 +188,12 @@ namespace Flow.Launcher.Storage
{
value.TryTake(out recordToRemove);
}
+
+ // if the bag is empty, remove the bag from the dictionary
+ if (value.IsEmpty)
+ {
+ records.TryRemove(result.OriginQuery.RawQuery, out _);
+ }
}
internal void AddOrUpdate(Result result)
From 07f44f23771e4ac21f5b837fcee66a884513a282 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:19:23 +0800
Subject: [PATCH 0878/1442] Add code comments
---
Flow.Launcher/Storage/TopMostRecord.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index aaf7194e7..d604eabc1 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -243,6 +243,9 @@ namespace Flow.Launcher.Storage
}
}
+ ///
+ /// Because ConcurrentBag does not support serialization, we need to convert it to a List
+ ///
public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>>
{
public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
From 0673d07c2a14a6595d4c495c1ab7b3fde3395782 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:23:22 +0800
Subject: [PATCH 0879/1442] Improve code comments & Make classes internal
---
Flow.Launcher/Storage/TopMostRecord.cs | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index d604eabc1..7c45bcf66 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -34,7 +34,7 @@ namespace Flow.Launcher.Storage
}
catch
{
- // Ignored
+ // Ignored - Flow will delete the old data during next startup
}
_topMostRecord = _topMostRecordStorage.Load();
}
@@ -52,7 +52,7 @@ namespace Flow.Launcher.Storage
}
catch
{
- // Ignored
+ // Ignored - Flow will delete the old data during next startup
}
Save();
}
@@ -84,7 +84,10 @@ namespace Flow.Launcher.Storage
}
}
- public class TopMostRecord
+ ///
+ /// Old data structure to support only one top most record for the same query
+ ///
+ internal class TopMostRecord
{
[JsonInclude]
public ConcurrentDictionary records { get; private set; } = new();
@@ -135,7 +138,10 @@ namespace Flow.Launcher.Storage
}
}
- public class MultipleTopMostRecord
+ ///
+ /// New data structure to support multiple top most records for the same query
+ ///
+ internal class MultipleTopMostRecord
{
[JsonInclude]
[JsonConverter(typeof(ConcurrentDictionaryConcurrentBagConverter))]
@@ -246,7 +252,7 @@ namespace Flow.Launcher.Storage
///
/// Because ConcurrentBag does not support serialization, we need to convert it to a List
///
- public class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>>
+ internal class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>>
{
public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
@@ -270,7 +276,7 @@ namespace Flow.Launcher.Storage
}
}
- public class Record
+ internal class Record
{
public string Title { get; init; }
public string SubTitle { get; init; }
From 4ecef470e82c07c611044db777675e5205bede6d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:33:24 +0800
Subject: [PATCH 0880/1442] Code quality
---
.../Storage/JsonStorage.cs | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
index db9ccc28a..c7eba05fd 100644
--- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
+++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
@@ -52,17 +52,12 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Delete()
{
- if (File.Exists(FilePath))
+ foreach (var path in new[] { FilePath, BackupFilePath, TempFilePath })
{
- File.Delete(FilePath);
- }
- if (File.Exists(BackupFilePath))
- {
- File.Delete(BackupFilePath);
- }
- if (File.Exists(TempFilePath))
- {
- File.Delete(TempFilePath);
+ if (File.Exists(path))
+ {
+ File.Delete(path);
+ }
}
}
From c49b3b7cba86ffadaec56e748751041f5e5c47c1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:42:54 +0800
Subject: [PATCH 0881/1442] Fix TryTake may remove the wrong element
---
Flow.Launcher/Storage/TopMostRecord.cs | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 7c45bcf66..0a9921f73 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -189,11 +189,8 @@ namespace Flow.Launcher.Storage
}
// remove the record from the bag
- var recordToRemove = value.FirstOrDefault(r => r.Equals(result));
- if (recordToRemove != null)
- {
- value.TryTake(out recordToRemove);
- }
+ var bag = new ConcurrentQueue(value.Where(r => !r.Equals(result)));
+ records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
// if the bag is empty, remove the bag from the dictionary
if (value.IsEmpty)
@@ -230,21 +227,9 @@ namespace Flow.Launcher.Storage
else
{
// add or update the record in the bag
- if (value.Any(r => r.Equals(result)))
- {
- // update the record
- var recordToUpdate = value.FirstOrDefault(r => r.Equals(result));
- if (recordToUpdate != null)
- {
- value.TryTake(out recordToUpdate);
- value.Add(record);
- }
- }
- else
- {
- // add the record
- value.Add(record);
- }
+ var bag = new ConcurrentQueue(value.Where(r => !r.Equals(result))); // make sure we don't have duplicates
+ bag.Enqueue(record);
+ records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
}
}
}
From 58b9f0c19cbff0fa202701dad68c875562829456 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 1 May 2025 13:47:35 +0800
Subject: [PATCH 0882/1442] Improve remove logic
---
Flow.Launcher/Storage/TopMostRecord.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 0a9921f73..47ebb4a95 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -190,13 +190,16 @@ namespace Flow.Launcher.Storage
// remove the record from the bag
var bag = new ConcurrentQueue(value.Where(r => !r.Equals(result)));
- records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
-
- // if the bag is empty, remove the bag from the dictionary
- if (value.IsEmpty)
+ if (bag.IsEmpty)
{
+ // if the bag is empty, remove the bag from the dictionary
records.TryRemove(result.OriginQuery.RawQuery, out _);
}
+ else
+ {
+ // change the bag in the dictionary
+ records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
+ }
}
internal void AddOrUpdate(Result result)
From 7103c8d24afa9e65e7a03a9c6721aa2eac787cc2 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 09:59:06 +0800
Subject: [PATCH 0883/1442] Mark old data as obsolete
---
Flow.Launcher/Storage/TopMostRecord.cs | 31 +++++++++++---------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 47ebb4a95..7ddca721b 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -16,8 +16,10 @@ namespace Flow.Launcher.Storage
public FlowLauncherJsonStorageTopMostRecord()
{
+#pragma warning disable CS0618 // Type or member is obsolete
// Get old data & new data
var topMostRecordStorage = new FlowLauncherJsonStorage();
+#pragma warning restore CS0618 // Type or member is obsolete
_topMostRecordStorage = new FlowLauncherJsonStorage();
// Check if data exist
@@ -43,7 +45,16 @@ namespace Flow.Launcher.Storage
{
// Migrate old data to new data
_topMostRecord = _topMostRecordStorage.Load();
- _topMostRecord.Add(topMostRecordStorage.Load());
+ var oldTopMostRecord = topMostRecordStorage.Load();
+ if (oldTopMostRecord == null || oldTopMostRecord.records.IsEmpty) return;
+ foreach (var record in oldTopMostRecord.records)
+ {
+ _topMostRecord.records.AddOrUpdate(record.Key, new ConcurrentBag { record.Value }, (key, oldValue) =>
+ {
+ oldValue.Add(record.Value);
+ return oldValue;
+ });
+ }
// Delete old data and save the new data
try
@@ -87,6 +98,7 @@ namespace Flow.Launcher.Storage
///
/// Old data structure to support only one top most record for the same query
///
+ [Obsolete("Use MultipleTopMostRecord instead. This class will be removed in future versions.")]
internal class TopMostRecord
{
[JsonInclude]
@@ -147,23 +159,6 @@ namespace Flow.Launcher.Storage
[JsonConverter(typeof(ConcurrentDictionaryConcurrentBagConverter))]
public ConcurrentDictionary> records { get; private set; } = new();
- internal void Add(TopMostRecord topMostRecord)
- {
- if (topMostRecord == null || topMostRecord.records.IsEmpty)
- {
- return;
- }
-
- foreach (var record in topMostRecord.records)
- {
- records.AddOrUpdate(record.Key, new ConcurrentBag { record.Value }, (key, oldValue) =>
- {
- oldValue.Add(record.Value);
- return oldValue;
- });
- }
- }
-
internal bool IsTopMost(Result result)
{
// origin query is null when user select the context menu item directly of one item from query list
From b25777b73457d872637ad594cad571d65fdea43c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 10:28:35 +0800
Subject: [PATCH 0884/1442] Use ConcurrentQueue to storage the data sequence &
Put latter record topper
---
Flow.Launcher/Storage/TopMostRecord.cs | 81 ++++++++++++++++--------
Flow.Launcher/ViewModel/MainViewModel.cs | 5 +-
2 files changed, 59 insertions(+), 27 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 7ddca721b..d75e9cb79 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -49,9 +49,11 @@ namespace Flow.Launcher.Storage
if (oldTopMostRecord == null || oldTopMostRecord.records.IsEmpty) return;
foreach (var record in oldTopMostRecord.records)
{
- _topMostRecord.records.AddOrUpdate(record.Key, new ConcurrentBag { record.Value }, (key, oldValue) =>
+ var newValue = new ConcurrentQueue();
+ newValue.Enqueue(record.Value);
+ _topMostRecord.records.AddOrUpdate(record.Key, newValue, (key, oldValue) =>
{
- oldValue.Add(record.Value);
+ oldValue.Enqueue(record.Value);
return oldValue;
});
}
@@ -84,6 +86,11 @@ namespace Flow.Launcher.Storage
return _topMostRecord.IsTopMost(result);
}
+ public int GetTopMostIndex(Result result)
+ {
+ return _topMostRecord.GetTopMostIndex(result);
+ }
+
public void Remove(Result result)
{
_topMostRecord.Remove(result);
@@ -156,8 +163,8 @@ namespace Flow.Launcher.Storage
internal class MultipleTopMostRecord
{
[JsonInclude]
- [JsonConverter(typeof(ConcurrentDictionaryConcurrentBagConverter))]
- public ConcurrentDictionary> records { get; private set; } = new();
+ [JsonConverter(typeof(ConcurrentDictionaryConcurrentQueueConverter))]
+ public ConcurrentDictionary> records { get; private set; } = new();
internal bool IsTopMost(Result result)
{
@@ -173,6 +180,32 @@ namespace Flow.Launcher.Storage
return value.Any(record => record.Equals(result));
}
+ internal int GetTopMostIndex(Result result)
+ {
+ // origin query is null when user select the context menu item directly of one item from query list
+ // in this case, we do not need to check if the result is top most
+ if (records.IsEmpty || result.OriginQuery == null ||
+ !records.TryGetValue(result.OriginQuery.RawQuery, out var value))
+ {
+ return -1;
+ }
+
+ // since this dictionary should be very small (or empty) going over it should be pretty fast.
+ // since the latter items should be more recent, we should return the smaller index for score to subtract
+ // which can make them more topmost
+ // A, B, C => 2, 1, 0 => (max - 2), (max - 1), (max - 0)
+ var index = 0;
+ foreach (var record in value)
+ {
+ if (record.Equals(result))
+ {
+ return value.Count - 1 - index;
+ }
+ index++;
+ }
+ return -1;
+ }
+
internal void Remove(Result result)
{
// origin query is null when user select the context menu item directly of one item from query list
@@ -183,17 +216,17 @@ namespace Flow.Launcher.Storage
return;
}
- // remove the record from the bag
- var bag = new ConcurrentQueue(value.Where(r => !r.Equals(result)));
- if (bag.IsEmpty)
+ // remove the record from the queue
+ var queue = new ConcurrentQueue(value.Where(r => !r.Equals(result)));
+ if (queue.IsEmpty)
{
- // if the bag is empty, remove the bag from the dictionary
+ // if the queue is empty, remove the queue from the dictionary
records.TryRemove(result.OriginQuery.RawQuery, out _);
}
else
{
- // change the bag in the dictionary
- records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
+ // change the queue in the dictionary
+ records[result.OriginQuery.RawQuery] = queue;
}
}
@@ -215,40 +248,38 @@ namespace Flow.Launcher.Storage
};
if (!records.TryGetValue(result.OriginQuery.RawQuery, out var value))
{
- // create a new bag if it does not exist
- value = new ConcurrentBag()
- {
- record
- };
+ // create a new queue if it does not exist
+ value = new ConcurrentQueue();
+ value.Enqueue(record);
records.TryAdd(result.OriginQuery.RawQuery, value);
}
else
{
- // add or update the record in the bag
- var bag = new ConcurrentQueue(value.Where(r => !r.Equals(result))); // make sure we don't have duplicates
- bag.Enqueue(record);
- records[result.OriginQuery.RawQuery] = new ConcurrentBag(bag);
+ // add or update the record in the queue
+ var queue = new ConcurrentQueue(value.Where(r => !r.Equals(result))); // make sure we don't have duplicates
+ queue.Enqueue(record);
+ records[result.OriginQuery.RawQuery] = queue;
}
}
}
///
- /// Because ConcurrentBag does not support serialization, we need to convert it to a List
+ /// Because ConcurrentQueue does not support serialization, we need to convert it to a List
///
- internal class ConcurrentDictionaryConcurrentBagConverter : JsonConverter>>
+ internal class ConcurrentDictionaryConcurrentQueueConverter : JsonConverter>>
{
- public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override ConcurrentDictionary> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var dictionary = JsonSerializer.Deserialize>>(ref reader, options);
- var concurrentDictionary = new ConcurrentDictionary>();
+ var concurrentDictionary = new ConcurrentDictionary>();
foreach (var kvp in dictionary)
{
- concurrentDictionary.TryAdd(kvp.Key, new ConcurrentBag(kvp.Value));
+ concurrentDictionary.TryAdd(kvp.Key, new ConcurrentQueue(kvp.Value));
}
return concurrentDictionary;
}
- public override void Write(Utf8JsonWriter writer, ConcurrentDictionary> value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, ConcurrentDictionary> value, JsonSerializerOptions options)
{
var dict = new Dictionary>();
foreach (var kvp in value)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 54ad6c288..adb04279e 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1643,9 +1643,10 @@ namespace Flow.Launcher.ViewModel
{
foreach (var result in metaResults.Results)
{
- if (_topMostRecord.IsTopMost(result))
+ var deviationIndex = _topMostRecord.GetTopMostIndex(result);
+ if (deviationIndex != -1)
{
- result.Score = Result.MaxScore;
+ result.Score = Result.MaxScore - deviationIndex;
}
else
{
From 1cf264a3a9c5d519482f5585e7fb54ad23ce9dfe Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 2 May 2025 10:32:24 +0800
Subject: [PATCH 0885/1442] Add code comments
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index adb04279e..96e039ebe 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1646,6 +1646,8 @@ namespace Flow.Launcher.ViewModel
var deviationIndex = _topMostRecord.GetTopMostIndex(result);
if (deviationIndex != -1)
{
+ // Adjust the score based on the result's position in the top-most list.
+ // A lower deviationIndex (closer to the top) results in a higher score.
result.Score = Result.MaxScore - deviationIndex;
}
else
From 8bb96d7f5866b5bf90dbf0224137144ccd91bd70 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 2 May 2025 12:26:14 +0800
Subject: [PATCH 0886/1442] Fix copy to clipboard STA thread issue & Support
retry for copy & Async build-in shortcut model & Fix build shortcuts text
replace issue & Fix startup window hide issue (#3314)
---
Flow.Launcher.Core/Plugin/QueryBuilder.cs | 6 +-
Flow.Launcher.Core/Resource/Theme.cs | 20 +-
.../NativeMethods.txt | 5 +-
.../UserSettings/CustomShortcutModel.cs | 67 ++++--
.../UserSettings/Settings.cs | 4 +-
Flow.Launcher.Infrastructure/Win32Helper.cs | 74 +++++++
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 5 +-
Flow.Launcher.Plugin/Query.cs | 7 +-
Flow.Launcher/App.xaml.cs | 9 +-
Flow.Launcher/Helper/DataWebRequestFactory.cs | 12 +-
Flow.Launcher/Helper/ErrorReporting.cs | 18 +-
Flow.Launcher/Languages/en.xaml | 1 +
Flow.Launcher/MainWindow.xaml.cs | 4 -
Flow.Launcher/PublicAPIInstance.cs | 88 ++++++--
.../SettingsPanePluginStoreViewModel.cs | 4 +-
.../SettingsPanePluginsViewModel.cs | 33 ++-
.../Views/SettingsPanePlugins.xaml | 9 +-
.../Views/SettingsPanePlugins.xaml.cs | 31 ++-
Flow.Launcher/ViewModel/MainViewModel.cs | 207 ++++++++++++------
19 files changed, 444 insertions(+), 160 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
index 3dc7877ac..0ef3f30f5 100644
--- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs
+++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using Flow.Launcher.Plugin;
@@ -33,7 +33,7 @@ namespace Flow.Launcher.Core.Plugin
searchTerms = terms;
}
- return new Query ()
+ return new Query()
{
Search = search,
RawQuery = rawQuery,
@@ -42,4 +42,4 @@ namespace Flow.Launcher.Core.Plugin
};
}
}
-}
\ No newline at end of file
+}
diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs
index a46932c6a..059359694 100644
--- a/Flow.Launcher.Core/Resource/Theme.cs
+++ b/Flow.Launcher.Core/Resource/Theme.cs
@@ -76,7 +76,7 @@ namespace Flow.Launcher.Core.Resource
{
_api.LogError(ClassName, "Current theme resource not found. Initializing with default theme.");
_oldTheme = Constant.DefaultTheme;
- };
+ }
}
#endregion
@@ -126,7 +126,7 @@ namespace Flow.Launcher.Core.Resource
// Load a ResourceDictionary for the specified theme.
var themeName = _settings.Theme;
var dict = GetThemeResourceDictionary(themeName);
-
+
// Apply font settings to the theme resource.
ApplyFontSettings(dict);
UpdateResourceDictionary(dict);
@@ -152,11 +152,11 @@ namespace Flow.Launcher.Core.Resource
var fontStyle = FontHelper.GetFontStyleFromInvariantStringOrNormal(_settings.QueryBoxFontStyle);
var fontWeight = FontHelper.GetFontWeightFromInvariantStringOrNormal(_settings.QueryBoxFontWeight);
var fontStretch = FontHelper.GetFontStretchFromInvariantStringOrNormal(_settings.QueryBoxFontStretch);
-
+
SetFontProperties(queryBoxStyle, fontFamily, fontStyle, fontWeight, fontStretch, true);
SetFontProperties(querySuggestionBoxStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
}
-
+
if (dict["ItemTitleStyle"] is Style resultItemStyle &&
dict["ItemTitleSelectedStyle"] is Style resultItemSelectedStyle &&
dict["ItemHotkeyStyle"] is Style resultHotkeyItemStyle &&
@@ -172,7 +172,7 @@ namespace Flow.Launcher.Core.Resource
SetFontProperties(resultHotkeyItemStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
SetFontProperties(resultHotkeyItemSelectedStyle, fontFamily, fontStyle, fontWeight, fontStretch, false);
}
-
+
if (dict["ItemSubTitleStyle"] is Style resultSubItemStyle &&
dict["ItemSubTitleSelectedStyle"] is Style resultSubItemSelectedStyle)
{
@@ -197,7 +197,7 @@ namespace Flow.Launcher.Core.Resource
// First, find the setters to remove and store them in a list
var settersToRemove = style.Setters
.OfType()
- .Where(setter =>
+ .Where(setter =>
setter.Property == Control.FontFamilyProperty ||
setter.Property == Control.FontStyleProperty ||
setter.Property == Control.FontWeightProperty ||
@@ -227,18 +227,18 @@ namespace Flow.Launcher.Core.Resource
{
var settersToRemove = style.Setters
.OfType()
- .Where(setter =>
+ .Where(setter =>
setter.Property == TextBlock.FontFamilyProperty ||
setter.Property == TextBlock.FontStyleProperty ||
setter.Property == TextBlock.FontWeightProperty ||
setter.Property == TextBlock.FontStretchProperty)
.ToList();
-
+
foreach (var setter in settersToRemove)
{
style.Setters.Remove(setter);
}
-
+
style.Setters.Add(new Setter(TextBlock.FontFamilyProperty, fontFamily));
style.Setters.Add(new Setter(TextBlock.FontStyleProperty, fontStyle));
style.Setters.Add(new Setter(TextBlock.FontWeightProperty, fontWeight));
@@ -421,7 +421,7 @@ namespace Flow.Launcher.Core.Resource
// Retrieve theme resource – always use the resource with font settings applied.
var resourceDict = GetResourceDictionary(theme);
-
+
UpdateResourceDictionary(resourceDict);
_settings.Theme = theme;
diff --git a/Flow.Launcher.Infrastructure/NativeMethods.txt b/Flow.Launcher.Infrastructure/NativeMethods.txt
index 18b206022..0e50420b0 100644
--- a/Flow.Launcher.Infrastructure/NativeMethods.txt
+++ b/Flow.Launcher.Infrastructure/NativeMethods.txt
@@ -43,6 +43,9 @@ MONITORINFOEXW
WM_ENTERSIZEMOVE
WM_EXITSIZEMOVE
+OleInitialize
+OleUninitialize
+
GetKeyboardLayout
GetWindowThreadProcessId
ActivateKeyboardLayout
@@ -53,4 +56,4 @@ INPUTLANGCHANGE_FORWARD
LOCALE_TRANSIENT_KEYBOARD1
LOCALE_TRANSIENT_KEYBOARD2
LOCALE_TRANSIENT_KEYBOARD3
-LOCALE_TRANSIENT_KEYBOARD4
\ No newline at end of file
+LOCALE_TRANSIENT_KEYBOARD4
diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs
index 71020369a..2d15b54c5 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs
@@ -1,15 +1,15 @@
using System;
using System.Text.Json.Serialization;
+using System.Threading.Tasks;
namespace Flow.Launcher.Infrastructure.UserSettings
{
+ #region Base
+
public abstract class ShortcutBaseModel
{
public string Key { get; set; }
- [JsonIgnore]
- public Func Expand { get; set; } = () => { return ""; };
-
public override bool Equals(object obj)
{
return obj is ShortcutBaseModel other &&
@@ -22,16 +22,14 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
- public class CustomShortcutModel : ShortcutBaseModel
+ public class BaseCustomShortcutModel : ShortcutBaseModel
{
public string Value { get; set; }
- [JsonConstructorAttribute]
- public CustomShortcutModel(string key, string value)
+ public BaseCustomShortcutModel(string key, string value)
{
Key = key;
Value = value;
- Expand = () => { return Value; };
}
public void Deconstruct(out string key, out string value)
@@ -40,26 +38,69 @@ namespace Flow.Launcher.Infrastructure.UserSettings
value = Value;
}
- public static implicit operator (string Key, string Value)(CustomShortcutModel shortcut)
+ public static implicit operator (string Key, string Value)(BaseCustomShortcutModel shortcut)
{
return (shortcut.Key, shortcut.Value);
}
- public static implicit operator CustomShortcutModel((string Key, string Value) shortcut)
+ public static implicit operator BaseCustomShortcutModel((string Key, string Value) shortcut)
{
- return new CustomShortcutModel(shortcut.Key, shortcut.Value);
+ return new BaseCustomShortcutModel(shortcut.Key, shortcut.Value);
}
}
- public class BuiltinShortcutModel : ShortcutBaseModel
+ public class BaseBuiltinShortcutModel : ShortcutBaseModel
{
public string Description { get; set; }
- public BuiltinShortcutModel(string key, string description, Func expand)
+ public BaseBuiltinShortcutModel(string key, string description)
{
Key = key;
Description = description;
- Expand = expand ?? (() => { return ""; });
}
}
+
+ #endregion
+
+ #region Custom Shortcut
+
+ public class CustomShortcutModel : BaseCustomShortcutModel
+ {
+ [JsonIgnore]
+ public Func Expand { get; set; } = () => { return string.Empty; };
+
+ [JsonConstructor]
+ public CustomShortcutModel(string key, string value) : base(key, value)
+ {
+ Expand = () => { return Value; };
+ }
+ }
+
+ #endregion
+
+ #region Builtin Shortcut
+
+ public class BuiltinShortcutModel : BaseBuiltinShortcutModel
+ {
+ [JsonIgnore]
+ public Func Expand { get; set; } = () => { return string.Empty; };
+
+ public BuiltinShortcutModel(string key, string description, Func expand) : base(key, description)
+ {
+ Expand = expand ?? (() => { return string.Empty; });
+ }
+ }
+
+ public class AsyncBuiltinShortcutModel : BaseBuiltinShortcutModel
+ {
+ [JsonIgnore]
+ public Func> ExpandAsync { get; set; } = () => { return Task.FromResult(string.Empty); };
+
+ public AsyncBuiltinShortcutModel(string key, string description, Func> expandAsync) : base(key, description)
+ {
+ ExpandAsync = expandAsync ?? (() => { return Task.FromResult(string.Empty); });
+ }
+ }
+
+ #endregion
}
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 1cccc38d9..b7a1d1f63 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -312,9 +312,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public ObservableCollection CustomShortcuts { get; set; } = new ObservableCollection();
[JsonIgnore]
- public ObservableCollection BuiltinShortcuts { get; set; } = new()
+ public ObservableCollection BuiltinShortcuts { get; set; } = new()
{
- new BuiltinShortcutModel("{clipboard}", "shortcut_clipboard_description", Clipboard.GetText),
+ new AsyncBuiltinShortcutModel("{clipboard}", "shortcut_clipboard_description", () => Win32Helper.StartSTATaskAsync(Clipboard.GetText)),
new BuiltinShortcutModel("{active_explorer_path}", "shortcut_active_explorer_path", FileExplorerHelper.GetActiveExplorerPath)
};
diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs
index 2788060eb..783ade14e 100644
--- a/Flow.Launcher.Infrastructure/Win32Helper.cs
+++ b/Flow.Launcher.Infrastructure/Win32Helper.cs
@@ -5,6 +5,8 @@ using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Markup;
@@ -337,6 +339,78 @@ namespace Flow.Launcher.Infrastructure
#endregion
+ #region STA Thread
+
+ /*
+ Inspired by https://github.com/files-community/Files code on STA Thread handling.
+ */
+
+ public static Task StartSTATaskAsync(Action action)
+ {
+ var taskCompletionSource = new TaskCompletionSource();
+ Thread thread = new(() =>
+ {
+ PInvoke.OleInitialize();
+
+ try
+ {
+ action();
+ taskCompletionSource.SetResult();
+ }
+ catch (System.Exception ex)
+ {
+ taskCompletionSource.SetException(ex);
+ }
+ finally
+ {
+ PInvoke.OleUninitialize();
+ }
+ })
+ {
+ IsBackground = true,
+ Priority = ThreadPriority.Normal
+ };
+
+ thread.SetApartmentState(ApartmentState.STA);
+ thread.Start();
+
+ return taskCompletionSource.Task;
+ }
+
+ public static Task StartSTATaskAsync(Func func)
+ {
+ var taskCompletionSource = new TaskCompletionSource();
+
+ Thread thread = new(() =>
+ {
+ PInvoke.OleInitialize();
+
+ try
+ {
+ taskCompletionSource.SetResult(func());
+ }
+ catch (System.Exception ex)
+ {
+ taskCompletionSource.SetException(ex);
+ }
+ finally
+ {
+ PInvoke.OleUninitialize();
+ }
+ })
+ {
+ IsBackground = true,
+ Priority = ThreadPriority.Normal
+ };
+
+ thread.SetApartmentState(ApartmentState.STA);
+ thread.Start();
+
+ return taskCompletionSource.Task;
+ }
+
+ #endregion
+
#region Keyboard Layout
private const string UserProfileRegistryPath = @"Control Panel\International\User Profile";
diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
index 31580fbe8..d4eb02a90 100644
--- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
@@ -471,8 +471,11 @@ namespace Flow.Launcher.Plugin
public Task UpdatePluginManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default);
///
- /// Get the plugin manifest
+ /// Get the plugin manifest.
///
+ ///
+ /// If Flow cannot get manifest data, this could be null
+ ///
///
public IReadOnlyList GetPluginManifest();
diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs
index 913dc31ae..c3eede4c6 100644
--- a/Flow.Launcher.Plugin/Query.cs
+++ b/Flow.Launcher.Plugin/Query.cs
@@ -8,7 +8,8 @@ namespace Flow.Launcher.Plugin
public class Query
{
///
- /// Raw query, this includes action keyword if it has
+ /// Raw query, this includes action keyword if it has.
+ /// It has handled buildin custom query shortkeys and build-in shortcuts, and it trims the whitespace.
/// We didn't recommend use this property directly. You should always use Search property.
///
public string RawQuery { get; internal init; }
@@ -63,10 +64,10 @@ namespace Flow.Launcher.Plugin
///
[JsonIgnore]
public string FirstSearch => SplitSearch(0);
-
+
[JsonIgnore]
private string _secondToEndSearch;
-
+
///
/// strings from second search (including) to last search
///
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 1b57d5cbe..402812a92 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -23,6 +23,7 @@ using Flow.Launcher.SettingPages.ViewModels;
using Flow.Launcher.ViewModel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
+using Microsoft.VisualStudio.Threading;
namespace Flow.Launcher
{
@@ -198,6 +199,10 @@ namespace Flow.Launcher
Current.MainWindow = _mainWindow;
Current.MainWindow.Title = Constant.FlowLauncher;
+ // Initialize hotkey mapper instantly after main window is created because
+ // it will steal focus from main window which causes window hide
+ HotKeyMapper.Initialize();
+
// Main windows needs initialized before theme change because of blur settings
Ioc.Default.GetRequiredService().ChangeTheme();
@@ -239,6 +244,7 @@ namespace Flow.Launcher
}
}
+ [Conditional("RELEASE")]
private void AutoUpdates()
{
_ = Task.Run(async () =>
@@ -296,13 +302,12 @@ namespace Flow.Launcher
[Conditional("RELEASE")]
private static void RegisterAppDomainExceptions()
{
- AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
+ AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledException;
}
///
/// Let exception throw as normal is better for Debug
///
- [Conditional("RELEASE")]
private static void RegisterTaskSchedulerUnhandledException()
{
TaskScheduler.UnobservedTaskException += ErrorReporting.TaskSchedulerUnobservedTaskException;
diff --git a/Flow.Launcher/Helper/DataWebRequestFactory.cs b/Flow.Launcher/Helper/DataWebRequestFactory.cs
index 2e72ee240..db198ede4 100644
--- a/Flow.Launcher/Helper/DataWebRequestFactory.cs
+++ b/Flow.Launcher/Helper/DataWebRequestFactory.cs
@@ -28,18 +28,18 @@ public class DataWebRequestFactory : IWebRequestCreate
public DataWebResponse(Uri uri)
{
- string uriString = uri.AbsoluteUri;
+ var uriString = uri.AbsoluteUri;
- int commaIndex = uriString.IndexOf(',');
- var headers = uriString.Substring(0, commaIndex).Split(';');
+ var commaIndex = uriString.IndexOf(',');
+ var headers = uriString[..commaIndex].Split(';');
_contentType = headers[0];
- string dataString = uriString.Substring(commaIndex + 1);
+ var dataString = uriString[(commaIndex + 1)..];
_data = Convert.FromBase64String(dataString);
}
public override string ContentType
{
- get { return _contentType; }
+ get => _contentType;
set
{
throw new NotSupportedException();
@@ -48,7 +48,7 @@ public class DataWebRequestFactory : IWebRequestCreate
public override long ContentLength
{
- get { return _data.Length; }
+ get => _data.Length;
set
{
throw new NotSupportedException();
diff --git a/Flow.Launcher/Helper/ErrorReporting.cs b/Flow.Launcher/Helper/ErrorReporting.cs
index b1ddba717..aa810ba65 100644
--- a/Flow.Launcher/Helper/ErrorReporting.cs
+++ b/Flow.Launcher/Helper/ErrorReporting.cs
@@ -1,4 +1,5 @@
using System;
+using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
@@ -10,33 +11,34 @@ namespace Flow.Launcher.Helper;
public static class ErrorReporting
{
- private static void Report(Exception e)
+ private static void Report(Exception e, [CallerMemberName] string methodName = "UnHandledException")
{
- var logger = LogManager.GetLogger("UnHandledException");
+ var logger = LogManager.GetLogger(methodName);
logger.Fatal(ExceptionFormatter.FormatExcpetion(e));
var reportWindow = new ReportWindow(e);
reportWindow.Show();
}
- public static void UnhandledExceptionHandle(object sender, UnhandledExceptionEventArgs e)
+ public static void UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- //handle non-ui thread exceptions
+ // handle non-ui thread exceptions
Report((Exception)e.ExceptionObject);
}
public static void DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
- //handle ui thread exceptions
+ // handle ui thread exceptions
Report(e.Exception);
- //prevent application exist, so the user can copy prompted error info
+ // prevent application exist, so the user can copy prompted error info
e.Handled = true;
}
public static void TaskSchedulerUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
{
- //handle unobserved task exceptions
+ // handle unobserved task exceptions on UI thread
Application.Current.Dispatcher.Invoke(() => Report(e.Exception));
- //prevent application exit, so the user can copy the prompted error info
+ // prevent application exit, so the user can copy the prompted error info
+ e.SetObserved();
}
public static string RuntimeInfo()
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index d3252cb31..ca0ed33b5 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -394,6 +394,7 @@
This new Action Keyword is the same as old, please choose a different oneSuccessCompleted successfully
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 10aff050e..ae7b098a2 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -16,7 +16,6 @@ using System.Windows.Threading;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Core.Resource;
-using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Image;
@@ -182,9 +181,6 @@ namespace Flow.Launcher
// Set the initial state of the QueryTextBoxCursorMovedToEnd property
// Without this part, when shown for the first time, switching the context menu does not move the cursor to the end.
_viewModel.QueryTextCursorMovedToEnd = false;
-
- // Initialize hotkey mapper after window is loaded
- HotKeyMapper.Initialize();
// View model property changed event
_viewModel.PropertyChanged += (o, e) =>
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 3abc57b8a..5b8e8c9af 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -40,7 +40,7 @@ namespace Flow.Launcher
private readonly Settings _settings;
private readonly MainViewModel _mainVM;
- // Must use getter to access Application.Current.Resources.MergedDictionaries so earlier
+ // Must use getter to avoid accessing Application.Current.Resources.MergedDictionaries so earlier in theme constructor
private Theme _theme;
private Theme Theme => _theme ??= Ioc.Default.GetRequiredService();
@@ -69,8 +69,7 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query, requery);
}
-#pragma warning disable VSTHRD100 // Avoid async void methods
-
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
public async void RestartApp()
{
_mainVM.Hide();
@@ -89,8 +88,6 @@ namespace Flow.Launcher
UpdateManager.RestartApp(Constant.ApplicationFileName);
}
-#pragma warning restore VSTHRD100 // Avoid async void methods
-
public void ShowMainWindow() => _mainVM.Show();
public void HideMainWindow() => _mainVM.Hide();
@@ -145,37 +142,92 @@ namespace Flow.Launcher
ShellCommand.Execute(startInfo);
}
- public void CopyToClipboard(string stringToCopy, bool directCopy = false, bool showDefaultNotification = true)
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
+ public async void CopyToClipboard(string stringToCopy, bool directCopy = false, bool showDefaultNotification = true)
{
if (string.IsNullOrEmpty(stringToCopy))
+ {
return;
+ }
var isFile = File.Exists(stringToCopy);
if (directCopy && (isFile || Directory.Exists(stringToCopy)))
{
- var paths = new StringCollection
+ // Sometimes the clipboard is locked and cannot be accessed,
+ // we need to retry a few times before giving up
+ var exception = await RetryActionOnSTAThreadAsync(() =>
+ {
+ var paths = new StringCollection
{
stringToCopy
};
- Clipboard.SetFileDropList(paths);
-
- if (showDefaultNotification)
- ShowMsg(
- $"{GetTranslation("copy")} {(isFile ? GetTranslation("fileTitle") : GetTranslation("folderTitle"))}",
- GetTranslation("completedSuccessfully"));
+ Clipboard.SetFileDropList(paths);
+ });
+
+ if (exception == null)
+ {
+ if (showDefaultNotification)
+ {
+ ShowMsg(
+ $"{GetTranslation("copy")} {(isFile ? GetTranslation("fileTitle") : GetTranslation("folderTitle"))}",
+ GetTranslation("completedSuccessfully"));
+ }
+ }
+ else
+ {
+ LogException(nameof(PublicAPIInstance), "Failed to copy file/folder to clipboard", exception);
+ ShowMsgError(GetTranslation("failedToCopy"));
+ }
}
else
{
- Clipboard.SetDataObject(stringToCopy);
+ // Sometimes the clipboard is locked and cannot be accessed,
+ // we need to retry a few times before giving up
+ var exception = await RetryActionOnSTAThreadAsync(() =>
+ {
+ // We should use SetText instead of SetDataObject to avoid the clipboard being locked by other applications
+ Clipboard.SetText(stringToCopy);
+ });
- if (showDefaultNotification)
- ShowMsg(
- $"{GetTranslation("copy")} {GetTranslation("textTitle")}",
- GetTranslation("completedSuccessfully"));
+ if (exception == null)
+ {
+ if (showDefaultNotification)
+ {
+ ShowMsg(
+ $"{GetTranslation("copy")} {GetTranslation("textTitle")}",
+ GetTranslation("completedSuccessfully"));
+ }
+ }
+ else
+ {
+ LogException(nameof(PublicAPIInstance), "Failed to copy text to clipboard", exception);
+ ShowMsgError(GetTranslation("failedToCopy"));
+ }
}
}
+ private static async Task RetryActionOnSTAThreadAsync(Action action, int retryCount = 6, int retryDelay = 150)
+ {
+ for (var i = 0; i < retryCount; i++)
+ {
+ try
+ {
+ await Win32Helper.StartSTATaskAsync(action).ConfigureAwait(false);
+ break;
+ }
+ catch (Exception e)
+ {
+ if (i == retryCount - 1)
+ {
+ return e;
+ }
+ await Task.Delay(retryDelay);
+ }
+ }
+ return null;
+ }
+
public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible;
public void StopLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Collapsed;
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
index 249e4dd42..07df0682d 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
@@ -79,8 +79,8 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
}
}
- public IList ExternalPlugins =>
- App.API.GetPluginManifest()?.Select(p => new PluginStoreItemViewModel(p))
+ public IList ExternalPlugins => App.API.GetPluginManifest()?
+ .Select(p => new PluginStoreItemViewModel(p))
.OrderByDescending(p => p.Category == PluginStoreItemViewModel.NewRelease)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.RecentlyUpdated)
.ThenByDescending(p => p.Category == PluginStoreItemViewModel.None)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
index de7cf15c3..abb314355 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs
@@ -86,12 +86,22 @@ public partial class SettingsPanePluginsViewModel : BaseModel
UpdateEnumDropdownLocalizations();
}
- public string FilterText { get; set; } = string.Empty;
+ private string filterText = string.Empty;
+ public string FilterText
+ {
+ get => filterText;
+ set
+ {
+ if (filterText != value)
+ {
+ filterText = value;
+ OnPropertyChanged();
+ }
+ }
+ }
- public PluginViewModel? SelectedPlugin { get; set; }
-
- private IEnumerable? _pluginViewModels;
- private IEnumerable PluginViewModels => _pluginViewModels ??= PluginManager.AllPlugins
+ private IList? _pluginViewModels;
+ public IList PluginViewModels => _pluginViewModels ??= PluginManager.AllPlugins
.OrderBy(plugin => plugin.Metadata.Disabled)
.ThenBy(plugin => plugin.Metadata.Name)
.Select(plugin => new PluginViewModel
@@ -102,13 +112,12 @@ public partial class SettingsPanePluginsViewModel : BaseModel
.Where(plugin => plugin.PluginSettingsObject != null)
.ToList();
- public List FilteredPluginViewModels => PluginViewModels
- .Where(v =>
- string.IsNullOrEmpty(FilterText) ||
- App.API.FuzzySearch(FilterText, v.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet() ||
- App.API.FuzzySearch(FilterText, v.PluginPair.Metadata.Description).IsSearchPrecisionScoreMet()
- )
- .ToList();
+ public bool SatisfiesFilter(PluginViewModel plugin)
+ {
+ return string.IsNullOrEmpty(FilterText) ||
+ App.API.FuzzySearch(FilterText, plugin.PluginPair.Metadata.Name).IsSearchPrecisionScoreMet() ||
+ App.API.FuzzySearch(FilterText, plugin.PluginPair.Metadata.Description).IsSearchPrecisionScoreMet();
+ }
[RelayCommand]
private async Task OpenHelperAsync(Button button)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
index bb742f800..52d77f914 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
@@ -15,6 +15,12 @@
FocusManager.FocusedElement="{Binding ElementName=PluginFilterTextbox}"
KeyDown="SettingsPanePlugins_OnKeyDown"
mc:Ignorable="d">
+
+
+
@@ -115,10 +121,9 @@
Background="{DynamicResource Color01B}"
FontSize="14"
ItemContainerStyle="{StaticResource PluginList}"
- ItemsSource="{Binding FilteredPluginViewModels}"
+ ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- SelectedItem="{Binding SelectedPlugin}"
SnapsToDevicePixels="True"
Style="{DynamicResource PluginListStyle}"
VirtualizingPanel.ScrollUnit="Pixel"
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
index 97574b3ce..e9490804a 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
@@ -1,7 +1,10 @@
-using System.Windows.Input;
+using System.ComponentModel;
+using System.Windows.Data;
+using System.Windows.Input;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
@@ -17,12 +20,38 @@ public partial class SettingsPanePlugins
DataContext = _viewModel;
InitializeComponent();
}
+ _viewModel.PropertyChanged += ViewModel_PropertyChanged;
base.OnNavigatedTo(e);
}
+ private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == nameof(SettingsPanePluginsViewModel.FilterText))
+ {
+ ((CollectionViewSource)FindResource("PluginCollectionView")).View.Refresh();
+ }
+ }
+
+ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
+ {
+ _viewModel.PropertyChanged -= ViewModel_PropertyChanged;
+ base.OnNavigatingFrom(e);
+ }
+
private void SettingsPanePlugins_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key is not Key.F || Keyboard.Modifiers is not ModifierKeys.Control) return;
PluginFilterTextbox.Focus();
}
+
+ private void PluginCollectionView_OnFilter(object sender, FilterEventArgs e)
+ {
+ if (e.Item is not PluginViewModel plugin)
+ {
+ e.Accepted = false;
+ return;
+ }
+
+ e.Accepted = _viewModel.SatisfiesFilter(plugin);
+ }
}
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 00675149b..2f1ed0f51 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -43,8 +43,7 @@ namespace Flow.Launcher.ViewModel
private readonly UserSelectedRecord _userSelectedRecord;
private readonly TopMostRecord _topMostRecord;
- private CancellationTokenSource _updateSource;
- private CancellationToken _updateToken;
+ private CancellationTokenSource _updateSource; // Used to cancel old query flows
private ChannelWriter _resultsUpdateChannelWriter;
private Task _resultsViewUpdateTask;
@@ -241,7 +240,7 @@ namespace Flow.Launcher.ViewModel
return;
}
- var token = e.Token == default ? _updateToken : e.Token;
+ var token = e.Token == default ? _updateSource.Token : e.Token;
// make a clone to avoid possible issue that plugin will also change the list and items when updating view model
var resultsCopy = DeepCloneResults(e.Results, token);
@@ -255,8 +254,11 @@ namespace Flow.Launcher.ViewModel
}
PluginManager.UpdatePluginMetadata(resultsCopy, pair.Metadata, e.Query);
- if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
- token)))
+
+ if (token.IsCancellationRequested) return;
+
+ if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
+ token)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
@@ -640,7 +642,31 @@ namespace Flow.Launcher.ViewModel
/// Force query even when Query Text doesn't change
public void ChangeQueryText(string queryText, bool isReQuery = false)
{
- _ = ChangeQueryTextAsync(queryText, isReQuery);
+ // Must check access so that we will not block the UI thread which causes window visibility issue
+ if (!Application.Current.Dispatcher.CheckAccess())
+ {
+ Application.Current.Dispatcher.Invoke(() => ChangeQueryText(queryText, isReQuery));
+ return;
+ }
+
+ if (QueryText != queryText)
+ {
+ // Change query text first
+ QueryText = queryText;
+ // When we are changing query from codes, we should not delay the query
+ Query(false, isReQuery: false);
+
+ // set to false so the subsequent set true triggers
+ // PropertyChanged and MoveQueryTextToEnd is called
+ QueryTextCursorMovedToEnd = false;
+ }
+ else if (isReQuery)
+ {
+ // When we are re-querying, we should not delay the query
+ Query(false, isReQuery: true);
+ }
+
+ QueryTextCursorMovedToEnd = true;
}
///
@@ -648,10 +674,10 @@ namespace Flow.Launcher.ViewModel
///
private async Task ChangeQueryTextAsync(string queryText, bool isReQuery = false)
{
- // Must check access so that we will not block the UI thread which cause window visibility issue
+ // Must check access so that we will not block the UI thread which causes window visibility issue
if (!Application.Current.Dispatcher.CheckAccess())
{
- await Application.Current.Dispatcher.InvokeAsync(() => ChangeQueryText(queryText, isReQuery));
+ await Application.Current.Dispatcher.InvokeAsync(() => ChangeQueryTextAsync(queryText, isReQuery));
return;
}
@@ -1050,7 +1076,18 @@ namespace Flow.Launcher.ViewModel
public void Query(bool searchDelay, bool isReQuery = false)
{
- _ = QueryAsync(searchDelay, isReQuery);
+ if (QueryResultsSelected())
+ {
+ _ = QueryResultsAsync(searchDelay, isReQuery);
+ }
+ else if (ContextMenuSelected())
+ {
+ QueryContextMenu();
+ }
+ else if (HistorySelected())
+ {
+ QueryHistory();
+ }
}
private async Task QueryAsync(bool searchDelay, bool isReQuery = false)
@@ -1160,20 +1197,45 @@ namespace Flow.Launcher.ViewModel
{
_updateSource?.Cancel();
- var query = ConstructQuery(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
+ var query = await ConstructQueryAsync(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
- var plugins = PluginManager.ValidPluginsForQuery(query);
-
- if (query == null || plugins.Count == 0) // shortcut expanded
+ if (query == null) // shortcut expanded
{
- Results.Clear();
+ // Hide and clear results again because running query may show and add some results
Results.Visibility = Visibility.Collapsed;
+ Results.Clear();
+
+ // Reset plugin icon
PluginIconPath = null;
PluginIconSource = null;
SearchIconVisibility = Visibility.Visible;
+
+ // Hide progress bar again because running query may set this to visible
+ ProgressBarVisibility = Visibility.Hidden;
return;
}
- else if (plugins.Count == 1)
+
+ _updateSource = new CancellationTokenSource();
+
+ ProgressBarVisibility = Visibility.Hidden;
+ _isQueryRunning = true;
+
+ // Switch to ThreadPool thread
+ await TaskScheduler.Default;
+
+ if (_updateSource.Token.IsCancellationRequested) return;
+
+ // Update the query's IsReQuery property to true if this is a re-query
+ query.IsReQuery = isReQuery;
+
+ // handle the exclusiveness of plugin using action keyword
+ RemoveOldQueryResults(query);
+
+ _lastQuery = query;
+
+ var plugins = PluginManager.ValidPluginsForQuery(query);
+
+ if (plugins.Count == 1)
{
PluginIconPath = plugins.Single().Metadata.IcoPath;
PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
@@ -1186,42 +1248,20 @@ namespace Flow.Launcher.ViewModel
SearchIconVisibility = Visibility.Visible;
}
- _updateSource?.Dispose();
-
- var currentUpdateSource = new CancellationTokenSource();
- _updateSource = currentUpdateSource;
- _updateToken = _updateSource.Token;
-
- ProgressBarVisibility = Visibility.Hidden;
- _isQueryRunning = true;
-
- // Switch to ThreadPool thread
- await TaskScheduler.Default;
-
- if (_updateSource.Token.IsCancellationRequested)
- return;
-
- // Update the query's IsReQuery property to true if this is a re-query
- query.IsReQuery = isReQuery;
-
- // handle the exclusiveness of plugin using action keyword
- RemoveOldQueryResults(query);
-
- _lastQuery = query;
-
- if (string.IsNullOrEmpty(query.ActionKeyword))
+ // Do not wait for performance improvement
+ /*if (string.IsNullOrEmpty(query.ActionKeyword))
{
// Wait 15 millisecond for query change in global query
// if query changes, return so that it won't be calculated
await Task.Delay(15, _updateSource.Token);
if (_updateSource.Token.IsCancellationRequested)
return;
- }
+ }*/
_ = Task.Delay(200, _updateSource.Token).ContinueWith(_ =>
{
// start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
- if (!_updateSource.Token.IsCancellationRequested && _isQueryRunning)
+ if (_isQueryRunning)
{
ProgressBarVisibility = Visibility.Visible;
}
@@ -1248,12 +1288,12 @@ namespace Flow.Launcher.ViewModel
// nothing to do here
}
- if (_updateSource.Token.IsCancellationRequested)
- return;
+ if (_updateSource.Token.IsCancellationRequested) return;
// this should happen once after all queries are done so progress bar should continue
// until the end of all querying
_isQueryRunning = false;
+
if (!_updateSource.Token.IsCancellationRequested)
{
// update to hidden if this is still the current query
@@ -1269,8 +1309,7 @@ namespace Flow.Launcher.ViewModel
await Task.Delay(searchDelayTime, token);
- if (token.IsCancellationRequested)
- return;
+ if (token.IsCancellationRequested) return;
}
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
@@ -1279,8 +1318,7 @@ namespace Flow.Launcher.ViewModel
var results = await PluginManager.QueryForPluginAsync(plugin, query, token);
- if (token.IsCancellationRequested)
- return;
+ if (token.IsCancellationRequested) return;
IReadOnlyList resultsCopy;
if (results == null)
@@ -1301,6 +1339,8 @@ namespace Flow.Launcher.ViewModel
}
}
+ if (token.IsCancellationRequested) return;
+
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
token, reSelect)))
{
@@ -1309,16 +1349,16 @@ namespace Flow.Launcher.ViewModel
}
}
- private Query ConstructQuery(string queryText, IEnumerable customShortcuts,
- IEnumerable builtInShortcuts)
+ private async Task ConstructQueryAsync(string queryText, IEnumerable customShortcuts,
+ IEnumerable builtInShortcuts)
{
if (string.IsNullOrWhiteSpace(queryText))
{
return null;
}
- StringBuilder queryBuilder = new(queryText);
- StringBuilder queryBuilderTmp = new(queryText);
+ var queryBuilder = new StringBuilder(queryText);
+ var queryBuilderTmp = new StringBuilder(queryText);
// Sorting order is important here, the reason is for matching longest shortcut by default
foreach (var shortcut in customShortcuts.OrderByDescending(x => x.Key.Length))
@@ -1331,36 +1371,56 @@ namespace Flow.Launcher.ViewModel
queryBuilder.Replace('@' + shortcut.Key, shortcut.Expand());
}
- string customExpanded = queryBuilder.ToString();
+ // Applying builtin shortcuts
+ await BuildQueryAsync(builtInShortcuts, queryBuilder, queryBuilderTmp);
- Application.Current.Dispatcher.Invoke(() =>
+ return QueryBuilder.Build(queryBuilder.ToString().Trim(), PluginManager.NonGlobalPlugins);
+ }
+
+ private async Task BuildQueryAsync(IEnumerable builtInShortcuts,
+ StringBuilder queryBuilder, StringBuilder queryBuilderTmp)
+ {
+ var customExpanded = queryBuilder.ToString();
+
+ var queryChanged = false;
+
+ foreach (var shortcut in builtInShortcuts)
{
- foreach (var shortcut in builtInShortcuts)
+ try
{
- try
+ if (customExpanded.Contains(shortcut.Key))
{
- if (customExpanded.Contains(shortcut.Key))
+ string expansion;
+ if (shortcut is BuiltinShortcutModel syncShortcut)
{
- var expansion = shortcut.Expand();
- queryBuilder.Replace(shortcut.Key, expansion);
- queryBuilderTmp.Replace(shortcut.Key, expansion);
+ expansion = syncShortcut.Expand();
}
- }
- catch (Exception e)
- {
- App.API.LogException(ClassName,
- $"Error when expanding shortcut {shortcut.Key}",
- e);
+ else if (shortcut is AsyncBuiltinShortcutModel asyncShortcut)
+ {
+ expansion = await asyncShortcut.ExpandAsync();
+ }
+ else
+ {
+ continue;
+ }
+ queryBuilder.Replace(shortcut.Key, expansion);
+ queryBuilderTmp.Replace(shortcut.Key, expansion);
+ queryChanged = true;
}
}
- });
+ catch (Exception e)
+ {
+ App.API.LogException(ClassName, $"Error when expanding shortcut {shortcut.Key}", e);
+ }
+ }
- // show expanded builtin shortcuts
- // use private field to avoid infinite recursion
- _queryText = queryBuilderTmp.ToString();
-
- var query = QueryBuilder.Build(queryBuilder.ToString().Trim(), PluginManager.NonGlobalPlugins);
- return query;
+ if (queryChanged)
+ {
+ // show expanded builtin shortcuts
+ // use private field to avoid infinite recursion
+ _queryText = queryBuilderTmp.ToString();
+ OnPropertyChanged(nameof(QueryText));
+ }
}
private void RemoveOldQueryResults(Query query)
@@ -1489,6 +1549,9 @@ namespace Flow.Launcher.ViewModel
public void Show()
{
+ // When application is exiting, we should not show the main window
+ if (App.Exiting) return;
+
// When application is exiting, the Application.Current will be null
Application.Current?.Dispatcher.Invoke(() =>
{
From 62e1252ac4a01aff2f2244182092887373282f87 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 14:37:10 +0800
Subject: [PATCH 0887/1442] Use BackToQueryResults for code quality
---
Flow.Launcher/ViewModel/MainViewModel.cs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 2f1ed0f51..2526adef8 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1170,7 +1170,7 @@ namespace Flow.Launcher.ViewModel
OriginQuery = new Query { RawQuery = h.Query },
Action = _ =>
{
- SelectedResults = Results;
+ App.API.BackToQueryResults();
App.API.ChangeQuery(h.Query);
return false;
}
@@ -1600,10 +1600,7 @@ namespace Flow.Launcher.ViewModel
await CloseExternalPreviewAsync();
}
- if (!QueryResultsSelected())
- {
- SelectedResults = Results;
- }
+ BackToQueryResults();
switch (Settings.LastQueryMode)
{
From b1197858de49abc6c4583085b6124c462f82cfd0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 14:40:18 +0800
Subject: [PATCH 0888/1442] Do not query when back from the context menu
---
Flow.Launcher/ViewModel/MainViewModel.cs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 2526adef8..f0513c7d9 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -34,6 +34,7 @@ namespace Flow.Launcher.ViewModel
private bool _isQueryRunning;
private Query _lastQuery;
private string _queryTextBeforeLeaveResults;
+ private string _ignoredQueryText = null;
private readonly FlowLauncherJsonStorage _historyItemsStorage;
private readonly FlowLauncherJsonStorage _userSelectedRecordStorage;
@@ -730,6 +731,9 @@ namespace Flow.Launcher.ViewModel
if (isReturningFromContextMenu)
{
_queryText = _queryTextBeforeLeaveResults;
+ // When executing OnPropertyChanged, QueryTextBox_TextChanged1 and Query will be called
+ // So we need to ignore it so that we will not call Query again
+ _ignoredQueryText = _queryText;
OnPropertyChanged(nameof(QueryText));
QueryTextCursorMovedToEnd = true;
}
@@ -1076,6 +1080,20 @@ namespace Flow.Launcher.ViewModel
public void Query(bool searchDelay, bool isReQuery = false)
{
+ if (_ignoredQueryText != null)
+ {
+ if (_ignoredQueryText == QueryText)
+ {
+ _ignoredQueryText = null;
+ return;
+ }
+ else
+ {
+ // If _ignoredQueryText does not match current QueryText, we should still execute Query
+ _ignoredQueryText = null;
+ }
+ }
+
if (QueryResultsSelected())
{
_ = QueryResultsAsync(searchDelay, isReQuery);
From f935d5f078dc414b72375cfa5d01e28e75033a24 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 15:06:20 +0800
Subject: [PATCH 0889/1442] Improve code comments
---
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index f0513c7d9..607b70fd2 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1432,10 +1432,10 @@ namespace Flow.Launcher.ViewModel
}
}
+ // Show expanded builtin shortcuts
if (queryChanged)
{
- // show expanded builtin shortcuts
- // use private field to avoid infinite recursion
+ // Use private field to avoid infinite recursion
_queryText = queryBuilderTmp.ToString();
OnPropertyChanged(nameof(QueryText));
}
From 247272c9aa7a986395a14beab3d6a5b2e22e4b75 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 2 May 2025 15:21:17 +0800
Subject: [PATCH 0890/1442] Do not query when expanding builtin shortcuts
---
Flow.Launcher/ViewModel/MainViewModel.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 607b70fd2..c505c32a3 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1437,6 +1437,9 @@ namespace Flow.Launcher.ViewModel
{
// Use private field to avoid infinite recursion
_queryText = queryBuilderTmp.ToString();
+ // When executing OnPropertyChanged, QueryTextBox_TextChanged1 and Query will be called
+ // So we need to ignore it so that we will not call Query again
+ _ignoredQueryText = _queryText;
OnPropertyChanged(nameof(QueryText));
}
}
From aa0f9b2e73c550964475f4b0e2454c3c5728ecb7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 08:58:40 +0800
Subject: [PATCH 0891/1442] Update name
---
.../{IAsyncEmptyQuery.cs => IAsyncHomeQuery.cs} | 6 +++---
.../Interfaces/{IEmptyQuery.cs => IHomeQuery.cs} | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
rename Flow.Launcher.Plugin/Interfaces/{IAsyncEmptyQuery.cs => IAsyncHomeQuery.cs} (79%)
rename Flow.Launcher.Plugin/Interfaces/{IEmptyQuery.cs => IHomeQuery.cs} (72%)
diff --git a/Flow.Launcher.Plugin/Interfaces/IAsyncEmptyQuery.cs b/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
similarity index 79%
rename from Flow.Launcher.Plugin/Interfaces/IAsyncEmptyQuery.cs
rename to Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
index a18f0848d..f7a820f18 100644
--- a/Flow.Launcher.Plugin/Interfaces/IAsyncEmptyQuery.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
@@ -7,17 +7,17 @@ namespace Flow.Launcher.Plugin
///
/// Asynchronous Query Model for Flow Launcher When Query Text is Empty
///
- public interface IAsyncEmptyQuery
+ public interface IAsyncHomeQuery
{
///
/// Asynchronous Querying When Query Text is Empty
///
///
/// If the Querying method requires high IO transmission
- /// or performing CPU intense jobs (performing better with cancellation), please use this IAsyncEmptyQuery interface
+ /// or performing CPU intense jobs (performing better with cancellation), please use this IAsyncHomeQuery interface
///
/// Cancel when querying job is obsolete
///
- Task> EmptyQueryAsync(CancellationToken token);
+ Task> HomeQueryAsync(CancellationToken token);
}
}
diff --git a/Flow.Launcher.Plugin/Interfaces/IEmptyQuery.cs b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
similarity index 72%
rename from Flow.Launcher.Plugin/Interfaces/IEmptyQuery.cs
rename to Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
index 4ebdcf1fd..f3c9cfcad 100644
--- a/Flow.Launcher.Plugin/Interfaces/IEmptyQuery.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
@@ -8,10 +8,10 @@ namespace Flow.Launcher.Plugin
/// Synchronous Query Model for Flow Launcher When Query Text is Empty
///
/// If the Querying method requires high IO transmission
- /// or performaing CPU intense jobs (performing better with cancellation), please try the IAsyncEmptyQuery interface
+ /// or performaing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface
///
///
- public interface IEmptyQuery : IAsyncEmptyQuery
+ public interface IHomeQuery : IAsyncHomeQuery
{
///
/// Querying When Query Text is Empty
@@ -21,8 +21,8 @@ namespace Flow.Launcher.Plugin
///
///
///
- List EmptyQuery();
+ List HomeQuery();
- Task> IAsyncEmptyQuery.EmptyQueryAsync(CancellationToken token) => Task.Run(EmptyQuery);
+ Task> IAsyncHomeQuery.HomeQueryAsync(CancellationToken token) => Task.Run(HomeQuery);
}
}
From 3089928599fca94487b21dbeff5fa35609e43463 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 16:31:49 +0800
Subject: [PATCH 0892/1442] Support home query interface
---
.../Main.cs | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
index 05e8d960f..48717816b 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs
@@ -3,21 +3,33 @@ using System.Linq;
namespace Flow.Launcher.Plugin.PluginIndicator
{
- public class Main : IPlugin, IPluginI18n
+ public class Main : IPlugin, IPluginI18n, IHomeQuery
{
internal PluginInitContext Context { get; private set; }
public List Query(Query query)
+ {
+ return QueryResults(query);
+ }
+
+ public List HomeQuery()
+ {
+ return QueryResults();
+ }
+
+ private List QueryResults(Query query = null)
{
var nonGlobalPlugins = GetNonGlobalPlugins();
+ var querySearch = query?.Search ?? string.Empty;
+
var results =
from keyword in nonGlobalPlugins.Keys
let plugin = nonGlobalPlugins[keyword].Metadata
- let keywordSearchResult = Context.API.FuzzySearch(query.Search, keyword)
- let searchResult = keywordSearchResult.IsSearchPrecisionScoreMet() ? keywordSearchResult : Context.API.FuzzySearch(query.Search, plugin.Name)
+ let keywordSearchResult = Context.API.FuzzySearch(querySearch, keyword)
+ let searchResult = keywordSearchResult.IsSearchPrecisionScoreMet() ? keywordSearchResult : Context.API.FuzzySearch(querySearch, plugin.Name)
let score = searchResult.Score
where (searchResult.IsSearchPrecisionScoreMet()
- || string.IsNullOrEmpty(query.Search)) // To list all available action keywords
+ || string.IsNullOrEmpty(querySearch)) // To list all available action keywords
&& !plugin.Disabled
select new Result
{
From 0f09fea30b28526d72088e9c6603dfacf614e725 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 16:32:07 +0800
Subject: [PATCH 0893/1442] Make async home query to be feature interface
---
Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs b/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
index f7a820f18..78d6454ae 100644
--- a/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IAsyncHomeQuery.cs
@@ -7,7 +7,7 @@ namespace Flow.Launcher.Plugin
///
/// Asynchronous Query Model for Flow Launcher When Query Text is Empty
///
- public interface IAsyncHomeQuery
+ public interface IAsyncHomeQuery : IFeatures
{
///
/// Asynchronous Querying When Query Text is Empty
From 17a0834bcda4ba856179543f152a04c987ff9c1c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 16:50:50 +0800
Subject: [PATCH 0894/1442] Support query for plugins with home query interface
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 51 ++++++++++++++
.../UserSettings/Settings.cs | 5 ++
Flow.Launcher.Plugin/Result.cs | 3 +
Flow.Launcher/ViewModel/MainViewModel.cs | 68 ++++++++++++-------
4 files changed, 104 insertions(+), 23 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 72303c8b7..b0f896214 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -25,6 +25,7 @@ namespace Flow.Launcher.Core.Plugin
private static readonly string ClassName = nameof(PluginManager);
private static IEnumerable _contextMenuPlugins;
+ private static IEnumerable _homePlugins;
public static List AllPlugins { get; private set; }
public static readonly HashSet GlobalPlugins = new();
@@ -227,6 +228,8 @@ namespace Flow.Launcher.Core.Plugin
await Task.WhenAll(InitTasks);
_contextMenuPlugins = GetPluginsForInterface();
+ _homePlugins = GetPluginsForInterface();
+
foreach (var plugin in AllPlugins)
{
// set distinct on each plugin's action keywords helps only firing global(*) and action keywords once where a plugin
@@ -274,6 +277,14 @@ namespace Flow.Launcher.Core.Plugin
};
}
+ public static ICollection ValidPluginsForHomeQuery(Query query)
+ {
+ if (query is not null)
+ return Array.Empty();
+
+ return _homePlugins.ToList();
+ }
+
public static async Task> QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token)
{
var results = new List();
@@ -318,6 +329,36 @@ namespace Flow.Launcher.Core.Plugin
return results;
}
+ public static async Task> QueryHomeForPluginAsync(PluginPair pair, CancellationToken token)
+ {
+ var results = new List();
+ var metadata = pair.Metadata;
+
+ try
+ {
+ var milliseconds = await API.StopwatchLogDebugAsync(ClassName, $"Cost for {metadata.Name}",
+ async () => results = await ((IAsyncHomeQuery)pair.Plugin).HomeQueryAsync(token).ConfigureAwait(false));
+
+ token.ThrowIfCancellationRequested();
+ if (results == null)
+ return null;
+ UpdatePluginMetadata(results, metadata);
+
+ token.ThrowIfCancellationRequested();
+ }
+ catch (OperationCanceledException)
+ {
+ // null will be fine since the results will only be added into queue if the token hasn't been cancelled
+ return null;
+ }
+ catch (Exception e)
+ {
+ API.LogException(ClassName, $"Failed to query home for plugin: {metadata.Name}", e);
+ return null;
+ }
+ return results;
+ }
+
public static void UpdatePluginMetadata(IReadOnlyList results, PluginMetadata metadata, Query query)
{
foreach (var r in results)
@@ -333,6 +374,16 @@ namespace Flow.Launcher.Core.Plugin
}
}
+ private static void UpdatePluginMetadata(IReadOnlyList results, PluginMetadata metadata)
+ {
+ foreach (var r in results)
+ {
+ r.PluginDirectory = metadata.PluginDirectory;
+ r.PluginID = metadata.ID;
+ r.OriginQuery = null;
+ }
+ }
+
///
/// get specified plugin, return null if not found
///
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index b7a1d1f63..2b5fc6bc0 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -158,6 +158,11 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
}
+
+ public bool ShowHomeQuery { get; set; } = true;
+ public bool ShowHistoryRecordsForHomeQuery { get; set; } = false;
+ public int HistoryRecordsCountForHomeQuery { get; set; } = 5;
+
public int CustomExplorerIndex { get; set; } = 0;
[JsonIgnore]
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index f0fcd48ff..060c03317 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -174,6 +174,9 @@ namespace Flow.Launcher.Plugin
///
/// Query information associated with the result
///
+ ///
+ /// If the query is for home query, this will be null
+ ///
internal Query OriginQuery { get; set; }
///
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 2f1ed0f51..b5afe4b7e 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1198,21 +1198,31 @@ namespace Flow.Launcher.ViewModel
_updateSource?.Cancel();
var query = await ConstructQueryAsync(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
+ var homeQuery = query == null;
+ ICollection plugins = Array.Empty();
if (query == null) // shortcut expanded
{
- // Hide and clear results again because running query may show and add some results
- Results.Visibility = Visibility.Collapsed;
- Results.Clear();
+ if (Settings.ShowHomeQuery)
+ {
+ plugins = PluginManager.ValidPluginsForHomeQuery(query);
+ }
+
+ if (plugins.Count == 0)
+ {
+ // Hide and clear results again because running query may show and add some results
+ Results.Visibility = Visibility.Collapsed;
+ Results.Clear();
- // Reset plugin icon
- PluginIconPath = null;
- PluginIconSource = null;
- SearchIconVisibility = Visibility.Visible;
+ // Reset plugin icon
+ PluginIconPath = null;
+ PluginIconSource = null;
+ SearchIconVisibility = Visibility.Visible;
- // Hide progress bar again because running query may set this to visible
- ProgressBarVisibility = Visibility.Hidden;
- return;
+ // Hide progress bar again because running query may set this to visible
+ ProgressBarVisibility = Visibility.Hidden;
+ return;
+ }
}
_updateSource = new CancellationTokenSource();
@@ -1226,27 +1236,37 @@ namespace Flow.Launcher.ViewModel
if (_updateSource.Token.IsCancellationRequested) return;
// Update the query's IsReQuery property to true if this is a re-query
- query.IsReQuery = isReQuery;
+ if (!homeQuery) query.IsReQuery = isReQuery;
// handle the exclusiveness of plugin using action keyword
RemoveOldQueryResults(query);
_lastQuery = query;
- var plugins = PluginManager.ValidPluginsForQuery(query);
-
- if (plugins.Count == 1)
- {
- PluginIconPath = plugins.Single().Metadata.IcoPath;
- PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
- SearchIconVisibility = Visibility.Hidden;
- }
- else
+ if (homeQuery)
{
+ // Do not show plugin icon if this is a home query
PluginIconPath = null;
PluginIconSource = null;
SearchIconVisibility = Visibility.Visible;
}
+ else
+ {
+ plugins = PluginManager.ValidPluginsForQuery(query);
+
+ if (plugins.Count == 1)
+ {
+ PluginIconPath = plugins.Single().Metadata.IcoPath;
+ PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
+ SearchIconVisibility = Visibility.Hidden;
+ }
+ else
+ {
+ PluginIconPath = null;
+ PluginIconSource = null;
+ SearchIconVisibility = Visibility.Visible;
+ }
+ }
// Do not wait for performance improvement
/*if (string.IsNullOrEmpty(query.ActionKeyword))
@@ -1303,7 +1323,7 @@ namespace Flow.Launcher.ViewModel
// Local function
async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
{
- if (searchDelay)
+ if (searchDelay && !homeQuery) // Do not delay for home query
{
var searchDelayTime = plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime;
@@ -1316,7 +1336,9 @@ namespace Flow.Launcher.ViewModel
// Task.Yield will force it to run in ThreadPool
await Task.Yield();
- var results = await PluginManager.QueryForPluginAsync(plugin, query, token);
+ var results = homeQuery ?
+ await PluginManager.QueryHomeForPluginAsync(plugin, token) :
+ await PluginManager.QueryForPluginAsync(plugin, query, token);
if (token.IsCancellationRequested) return;
@@ -1616,7 +1638,7 @@ namespace Flow.Launcher.ViewModel
break;
case LastQueryMode.ActionKeywordPreserved:
case LastQueryMode.ActionKeywordSelected:
- var newQuery = _lastQuery.ActionKeyword;
+ var newQuery = _lastQuery?.ActionKeyword;
if (!string.IsNullOrEmpty(newQuery))
newQuery += " ";
From 54994ddb7b264c51452e13dac7f7306b9fc44f41 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 17:02:39 +0800
Subject: [PATCH 0895/1442] Initialize home query when window is loaded
---
Flow.Launcher/MainWindow.xaml.cs | 3 +++
Flow.Launcher/ViewModel/MainViewModel.cs | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index ae7b098a2..546f32cc5 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -292,6 +292,9 @@ namespace Flow.Launcher
DependencyPropertyDescriptor
.FromProperty(VisibilityProperty, typeof(StackPanel))
.AddValueChanged(History, (s, e) => UpdateClockPanelVisibility());
+
+ // Initialize query state
+ _viewModel.InitializeQuery();
}
private async void OnClosing(object sender, CancelEventArgs e)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index b5afe4b7e..8244d5765 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1074,6 +1074,14 @@ namespace Flow.Launcher.ViewModel
#region Query
+ public void InitializeQuery()
+ {
+ if (Settings.ShowHomeQuery)
+ {
+ _ = QueryResultsAsync(false);
+ }
+ }
+
public void Query(bool searchDelay, bool isReQuery = false)
{
if (QueryResultsSelected())
From e9ef26a8dde26530f21e0ce244c0e03e9cf8d60b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 18:17:00 +0800
Subject: [PATCH 0896/1442] Change related setting names
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 6 +++---
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 2b5fc6bc0..b630a4ecc 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -159,9 +159,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
- public bool ShowHomeQuery { get; set; } = true;
- public bool ShowHistoryRecordsForHomeQuery { get; set; } = false;
- public int HistoryRecordsCountForHomeQuery { get; set; } = 5;
+ public bool ShowHomePage { get; set; } = true;
+ public bool ShowHistoryResultsForHomePage { get; set; } = false;
+ public int MaxHistoryResultsToShowForHomePage { get; set; } = 5;
public int CustomExplorerIndex { get; set; } = 0;
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 8244d5765..06cce3026 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1076,7 +1076,7 @@ namespace Flow.Launcher.ViewModel
public void InitializeQuery()
{
- if (Settings.ShowHomeQuery)
+ if (Settings.ShowHomePage)
{
_ = QueryResultsAsync(false);
}
@@ -1211,7 +1211,7 @@ namespace Flow.Launcher.ViewModel
if (query == null) // shortcut expanded
{
- if (Settings.ShowHomeQuery)
+ if (Settings.ShowHomePage)
{
plugins = PluginManager.ValidPluginsForHomeQuery(query);
}
From e8333331b0a348c9ba2eceb995943faea21130d0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 18:17:07 +0800
Subject: [PATCH 0897/1442] Add ui in general page
---
Flow.Launcher/Languages/en.xaml | 4 ++
.../SettingsPaneGeneralViewModel.cs | 15 +++++-
.../Views/SettingsPaneGeneral.xaml | 51 +++++++++++++++----
3 files changed, 57 insertions(+), 13 deletions(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index ca0ed33b5..af718946d 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -126,6 +126,10 @@
OpenUse Previous Korean IMEYou can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home PageSearch Plugin
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 1a887c4b7..840269b03 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -154,11 +154,22 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
Settings.SearchDelayTime = value;
OnPropertyChanged();
- OnPropertyChanged(nameof(SearchDelayTimeDisplay));
}
}
}
- public string SearchDelayTimeDisplay => $"{SearchDelayTimeValue}ms";
+
+ public int MaxHistoryResultsToShowValue
+ {
+ get => Settings.MaxHistoryResultsToShowForHomePage;
+ set
+ {
+ if (Settings.MaxHistoryResultsToShowForHomePage != value)
+ {
+ Settings.MaxHistoryResultsToShowForHomePage = value;
+ OnPropertyChanged();
+ }
+ }
+ }
private void UpdateEnumDropdownLocalizations()
{
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index d45d28d8b..c0c5613de 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -217,17 +217,46 @@
Title="{DynamicResource searchDelayTime}"
Sub="{DynamicResource searchDelayTimeToolTip}"
Type="InsideFit">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From d6704ed5da47077b0751176d0e3185fb77ef320b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 22:09:25 +0800
Subject: [PATCH 0898/1442] Support history items
---
Flow.Launcher/ViewModel/MainViewModel.cs | 81 ++++++++++++++++++++++--
1 file changed, 77 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 06cce3026..d850e0f7c 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -50,6 +50,12 @@ namespace Flow.Launcher.ViewModel
private readonly IReadOnlyList _emptyResult = new List();
+ private readonly PluginMetadata _historyMetadata = new()
+ {
+ ID = "298303A65D128A845D28A7B83B3968C2",
+ Priority = 0
+ };
+
#endregion
#region Constructor
@@ -1300,11 +1306,30 @@ namespace Flow.Launcher.ViewModel
// plugins are ICollection, meaning LINQ will get the Count and preallocate Array
- var tasks = plugins.Select(plugin => plugin.Metadata.Disabled switch
+ Task[] tasks;
+ if (homeQuery)
{
- false => QueryTaskAsync(plugin, _updateSource.Token),
- true => Task.CompletedTask
- }).ToArray();
+ var homeTasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
+ {
+ false => QueryTaskAsync(plugin, _updateSource.Token),
+ true => Task.CompletedTask
+ }).ToList();
+
+ if (Settings.ShowHistoryResultsForHomePage)
+ {
+ homeTasks.Add(QueryHistoryTaskAsync());
+ }
+
+ tasks = homeTasks.ToArray();
+ }
+ else
+ {
+ tasks = plugins.Select(plugin => plugin.Metadata.Disabled switch
+ {
+ false => QueryTaskAsync(plugin, _updateSource.Token),
+ true => Task.CompletedTask
+ }).ToArray();
+ }
try
{
@@ -1377,6 +1402,54 @@ namespace Flow.Launcher.ViewModel
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
}
+
+ async Task QueryHistoryTaskAsync()
+ {
+ // Since it is wrapped within a ThreadPool Thread, the synchronous context is null
+ // Task.Yield will force it to run in ThreadPool
+ await Task.Yield();
+
+ // Select last history results and revert its order to make sure last history results are on top
+ var lastHistoryResults = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
+
+ var historyResults = new List();
+ foreach (var h in lastHistoryResults)
+ {
+ var title = App.API.GetTranslation("executeQuery");
+ var time = App.API.GetTranslation("lastExecuteTime");
+ var result = new Result
+ {
+ Title = string.Format(title, h.Query),
+ SubTitle = string.Format(time, h.ExecutedDateTime),
+ IcoPath = "Images\\history.png",
+ Preview = new Result.PreviewInfo
+ {
+ PreviewImagePath = Constant.HistoryIcon,
+ Description = string.Format(time, h.ExecutedDateTime)
+ },
+ OriginQuery = new Query { RawQuery = h.Query },
+ Action = _ =>
+ {
+ SelectedResults = Results;
+ App.API.ChangeQuery(h.Query);
+ return false;
+ }
+ };
+ historyResults.Add(result);
+ }
+
+ // No need to make copy of results and update badge ico property
+
+ if (_updateSource.Token.IsCancellationRequested) return;
+
+ if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(historyResults, _historyMetadata, query,
+ _updateSource.Token)))
+ {
+ App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
+ }
+
+ await Task.CompletedTask;
+ }
}
private async Task ConstructQueryAsync(string queryText, IEnumerable customShortcuts,
From f2f4ebf0ac641eb1feafdb7f0f8feccabbd6d283 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 22:34:58 +0800
Subject: [PATCH 0899/1442] Support home state change & Add ui
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 6 +++
.../UserSettings/PluginSettings.cs | 3 ++
Flow.Launcher.Plugin/PluginMetadata.cs | 5 +++
Flow.Launcher/Languages/en.xaml | 6 +++
.../Controls/InstalledPluginDisplay.xaml | 11 +++++-
.../SettingsPanePluginsViewModel.cs | 38 ++++++++++++++++++-
Flow.Launcher/ViewModel/PluginViewModel.cs | 11 ++++++
7 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index b0f896214..caa3fd00b 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -221,6 +221,7 @@ namespace Flow.Launcher.Core.Plugin
{
API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
pair.Metadata.Disabled = true;
+ pair.Metadata.HomeDisabled = true;
failedPlugins.Enqueue(pair);
}
}));
@@ -429,6 +430,11 @@ namespace Flow.Launcher.Core.Plugin
return results;
}
+ public static bool IsHomePlugin(string id)
+ {
+ return _homePlugins.Any(p => p.Metadata.ID == id);
+ }
+
public static bool ActionKeywordRegistered(string actionKeyword)
{
// this method is only checking for action keywords (defined as not '*') registration
diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
index 7fb9b895a..837d0ebb6 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
@@ -67,6 +67,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
metadata.Disabled = settings.Disabled;
metadata.Priority = settings.Priority;
metadata.SearchDelayTime = settings.SearchDelayTime;
+ metadata.HomeDisabled = settings.HomeDiabled;
}
else
{
@@ -79,6 +80,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
DefaultActionKeywords = metadata.ActionKeywords, // metadata provides default values
ActionKeywords = metadata.ActionKeywords, // use default value
Disabled = metadata.Disabled,
+ HomeDiabled = metadata.HomeDisabled,
Priority = metadata.Priority,
DefaultSearchDelayTime = metadata.SearchDelayTime, // metadata provides default values
SearchDelayTime = metadata.SearchDelayTime, // use default value
@@ -128,5 +130,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// Used only to save the state of the plugin in settings
///
public bool Disabled { get; set; }
+ public bool HomeDiabled { get; set; }
}
}
diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs
index da10bc6a5..09803cbd7 100644
--- a/Flow.Launcher.Plugin/PluginMetadata.cs
+++ b/Flow.Launcher.Plugin/PluginMetadata.cs
@@ -50,6 +50,11 @@ namespace Flow.Launcher.Plugin
///
public bool Disabled { get; set; }
+ ///
+ /// Whether plugin is disabled in home query.
+ ///
+ public bool HomeDisabled { get; set; }
+
///
/// Plugin execute file path.
///
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index af718946d..22ab2016c 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -130,6 +130,7 @@
Show home page results when query text is empty.Show History Results in Home PageMaximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -152,6 +153,7 @@
EnabledPrioritySearch Delay
+ Home PageCurrent PriorityNew PriorityPriority
@@ -405,6 +407,10 @@
Search Delay Time SettingInput the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.
+
Custom Query HotkeyPress a custom hotkey to open Flow Launcher and input the specified query automatically.
diff --git a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
index 619da22dc..0842a64f3 100644
--- a/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
+++ b/Flow.Launcher/Resources/Controls/InstalledPluginDisplay.xaml
@@ -100,10 +100,19 @@
ToolTipService.InitialShowDelay="0"
ToolTipService.ShowOnDisabled="True"
Value="{Binding PluginSearchDelayTime, Mode=TwoWay}" />
-
+
+
_isHomeOnOffSelected;
+ set
+ {
+ if (_isHomeOnOffSelected != value)
+ {
+ _isHomeOnOffSelected = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
public SettingsPanePluginsViewModel(Settings settings)
{
_settings = settings;
@@ -152,6 +166,18 @@ public partial class SettingsPanePluginsViewModel : BaseModel
{
Text = (string)Application.Current.Resources["searchDelayTimeTips"],
TextWrapping = TextWrapping.Wrap
+ },
+ new TextBlock
+ {
+ Text = (string)Application.Current.Resources["homeTitle"],
+ FontSize = 18,
+ Margin = new Thickness(0, 24, 0, 10),
+ TextWrapping = TextWrapping.Wrap
+ },
+ new TextBlock
+ {
+ Text = (string)Application.Current.Resources["homeTips"],
+ TextWrapping = TextWrapping.Wrap
}
}
},
@@ -176,16 +202,25 @@ public partial class SettingsPanePluginsViewModel : BaseModel
IsOnOffSelected = false;
IsPrioritySelected = true;
IsSearchDelaySelected = false;
+ IsHomeOnOffSelected = false;
break;
case DisplayMode.SearchDelay:
IsOnOffSelected = false;
IsPrioritySelected = false;
IsSearchDelaySelected = true;
+ IsHomeOnOffSelected = false;
+ break;
+ case DisplayMode.HomeOnOff:
+ IsOnOffSelected = false;
+ IsPrioritySelected = false;
+ IsSearchDelaySelected = false;
+ IsHomeOnOffSelected = true;
break;
default:
IsOnOffSelected = true;
IsPrioritySelected = false;
IsSearchDelaySelected = false;
+ IsHomeOnOffSelected = false;
break;
}
}
@@ -195,5 +230,6 @@ public enum DisplayMode
{
OnOff,
Priority,
- SearchDelay
+ SearchDelay,
+ HomeOnOff
}
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 64a7f3db8..092896019 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -75,6 +75,16 @@ namespace Flow.Launcher.ViewModel
}
}
+ public bool PluginHomeState
+ {
+ get => !PluginPair.Metadata.HomeDisabled;
+ set
+ {
+ PluginPair.Metadata.HomeDisabled = !value;
+ PluginSettingsObject.HomeDiabled = !value;
+ }
+ }
+
public bool IsExpanded
{
get => _isExpanded;
@@ -154,6 +164,7 @@ namespace Flow.Launcher.ViewModel
public Infrastructure.UserSettings.Plugin PluginSettingsObject{ get; init; }
public bool SearchDelayEnabled => Settings.SearchQueryResultsWithDelay;
public string DefaultSearchDelay => Settings.SearchDelayTime.ToString();
+ public bool HomeEnabled => Settings.ShowHomePage && PluginManager.IsHomePlugin(PluginPair.Metadata.ID);
public void OnActionKeywordsTextChanged()
{
From 96bb62af27932df8e0afab3940ffc97cda28d349 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sat, 3 May 2025 22:54:46 +0800
Subject: [PATCH 0900/1442] Refresh interface when Home Page is changed
---
.../UserSettings/Settings.cs | 15 ++++++++++++++-
Flow.Launcher/MainWindow.xaml.cs | 16 +++++++++++++++-
Flow.Launcher/ViewModel/MainViewModel.cs | 7 ++-----
Flow.Launcher/ViewModel/PluginViewModel.cs | 3 +++
4 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index b630a4ecc..34bf4f90e 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -159,7 +159,20 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
- public bool ShowHomePage { get; set; } = true;
+ private bool _showHomePage { get; set; } = true;
+ public bool ShowHomePage
+ {
+ get => _showHomePage;
+ set
+ {
+ if (_showHomePage != value)
+ {
+ _showHomePage = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
public bool ShowHistoryResultsForHomePage { get; set; } = false;
public int MaxHistoryResultsToShowForHomePage { get; set; } = 5;
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 546f32cc5..6dcd8d22d 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -277,6 +277,17 @@ namespace Flow.Launcher
case nameof(Settings.SettingWindowFont):
InitializeContextMenu();
break;
+ case nameof(Settings.ShowHomePage):
+ // We should refresh results when these two settings are changed but we cannot do that
+ // Because the order of the results will change, making the interface look weird
+ // So we would better refresh results when query text is changed next time
+ /*case nameof(Settings.ShowHistoryResultsForHomePage):
+ case nameof(Settings.MaxHistoryResultsToShowForHomePage):*/
+ if (string.IsNullOrEmpty(_viewModel.QueryText))
+ {
+ _viewModel.QueryResults();
+ }
+ break;
}
};
@@ -294,7 +305,10 @@ namespace Flow.Launcher
.AddValueChanged(History, (s, e) => UpdateClockPanelVisibility());
// Initialize query state
- _viewModel.InitializeQuery();
+ if (_settings.ShowHomePage && string.IsNullOrEmpty(_viewModel.QueryText))
+ {
+ _viewModel.QueryResults();
+ }
}
private async void OnClosing(object sender, CancelEventArgs e)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index d850e0f7c..993cc3ba9 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1080,12 +1080,9 @@ namespace Flow.Launcher.ViewModel
#region Query
- public void InitializeQuery()
+ public void QueryResults()
{
- if (Settings.ShowHomePage)
- {
- _ = QueryResultsAsync(false);
- }
+ _ = QueryResultsAsync(false);
}
public void Query(bool searchDelay, bool isReQuery = false)
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 092896019..61f6dea33 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -82,6 +82,9 @@ namespace Flow.Launcher.ViewModel
{
PluginPair.Metadata.HomeDisabled = !value;
PluginSettingsObject.HomeDiabled = !value;
+ // We should refresh results when these two settings are changed but we cannot do that
+ // Because the order of the results will change, making the interface look weird
+ // So we would better refresh results when query text is changed next time
}
}
From 13cfbe54306d5eabe76d4f0e3f89c979e69a5f11 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 09:07:14 +0800
Subject: [PATCH 0901/1442] Check query results
---
Flow.Launcher/MainWindow.xaml.cs | 7 +------
Flow.Launcher/ViewModel/PluginViewModel.cs | 3 ---
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 6dcd8d22d..e2948c540 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -278,12 +278,7 @@ namespace Flow.Launcher
InitializeContextMenu();
break;
case nameof(Settings.ShowHomePage):
- // We should refresh results when these two settings are changed but we cannot do that
- // Because the order of the results will change, making the interface look weird
- // So we would better refresh results when query text is changed next time
- /*case nameof(Settings.ShowHistoryResultsForHomePage):
- case nameof(Settings.MaxHistoryResultsToShowForHomePage):*/
- if (string.IsNullOrEmpty(_viewModel.QueryText))
+ if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
{
_viewModel.QueryResults();
}
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 61f6dea33..092896019 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -82,9 +82,6 @@ namespace Flow.Launcher.ViewModel
{
PluginPair.Metadata.HomeDisabled = !value;
PluginSettingsObject.HomeDiabled = !value;
- // We should refresh results when these two settings are changed but we cannot do that
- // Because the order of the results will change, making the interface look weird
- // So we would better refresh results when query text is changed next time
}
}
From 4500f1deebccad17076628174050a71e95881efa Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 09:14:57 +0800
Subject: [PATCH 0902/1442] Fix history items context menu issue
---
Flow.Launcher/ViewModel/MainViewModel.cs | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 993cc3ba9..8e708fbc4 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1127,9 +1127,20 @@ namespace Flow.Launcher.ViewModel
if (selected != null) // SelectedItem returns null if selection is empty.
{
- var results = PluginManager.GetContextMenusForPlugin(selected);
- results.Add(ContextMenuTopMost(selected));
- results.Add(ContextMenuPluginInfo(selected.PluginID));
+ List results;
+ if (selected.PluginID == null) // SelectedItem from history in home page.
+ {
+ results = new()
+ {
+ ContextMenuTopMost(selected)
+ };
+ }
+ else
+ {
+ results = PluginManager.GetContextMenusForPlugin(selected);
+ results.Add(ContextMenuTopMost(selected));
+ results.Add(ContextMenuPluginInfo(selected.PluginID));
+ }
if (!string.IsNullOrEmpty(query))
{
From 19d70592a8f66f5a4f16f3f840019c232865c1a3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 09:38:35 +0800
Subject: [PATCH 0903/1442] Add empty & global query for home page
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 5 +--
Flow.Launcher.Core/Plugin/QueryBuilder.cs | 21 +++++++--
Flow.Launcher/ViewModel/MainViewModel.cs | 51 ++++++++++------------
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index caa3fd00b..c22651738 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -278,11 +278,8 @@ namespace Flow.Launcher.Core.Plugin
};
}
- public static ICollection ValidPluginsForHomeQuery(Query query)
+ public static ICollection ValidPluginsForHomeQuery()
{
- if (query is not null)
- return Array.Empty();
-
return _homePlugins.ToList();
}
diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
index 0ef3f30f5..fae821736 100644
--- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs
+++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
@@ -8,10 +8,23 @@ namespace Flow.Launcher.Core.Plugin
{
public static Query Build(string text, Dictionary nonGlobalPlugins)
{
+ // home query
+ if (string.IsNullOrEmpty(text))
+ {
+ return new Query()
+ {
+ Search = string.Empty,
+ RawQuery = string.Empty,
+ SearchTerms = Array.Empty(),
+ ActionKeyword = string.Empty
+ };
+ }
+
// replace multiple white spaces with one white space
var terms = text.Split(Query.TermSeparator, StringSplitOptions.RemoveEmptyEntries);
if (terms.Length == 0)
- { // nothing was typed
+ {
+ // nothing was typed
return null;
}
@@ -21,13 +34,15 @@ namespace Flow.Launcher.Core.Plugin
string[] searchTerms;
if (nonGlobalPlugins.TryGetValue(possibleActionKeyword, out var pluginPair) && !pluginPair.Metadata.Disabled)
- { // use non global plugin for query
+ {
+ // use non global plugin for query
actionKeyword = possibleActionKeyword;
search = terms.Length > 1 ? rawQuery[(actionKeyword.Length + 1)..].TrimStart() : string.Empty;
searchTerms = terms[1..];
}
else
- { // non action keyword
+ {
+ // non action keyword
actionKeyword = string.Empty;
search = rawQuery.TrimStart();
searchTerms = terms;
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 8e708fbc4..517cf5323 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1220,31 +1220,21 @@ namespace Flow.Launcher.ViewModel
_updateSource?.Cancel();
var query = await ConstructQueryAsync(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
- var homeQuery = query == null;
- ICollection plugins = Array.Empty();
if (query == null) // shortcut expanded
{
- if (Settings.ShowHomePage)
- {
- plugins = PluginManager.ValidPluginsForHomeQuery(query);
- }
-
- if (plugins.Count == 0)
- {
- // Hide and clear results again because running query may show and add some results
- Results.Visibility = Visibility.Collapsed;
- Results.Clear();
+ // Hide and clear results again because running query may show and add some results
+ Results.Visibility = Visibility.Collapsed;
+ Results.Clear();
- // Reset plugin icon
- PluginIconPath = null;
- PluginIconSource = null;
- SearchIconVisibility = Visibility.Visible;
+ // Reset plugin icon
+ PluginIconPath = null;
+ PluginIconSource = null;
+ SearchIconVisibility = Visibility.Visible;
- // Hide progress bar again because running query may set this to visible
- ProgressBarVisibility = Visibility.Hidden;
- return;
- }
+ // Hide progress bar again because running query may set this to visible
+ ProgressBarVisibility = Visibility.Hidden;
+ return;
}
_updateSource = new CancellationTokenSource();
@@ -1258,16 +1248,22 @@ namespace Flow.Launcher.ViewModel
if (_updateSource.Token.IsCancellationRequested) return;
// Update the query's IsReQuery property to true if this is a re-query
- if (!homeQuery) query.IsReQuery = isReQuery;
+ query.IsReQuery = isReQuery;
// handle the exclusiveness of plugin using action keyword
RemoveOldQueryResults(query);
_lastQuery = query;
+ var homeQuery = query.RawQuery == string.Empty;
+ ICollection plugins = Array.Empty();
if (homeQuery)
{
- // Do not show plugin icon if this is a home query
+ if (Settings.ShowHomePage)
+ {
+ plugins = PluginManager.ValidPluginsForHomeQuery();
+ }
+
PluginIconPath = null;
PluginIconSource = null;
SearchIconVisibility = Visibility.Visible;
@@ -1317,18 +1313,17 @@ namespace Flow.Launcher.ViewModel
Task[] tasks;
if (homeQuery)
{
- var homeTasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
+ tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
false => QueryTaskAsync(plugin, _updateSource.Token),
true => Task.CompletedTask
- }).ToList();
+ }).ToArray();
+ // Query history results for home page firstly so it will be put on top of the results
if (Settings.ShowHistoryResultsForHomePage)
{
- homeTasks.Add(QueryHistoryTaskAsync());
+ await QueryHistoryTaskAsync();
}
-
- tasks = homeTasks.ToArray();
}
else
{
@@ -1465,7 +1460,7 @@ namespace Flow.Launcher.ViewModel
{
if (string.IsNullOrWhiteSpace(queryText))
{
- return null;
+ return QueryBuilder.Build(string.Empty, PluginManager.NonGlobalPlugins);
}
var queryBuilder = new StringBuilder(queryText);
From 4ed1dc3bc12dc8eef98cc111e1013295715859e3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 10:28:20 +0800
Subject: [PATCH 0904/1442] Fix topmost issue in home page
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 14 ++------------
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index c22651738..a3e80a73f 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -327,7 +327,7 @@ namespace Flow.Launcher.Core.Plugin
return results;
}
- public static async Task> QueryHomeForPluginAsync(PluginPair pair, CancellationToken token)
+ public static async Task> QueryHomeForPluginAsync(PluginPair pair, Query query, CancellationToken token)
{
var results = new List();
var metadata = pair.Metadata;
@@ -340,7 +340,7 @@ namespace Flow.Launcher.Core.Plugin
token.ThrowIfCancellationRequested();
if (results == null)
return null;
- UpdatePluginMetadata(results, metadata);
+ UpdatePluginMetadata(results, metadata, query);
token.ThrowIfCancellationRequested();
}
@@ -372,16 +372,6 @@ namespace Flow.Launcher.Core.Plugin
}
}
- private static void UpdatePluginMetadata(IReadOnlyList results, PluginMetadata metadata)
- {
- foreach (var r in results)
- {
- r.PluginDirectory = metadata.PluginDirectory;
- r.PluginID = metadata.ID;
- r.OriginQuery = null;
- }
- }
-
///
/// get specified plugin, return null if not found
///
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 517cf5323..eb22dc3e2 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1373,7 +1373,7 @@ namespace Flow.Launcher.ViewModel
await Task.Yield();
var results = homeQuery ?
- await PluginManager.QueryHomeForPluginAsync(plugin, token) :
+ await PluginManager.QueryHomeForPluginAsync(plugin, query, token) :
await PluginManager.QueryForPluginAsync(plugin, query, token);
if (token.IsCancellationRequested) return;
From 35e4bfc937158f5a180188626fdd351daf3f188b Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 11:05:23 +0800
Subject: [PATCH 0905/1442] Improve code quality
---
Flow.Launcher/ViewModel/MainViewModel.cs | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index eb22dc3e2..64284d766 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1413,10 +1413,10 @@ namespace Flow.Launcher.ViewModel
await Task.Yield();
// Select last history results and revert its order to make sure last history results are on top
- var lastHistoryResults = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
+ var historyResults = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
- var historyResults = new List();
- foreach (var h in lastHistoryResults)
+ var results = new List();
+ foreach (var h in historyResults)
{
var title = App.API.GetTranslation("executeQuery");
var time = App.API.GetTranslation("lastExecuteTime");
@@ -1438,14 +1438,12 @@ namespace Flow.Launcher.ViewModel
return false;
}
};
- historyResults.Add(result);
+ results.Add(result);
}
- // No need to make copy of results and update badge ico property
-
if (_updateSource.Token.IsCancellationRequested) return;
- if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(historyResults, _historyMetadata, query,
+ if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, _historyMetadata, query,
_updateSource.Token)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
From 2ab007b3b6db29ad4347a3f6b84e4f2459cecabc Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 11:26:00 +0800
Subject: [PATCH 0906/1442] Fix typos
---
Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs | 6 +++---
Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
index 837d0ebb6..920abc284 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
@@ -67,7 +67,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
metadata.Disabled = settings.Disabled;
metadata.Priority = settings.Priority;
metadata.SearchDelayTime = settings.SearchDelayTime;
- metadata.HomeDisabled = settings.HomeDiabled;
+ metadata.HomeDisabled = settings.HomeDisabled;
}
else
{
@@ -80,7 +80,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
DefaultActionKeywords = metadata.ActionKeywords, // metadata provides default values
ActionKeywords = metadata.ActionKeywords, // use default value
Disabled = metadata.Disabled,
- HomeDiabled = metadata.HomeDisabled,
+ HomeDisabled = metadata.HomeDisabled,
Priority = metadata.Priority,
DefaultSearchDelayTime = metadata.SearchDelayTime, // metadata provides default values
SearchDelayTime = metadata.SearchDelayTime, // use default value
@@ -130,6 +130,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// Used only to save the state of the plugin in settings
///
public bool Disabled { get; set; }
- public bool HomeDiabled { get; set; }
+ public bool HomeDisabled { get; set; }
}
}
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 092896019..01fa3d203 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -81,7 +81,7 @@ namespace Flow.Launcher.ViewModel
set
{
PluginPair.Metadata.HomeDisabled = !value;
- PluginSettingsObject.HomeDiabled = !value;
+ PluginSettingsObject.HomeDisabled = !value;
}
}
From eaea38c13ab7c6536ee3b92bf8ad9b8ff436c599 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Sun, 4 May 2025 11:40:45 +0800
Subject: [PATCH 0907/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
index f3c9cfcad..129f43b85 100644
--- a/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
@@ -8,7 +8,7 @@ namespace Flow.Launcher.Plugin
/// Synchronous Query Model for Flow Launcher When Query Text is Empty
///
/// If the Querying method requires high IO transmission
- /// or performaing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface
+ /// or performing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface
///
///
public interface IHomeQuery : IAsyncHomeQuery
From 78f606f2fcb74467962bb582cd70f65c2d35104e Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Sun, 4 May 2025 11:40:57 +0800
Subject: [PATCH 0908/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
index 129f43b85..81186fca2 100644
--- a/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IHomeQuery.cs
@@ -17,7 +17,7 @@ namespace Flow.Launcher.Plugin
/// Querying When Query Text is Empty
///
/// This method will be called within a Task.Run,
- /// so please avoid synchrously wait for long.
+ /// so please avoid synchronously wait for long.
///
///
///
From 72bd1e60dbe7bdef77704e88641b818d1bb8f98f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 11:44:41 +0800
Subject: [PATCH 0909/1442] Remove code comments with issues
---
Flow.Launcher.Plugin/Result.cs | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index 060c03317..f0fcd48ff 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -174,9 +174,6 @@ namespace Flow.Launcher.Plugin
///
/// Query information associated with the result
///
- ///
- /// If the query is for home query, this will be null
- ///
internal Query OriginQuery { get; set; }
///
From 0d9fb29f12948253a956f80fedae0d3a9473091e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 16:37:15 +0800
Subject: [PATCH 0910/1442] Improve code quality
---
Flow.Launcher/ViewModel/MainViewModel.cs | 64 +++++++++---------------
1 file changed, 23 insertions(+), 41 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 6d7b4a8a4..f79596c96 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1192,8 +1192,27 @@ namespace Flow.Launcher.ViewModel
var query = QueryText.ToLower().Trim();
History.Clear();
+ var results = GetHistoryItems(_history.Items);
+
+ if (!string.IsNullOrEmpty(query))
+ {
+ var filtered = results.Where
+ (
+ r => App.API.FuzzySearch(query, r.Title).IsSearchPrecisionScoreMet() ||
+ App.API.FuzzySearch(query, r.SubTitle).IsSearchPrecisionScoreMet()
+ ).ToList();
+ History.AddResults(filtered, id);
+ }
+ else
+ {
+ History.AddResults(results, id);
+ }
+ }
+
+ private static List GetHistoryItems(IEnumerable historyItems)
+ {
var results = new List();
- foreach (var h in _history.Items)
+ foreach (var h in historyItems)
{
var title = App.API.GetTranslation("executeQuery");
var time = App.API.GetTranslation("lastExecuteTime");
@@ -1217,20 +1236,7 @@ namespace Flow.Launcher.ViewModel
};
results.Add(result);
}
-
- if (!string.IsNullOrEmpty(query))
- {
- var filtered = results.Where
- (
- r => App.API.FuzzySearch(query, r.Title).IsSearchPrecisionScoreMet() ||
- App.API.FuzzySearch(query, r.SubTitle).IsSearchPrecisionScoreMet()
- ).ToList();
- History.AddResults(filtered, id);
- }
- else
- {
- History.AddResults(results, id);
- }
+ return results;
}
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)
@@ -1431,33 +1437,9 @@ namespace Flow.Launcher.ViewModel
await Task.Yield();
// Select last history results and revert its order to make sure last history results are on top
- var historyResults = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
+ var historyItems = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
- var results = new List();
- foreach (var h in historyResults)
- {
- var title = App.API.GetTranslation("executeQuery");
- var time = App.API.GetTranslation("lastExecuteTime");
- var result = new Result
- {
- Title = string.Format(title, h.Query),
- SubTitle = string.Format(time, h.ExecutedDateTime),
- IcoPath = "Images\\history.png",
- Preview = new Result.PreviewInfo
- {
- PreviewImagePath = Constant.HistoryIcon,
- Description = string.Format(time, h.ExecutedDateTime)
- },
- OriginQuery = new Query { RawQuery = h.Query },
- Action = _ =>
- {
- SelectedResults = Results;
- App.API.ChangeQuery(h.Query);
- return false;
- }
- };
- results.Add(result);
- }
+ var results = GetHistoryItems(historyItems);
if (_updateSource.Token.IsCancellationRequested) return;
From 67facb8f18f4325def9572e37ccf7f25fbb7a8fa Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 16:44:05 +0800
Subject: [PATCH 0911/1442] Use non-async version
---
Flow.Launcher/ViewModel/MainViewModel.cs | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index f79596c96..5fd8d395f 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1346,7 +1346,7 @@ namespace Flow.Launcher.ViewModel
// Query history results for home page firstly so it will be put on top of the results
if (Settings.ShowHistoryResultsForHomePage)
{
- await QueryHistoryTaskAsync();
+ QueryHistoryTask();
}
}
else
@@ -1430,12 +1430,8 @@ namespace Flow.Launcher.ViewModel
}
}
- async Task QueryHistoryTaskAsync()
+ void QueryHistoryTask()
{
- // Since it is wrapped within a ThreadPool Thread, the synchronous context is null
- // Task.Yield will force it to run in ThreadPool
- await Task.Yield();
-
// Select last history results and revert its order to make sure last history results are on top
var historyItems = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
@@ -1448,8 +1444,6 @@ namespace Flow.Launcher.ViewModel
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
-
- await Task.CompletedTask;
}
}
From 21d6ec20d45597ad872341afbcb82ef85a85ee87 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 18:29:39 +0800
Subject: [PATCH 0912/1442] Use null to distinguish between home query and
global query
---
Flow.Launcher.Core/Plugin/QueryBuilder.cs | 3 ++-
Flow.Launcher.Plugin/Query.cs | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
index fae821736..82745c239 100644
--- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs
+++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
@@ -16,7 +16,8 @@ namespace Flow.Launcher.Core.Plugin
Search = string.Empty,
RawQuery = string.Empty,
SearchTerms = Array.Empty(),
- ActionKeyword = string.Empty
+ // must use null because we need to distinguish between home query and global query
+ ActionKeyword = null
};
}
diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs
index c3eede4c6..7d98a4afe 100644
--- a/Flow.Launcher.Plugin/Query.cs
+++ b/Flow.Launcher.Plugin/Query.cs
@@ -53,6 +53,7 @@ namespace Flow.Launcher.Plugin
///
/// The action keyword part of this query.
/// For global plugins this value will be empty.
+ /// For home query this value will be null.
///
public string ActionKeyword { get; init; }
From 28b8cb6013fb56de9d9946acc6a300af1e0883cf Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 21:43:48 +0800
Subject: [PATCH 0913/1442] Improve distinguish between home query and global
query
---
Flow.Launcher.Core/Plugin/QueryBuilder.cs | 3 +--
Flow.Launcher.Plugin/Query.cs | 1 -
Flow.Launcher/ViewModel/MainViewModel.cs | 17 +++++++++++++----
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
index 82745c239..fae821736 100644
--- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs
+++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
@@ -16,8 +16,7 @@ namespace Flow.Launcher.Core.Plugin
Search = string.Empty,
RawQuery = string.Empty,
SearchTerms = Array.Empty(),
- // must use null because we need to distinguish between home query and global query
- ActionKeyword = null
+ ActionKeyword = string.Empty
};
}
diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs
index 7d98a4afe..c3eede4c6 100644
--- a/Flow.Launcher.Plugin/Query.cs
+++ b/Flow.Launcher.Plugin/Query.cs
@@ -53,7 +53,6 @@ namespace Flow.Launcher.Plugin
///
/// The action keyword part of this query.
/// For global plugins this value will be empty.
- /// For home query this value will be null.
///
public string ActionKeyword { get; init; }
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 5fd8d395f..30df8250c 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -33,6 +33,7 @@ namespace Flow.Launcher.ViewModel
private bool _isQueryRunning;
private Query _lastQuery;
+ private bool _lastHomeQuery;
private string _queryTextBeforeLeaveResults;
private string _ignoredQueryText = null;
@@ -1261,6 +1262,8 @@ namespace Flow.Launcher.ViewModel
return;
}
+ var homeQuery = query.RawQuery == string.Empty;
+
_updateSource = new CancellationTokenSource();
ProgressBarVisibility = Visibility.Hidden;
@@ -1275,11 +1278,11 @@ namespace Flow.Launcher.ViewModel
query.IsReQuery = isReQuery;
// handle the exclusiveness of plugin using action keyword
- RemoveOldQueryResults(query);
+ RemoveOldQueryResults(query, homeQuery);
_lastQuery = query;
+ _lastHomeQuery = homeQuery;
- var homeQuery = query.RawQuery == string.Empty;
ICollection plugins = Array.Empty();
if (homeQuery)
{
@@ -1524,9 +1527,15 @@ namespace Flow.Launcher.ViewModel
}
}
- private void RemoveOldQueryResults(Query query)
+ private void RemoveOldQueryResults(Query query, bool homeQuery)
{
- if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
+ // If last or current query is home query, we need to clear the results
+ if (_lastHomeQuery || homeQuery)
+ {
+ Results.Clear();
+ }
+ // If last and current query are not home query, we need to check action keyword
+ else if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
{
Results.Clear();
}
From 51fb1515a0d88636d26bfbc5913a994de8871209 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 22:04:01 +0800
Subject: [PATCH 0914/1442] Add more debug log info for query
---
Flow.Launcher/ViewModel/MainViewModel.cs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index c505c32a3..c481be02e 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1215,10 +1215,14 @@ namespace Flow.Launcher.ViewModel
{
_updateSource?.Cancel();
+ App.API.LogDebug(ClassName, $"Start query with text: {QueryText}");
+
var query = await ConstructQueryAsync(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
if (query == null) // shortcut expanded
{
+ App.API.LogDebug(ClassName, $"Clear query results");
+
// Hide and clear results again because running query may show and add some results
Results.Visibility = Visibility.Collapsed;
Results.Clear();
@@ -1233,6 +1237,8 @@ namespace Flow.Launcher.ViewModel
return;
}
+ App.API.LogDebug(ClassName, $"Start query with ActionKeyword <{query.ActionKeyword}> and RawQuery <{query.RawQuery}>");
+
_updateSource = new CancellationTokenSource();
ProgressBarVisibility = Visibility.Hidden;
@@ -1253,6 +1259,9 @@ namespace Flow.Launcher.ViewModel
var plugins = PluginManager.ValidPluginsForQuery(query);
+ var validPluginNames = plugins.Select(x => $"<{x.Metadata.Name}>");
+ App.API.LogDebug(ClassName, $"Valid <{plugins.Count}> plugins: {string.Join(" ", validPluginNames)}");
+
if (plugins.Count == 1)
{
PluginIconPath = plugins.Single().Metadata.IcoPath;
@@ -1321,6 +1330,8 @@ namespace Flow.Launcher.ViewModel
// Local function
async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
{
+ App.API.LogDebug(ClassName, $"Wait for querying plugin <{plugin.Metadata.Name}>");
+
if (searchDelay)
{
var searchDelayTime = plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime;
@@ -1359,6 +1370,8 @@ namespace Flow.Launcher.ViewModel
if (token.IsCancellationRequested) return;
+ App.API.LogDebug(ClassName, $"Update results for plugin <{plugin.Metadata.Name}>");
+
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
token, reSelect)))
{
@@ -1448,6 +1461,8 @@ namespace Flow.Launcher.ViewModel
{
if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
{
+ App.API.LogDebug(ClassName, $"Remove old results");
+
Results.Clear();
}
}
From 197316397a1596a694cc445351724542b54b66bd Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 4 May 2025 22:05:57 +0800
Subject: [PATCH 0915/1442] Improve log info
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index c481be02e..228e66edb 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1215,7 +1215,7 @@ namespace Flow.Launcher.ViewModel
{
_updateSource?.Cancel();
- App.API.LogDebug(ClassName, $"Start query with text: {QueryText}");
+ App.API.LogDebug(ClassName, $"Start query with text: <{QueryText}>");
var query = await ConstructQueryAsync(QueryText, Settings.CustomShortcuts, Settings.BuiltinShortcuts);
From b9aa5a88cf5350ca7165fa570de225428472bd3f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 08:30:53 +0800
Subject: [PATCH 0916/1442] Change variable name for code quality
---
Flow.Launcher/ViewModel/MainViewModel.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 566cb6814..476c10e74 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -33,7 +33,7 @@ namespace Flow.Launcher.ViewModel
private bool _isQueryRunning;
private Query _lastQuery;
- private bool _lastHomeQuery;
+ private bool _lastIsHomeQuery;
private string _queryTextBeforeLeaveResults;
private string _ignoredQueryText = null;
@@ -1268,7 +1268,7 @@ namespace Flow.Launcher.ViewModel
App.API.LogDebug(ClassName, $"Start query with ActionKeyword <{query.ActionKeyword}> and RawQuery <{query.RawQuery}>");
- var homeQuery = query.RawQuery == string.Empty;
+ var isHomeQuery = query.RawQuery == string.Empty;
_updateSource = new CancellationTokenSource();
@@ -1284,13 +1284,13 @@ namespace Flow.Launcher.ViewModel
query.IsReQuery = isReQuery;
// handle the exclusiveness of plugin using action keyword
- RemoveOldQueryResults(query, homeQuery);
+ RemoveOldQueryResults(query, isHomeQuery);
_lastQuery = query;
- _lastHomeQuery = homeQuery;
+ _lastIsHomeQuery = isHomeQuery;
ICollection plugins = Array.Empty();
- if (homeQuery)
+ if (isHomeQuery)
{
if (Settings.ShowHomePage)
{
@@ -1347,7 +1347,7 @@ namespace Flow.Launcher.ViewModel
// plugins are ICollection, meaning LINQ will get the Count and preallocate Array
Task[] tasks;
- if (homeQuery)
+ if (isHomeQuery)
{
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
@@ -1397,7 +1397,7 @@ namespace Flow.Launcher.ViewModel
{
App.API.LogDebug(ClassName, $"Wait for querying plugin <{plugin.Metadata.Name}>");
- if (searchDelay && !homeQuery) // Do not delay for home query
+ if (searchDelay && !isHomeQuery) // Do not delay for home query
{
var searchDelayTime = plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime;
@@ -1410,7 +1410,7 @@ namespace Flow.Launcher.ViewModel
// Task.Yield will force it to run in ThreadPool
await Task.Yield();
- var results = homeQuery ?
+ var results = isHomeQuery ?
await PluginManager.QueryHomeForPluginAsync(plugin, query, token) :
await PluginManager.QueryForPluginAsync(plugin, query, token);
@@ -1542,10 +1542,10 @@ namespace Flow.Launcher.ViewModel
}
}
- private void RemoveOldQueryResults(Query query, bool homeQuery)
+ private void RemoveOldQueryResults(Query query, bool isHomeQuery)
{
// If last or current query is home query, we need to clear the results
- if (_lastHomeQuery || homeQuery)
+ if (_lastIsHomeQuery || isHomeQuery)
{
Results.Clear();
}
From 2713c5babfaaf1a7989043f04b42b34b712116ca Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 08:35:20 +0800
Subject: [PATCH 0917/1442] Add code comments
---
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 476c10e74..23958ca70 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -54,8 +54,8 @@ namespace Flow.Launcher.ViewModel
private readonly PluginMetadata _historyMetadata = new()
{
- ID = "298303A65D128A845D28A7B83B3968C2",
- Priority = 0
+ ID = "298303A65D128A845D28A7B83B3968C2", // ID is for ResultsForUpdate constructor
+ Priority = 0 // Priority is for calculating scores in UpdateResultView
};
#endregion
From 41211e8cd380df56a44dc9df996ac2833b431dc1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 08:44:08 +0800
Subject: [PATCH 0918/1442] Improve code comments
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 23958ca70..dc35a6aa9 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -54,7 +54,7 @@ namespace Flow.Launcher.ViewModel
private readonly PluginMetadata _historyMetadata = new()
{
- ID = "298303A65D128A845D28A7B83B3968C2", // ID is for ResultsForUpdate constructor
+ ID = "298303A65D128A845D28A7B83B3968C2", // ID is for identifying the update plugin in UpdateActionAsync
Priority = 0 // Priority is for calculating scores in UpdateResultView
};
From 16404bc2a780430028e3515f19f02b2568f57b5e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 12:54:15 +0800
Subject: [PATCH 0919/1442] Improve log information
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index dc35a6aa9..25c39ac7a 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1547,13 +1547,13 @@ namespace Flow.Launcher.ViewModel
// If last or current query is home query, we need to clear the results
if (_lastIsHomeQuery || isHomeQuery)
{
+ App.API.LogDebug(ClassName, $"Remove old results");
Results.Clear();
}
// If last and current query are not home query, we need to check action keyword
else if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
{
App.API.LogDebug(ClassName, $"Remove old results");
-
Results.Clear();
}
}
From 36a4f4176778253f00c09a7675ec43b07953282a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 17:32:43 +0800
Subject: [PATCH 0920/1442] Do not need to clear the result when last and
current query are home query
---
Flow.Launcher/ViewModel/MainViewModel.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 25c39ac7a..a8e431d99 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1544,8 +1544,13 @@ namespace Flow.Launcher.ViewModel
private void RemoveOldQueryResults(Query query, bool isHomeQuery)
{
+ // If last and current query are home query, we don't need to clear the results
+ if (_lastIsHomeQuery && isHomeQuery)
+ {
+ return;
+ }
// If last or current query is home query, we need to clear the results
- if (_lastIsHomeQuery || isHomeQuery)
+ else if (_lastIsHomeQuery || isHomeQuery)
{
App.API.LogDebug(ClassName, $"Remove old results");
Results.Clear();
From 0882378988b72615118150db4c011eafd59ceca9 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 18:53:40 +0800
Subject: [PATCH 0921/1442] Add Glyph for history items & topmost items
---
Flow.Launcher/ViewModel/MainViewModel.cs | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index a8e431d99..a98172f0a 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1221,19 +1221,15 @@ namespace Flow.Launcher.ViewModel
{
Title = string.Format(title, h.Query),
SubTitle = string.Format(time, h.ExecutedDateTime),
- IcoPath = "Images\\history.png",
- Preview = new Result.PreviewInfo
- {
- PreviewImagePath = Constant.HistoryIcon,
- Description = string.Format(time, h.ExecutedDateTime)
- },
+ IcoPath = Constant.HistoryIcon,
OriginQuery = new Query { RawQuery = h.Query },
Action = _ =>
{
App.API.BackToQueryResults();
App.API.ChangeQuery(h.Query);
return false;
- }
+ },
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C")
};
results.Add(result);
}
@@ -1579,7 +1575,8 @@ namespace Flow.Launcher.ViewModel
App.API.ShowMsg(App.API.GetTranslation("success"));
App.API.ReQuery();
return false;
- }
+ },
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74B")
};
}
else
@@ -1588,7 +1585,6 @@ namespace Flow.Launcher.ViewModel
{
Title = App.API.GetTranslation("setAsTopMostInThisQuery"),
IcoPath = "Images\\up.png",
- Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xeac2"),
PluginDirectory = Constant.ProgramDirectory,
Action = _ =>
{
@@ -1596,7 +1592,8 @@ namespace Flow.Launcher.ViewModel
App.API.ShowMsg(App.API.GetTranslation("success"));
App.API.ReQuery();
return false;
- }
+ },
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74A")
};
}
From 7083849d149f4262b478f29d5c0c6834c78fd3c6 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 5 May 2025 19:11:46 +0800
Subject: [PATCH 0922/1442] Remove unused codes
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index a98172f0a..6c4236db9 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -790,8 +790,6 @@ namespace Flow.Launcher.ViewModel
}
}
}
-
- _selectedResults.Visibility = Visibility.Visible;
}
}
From b1a48e296a9d3ee22b09b98c894e35dc4a2a3bc4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 13:58:28 +0800
Subject: [PATCH 0923/1442] Improve code quality
---
Flow.Launcher/ViewModel/MainViewModel.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 6c4236db9..8ec29c216 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -35,7 +35,7 @@ namespace Flow.Launcher.ViewModel
private Query _lastQuery;
private bool _lastIsHomeQuery;
private string _queryTextBeforeLeaveResults;
- private string _ignoredQueryText = null;
+ private string _ignoredQueryText; // Used to ignore query text change when switching between context menu and query results
private readonly FlowLauncherJsonStorage _historyItemsStorage;
private readonly FlowLauncherJsonStorage _userSelectedRecordStorage;
@@ -67,6 +67,7 @@ namespace Flow.Launcher.ViewModel
_queryTextBeforeLeaveResults = "";
_queryText = "";
_lastQuery = new Query();
+ _ignoredQueryText = null; // null as invalid value
Settings = Ioc.Default.GetRequiredService();
Settings.PropertyChanged += (_, args) =>
From 639a5aebe5a5a5feaf6f1fa10c4845d56218367d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 14:02:18 +0800
Subject: [PATCH 0924/1442] Dispose _updateSource when creating new one & Use
_updateToken instead of _updateSource.Token
---
Flow.Launcher/ViewModel/MainViewModel.cs | 30 ++++++++++++++----------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 8ec29c216..175f4ff84 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -46,6 +46,7 @@ namespace Flow.Launcher.ViewModel
private readonly TopMostRecord _topMostRecord;
private CancellationTokenSource _updateSource; // Used to cancel old query flows
+ private CancellationToken _updateToken; // Used to avoid ObjectDisposedException of _updateSource.Token
private ChannelWriter _resultsUpdateChannelWriter;
private Task _resultsViewUpdateTask;
@@ -68,6 +69,8 @@ namespace Flow.Launcher.ViewModel
_queryText = "";
_lastQuery = new Query();
_ignoredQueryText = null; // null as invalid value
+ _updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
Settings = Ioc.Default.GetRequiredService();
Settings.PropertyChanged += (_, args) =>
@@ -249,7 +252,7 @@ namespace Flow.Launcher.ViewModel
return;
}
- var token = e.Token == default ? _updateSource.Token : e.Token;
+ var token = e.Token == default ? _updateToken : e.Token;
// make a clone to avoid possible issue that plugin will also change the list and items when updating view model
var resultsCopy = DeepCloneResults(e.Results, token);
@@ -1265,7 +1268,9 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
+ _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
_updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
@@ -1273,7 +1278,7 @@ namespace Flow.Launcher.ViewModel
// Switch to ThreadPool thread
await TaskScheduler.Default;
- if (_updateSource.Token.IsCancellationRequested) return;
+ if (_updateToken.IsCancellationRequested) return;
// Update the query's IsReQuery property to true if this is a re-query
query.IsReQuery = isReQuery;
@@ -1322,12 +1327,11 @@ namespace Flow.Launcher.ViewModel
{
// Wait 15 millisecond for query change in global query
// if query changes, return so that it won't be calculated
- await Task.Delay(15, _updateSource.Token);
- if (_updateSource.Token.IsCancellationRequested)
- return;
+ await Task.Delay(15, _updateToken);
+ if (_updateToken.IsCancellationRequested) return;
}*/
- _ = Task.Delay(200, _updateSource.Token).ContinueWith(_ =>
+ _ = Task.Delay(200, _updateToken).ContinueWith(_ =>
{
// start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
if (_isQueryRunning)
@@ -1335,7 +1339,7 @@ namespace Flow.Launcher.ViewModel
ProgressBarVisibility = Visibility.Visible;
}
},
- _updateSource.Token,
+ _updateToken,
TaskContinuationOptions.NotOnCanceled,
TaskScheduler.Default);
@@ -1346,7 +1350,7 @@ namespace Flow.Launcher.ViewModel
{
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
- false => QueryTaskAsync(plugin, _updateSource.Token),
+ false => QueryTaskAsync(plugin, _updateToken),
true => Task.CompletedTask
}).ToArray();
@@ -1360,7 +1364,7 @@ namespace Flow.Launcher.ViewModel
{
tasks = plugins.Select(plugin => plugin.Metadata.Disabled switch
{
- false => QueryTaskAsync(plugin, _updateSource.Token),
+ false => QueryTaskAsync(plugin, _updateToken),
true => Task.CompletedTask
}).ToArray();
}
@@ -1375,13 +1379,13 @@ namespace Flow.Launcher.ViewModel
// nothing to do here
}
- if (_updateSource.Token.IsCancellationRequested) return;
+ if (_updateToken.IsCancellationRequested) return;
// this should happen once after all queries are done so progress bar should continue
// until the end of all querying
_isQueryRunning = false;
- if (!_updateSource.Token.IsCancellationRequested)
+ if (!_updateToken.IsCancellationRequested)
{
// update to hidden if this is still the current query
ProgressBarVisibility = Visibility.Hidden;
@@ -1448,12 +1452,12 @@ namespace Flow.Launcher.ViewModel
var results = GetHistoryItems(historyItems);
- if (_updateSource.Token.IsCancellationRequested) return;
+ if (_updateToken.IsCancellationRequested) return;
App.API.LogDebug(ClassName, $"Update results for history");
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, _historyMetadata, query,
- _updateSource.Token)))
+ _updateToken)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
From 265fd9c868e881da4f61060bb40385268c8d6420 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 14:13:14 +0800
Subject: [PATCH 0925/1442] Add update source lock
---
Flow.Launcher/ViewModel/MainViewModel.cs | 27 ++++++++++++++++++------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 175f4ff84..afef8f64e 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -47,6 +47,7 @@ namespace Flow.Launcher.ViewModel
private CancellationTokenSource _updateSource; // Used to cancel old query flows
private CancellationToken _updateToken; // Used to avoid ObjectDisposedException of _updateSource.Token
+ private readonly object _updateSourceLock = new();
private ChannelWriter _resultsUpdateChannelWriter;
private Task _resultsViewUpdateTask;
@@ -69,8 +70,11 @@ namespace Flow.Launcher.ViewModel
_queryText = "";
_lastQuery = new Query();
_ignoredQueryText = null; // null as invalid value
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
+ lock (_updateSourceLock)
+ {
+ _updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
+ }
Settings = Ioc.Default.GetRequiredService();
Settings.PropertyChanged += (_, args) =>
@@ -1240,7 +1244,10 @@ namespace Flow.Launcher.ViewModel
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)
{
- _updateSource?.Cancel();
+ lock (_updateSourceLock)
+ {
+ _updateSource.Cancel();
+ }
App.API.LogDebug(ClassName, $"Start query with text: <{QueryText}>");
@@ -1268,9 +1275,12 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
- _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
+ lock (_updateSourceLock)
+ {
+ _updateSource.Dispose(); // Dispose old update source to fix possible cancellation issue
+ _updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
+ }
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
@@ -1888,7 +1898,10 @@ namespace Flow.Launcher.ViewModel
{
if (disposing)
{
- _updateSource?.Dispose();
+ lock (_updateSourceLock)
+ {
+ _updateSource?.Dispose();
+ }
_resultsUpdateChannelWriter?.Complete();
if (_resultsViewUpdateTask?.IsCompleted == true)
{
From b156afed0bdac5cbe19749fcad2687d4bf2b9e20 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 14:14:10 +0800
Subject: [PATCH 0926/1442] Revert "Add update source lock"
This reverts commit 265fd9c868e881da4f61060bb40385268c8d6420.
---
Flow.Launcher/ViewModel/MainViewModel.cs | 27 ++++++------------------
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index afef8f64e..175f4ff84 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -47,7 +47,6 @@ namespace Flow.Launcher.ViewModel
private CancellationTokenSource _updateSource; // Used to cancel old query flows
private CancellationToken _updateToken; // Used to avoid ObjectDisposedException of _updateSource.Token
- private readonly object _updateSourceLock = new();
private ChannelWriter _resultsUpdateChannelWriter;
private Task _resultsViewUpdateTask;
@@ -70,11 +69,8 @@ namespace Flow.Launcher.ViewModel
_queryText = "";
_lastQuery = new Query();
_ignoredQueryText = null; // null as invalid value
- lock (_updateSourceLock)
- {
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
- }
+ _updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
Settings = Ioc.Default.GetRequiredService();
Settings.PropertyChanged += (_, args) =>
@@ -1244,10 +1240,7 @@ namespace Flow.Launcher.ViewModel
private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, bool reSelect = true)
{
- lock (_updateSourceLock)
- {
- _updateSource.Cancel();
- }
+ _updateSource?.Cancel();
App.API.LogDebug(ClassName, $"Start query with text: <{QueryText}>");
@@ -1275,12 +1268,9 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
- lock (_updateSourceLock)
- {
- _updateSource.Dispose(); // Dispose old update source to fix possible cancellation issue
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
- }
+ _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
+ _updateSource = new CancellationTokenSource();
+ _updateToken = _updateSource.Token;
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
@@ -1898,10 +1888,7 @@ namespace Flow.Launcher.ViewModel
{
if (disposing)
{
- lock (_updateSourceLock)
- {
- _updateSource?.Dispose();
- }
+ _updateSource?.Dispose();
_resultsUpdateChannelWriter?.Complete();
if (_resultsViewUpdateTask?.IsCompleted == true)
{
From 2672512a62503a76d72777c3716cfe48dc1465b7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 14:14:50 +0800
Subject: [PATCH 0927/1442] Dispose the old CancellationTokenSource atomically
to avoid races
---
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 175f4ff84..383256dcc 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1268,9 +1268,9 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
- _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
- _updateSource = new CancellationTokenSource();
+ var oldSource = Interlocked.Exchange(ref _updateSource, new CancellationTokenSource());
_updateToken = _updateSource.Token;
+ oldSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
From 788cb3cc16cc639ffbe1d55acb3ab20f4f900396 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 19:17:33 +0800
Subject: [PATCH 0928/1442] Revert "Dispose the old CancellationTokenSource
atomically to avoid races"
This reverts commit 2672512a62503a76d72777c3716cfe48dc1465b7.
---
Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 383256dcc..175f4ff84 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1268,9 +1268,9 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
- var oldSource = Interlocked.Exchange(ref _updateSource, new CancellationTokenSource());
+ _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
+ _updateSource = new CancellationTokenSource();
_updateToken = _updateSource.Token;
- oldSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
From deb0c2139f6cbf6f6efd99ba640f65d76596edcd Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 19:22:37 +0800
Subject: [PATCH 0929/1442] Remove unused initialization value
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 175f4ff84..aab2e2d03 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -69,8 +69,6 @@ namespace Flow.Launcher.ViewModel
_queryText = "";
_lastQuery = new Query();
_ignoredQueryText = null; // null as invalid value
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
Settings = Ioc.Default.GetRequiredService();
Settings.PropertyChanged += (_, args) =>
From 297643c3e52d9800154390e40a5518e64cb86d9e Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 May 2025 19:35:40 +0800
Subject: [PATCH 0930/1442] Revert all changes as master branch
---
Flow.Launcher/ViewModel/MainViewModel.cs | 35 +++++++++++++-----------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index aab2e2d03..c0b74dc68 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1266,9 +1266,12 @@ namespace Flow.Launcher.ViewModel
var isHomeQuery = query.RawQuery == string.Empty;
- _updateSource?.Dispose(); // Dispose old update source to fix possible cancellation issue
- _updateSource = new CancellationTokenSource();
- _updateToken = _updateSource.Token;
+ _updateSource?.Dispose();
+
+ var currentUpdateSource = new CancellationTokenSource();
+ _updateSource = currentUpdateSource;
+ var currentCancellationToken = _updateSource.Token;
+ _updateToken = currentCancellationToken;
ProgressBarVisibility = Visibility.Hidden;
_isQueryRunning = true;
@@ -1276,7 +1279,7 @@ namespace Flow.Launcher.ViewModel
// Switch to ThreadPool thread
await TaskScheduler.Default;
- if (_updateToken.IsCancellationRequested) return;
+ if (currentCancellationToken.IsCancellationRequested) return;
// Update the query's IsReQuery property to true if this is a re-query
query.IsReQuery = isReQuery;
@@ -1325,11 +1328,11 @@ namespace Flow.Launcher.ViewModel
{
// Wait 15 millisecond for query change in global query
// if query changes, return so that it won't be calculated
- await Task.Delay(15, _updateToken);
- if (_updateToken.IsCancellationRequested) return;
+ await Task.Delay(15, currentCancellationToken);
+ if (currentCancellationToken.IsCancellationRequested) return;
}*/
- _ = Task.Delay(200, _updateToken).ContinueWith(_ =>
+ _ = Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
{
// start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
if (_isQueryRunning)
@@ -1337,7 +1340,7 @@ namespace Flow.Launcher.ViewModel
ProgressBarVisibility = Visibility.Visible;
}
},
- _updateToken,
+ currentCancellationToken,
TaskContinuationOptions.NotOnCanceled,
TaskScheduler.Default);
@@ -1348,21 +1351,21 @@ namespace Flow.Launcher.ViewModel
{
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
- false => QueryTaskAsync(plugin, _updateToken),
+ false => QueryTaskAsync(plugin, currentCancellationToken),
true => Task.CompletedTask
}).ToArray();
// Query history results for home page firstly so it will be put on top of the results
if (Settings.ShowHistoryResultsForHomePage)
{
- QueryHistoryTask();
+ QueryHistoryTask(currentCancellationToken);
}
}
else
{
tasks = plugins.Select(plugin => plugin.Metadata.Disabled switch
{
- false => QueryTaskAsync(plugin, _updateToken),
+ false => QueryTaskAsync(plugin, currentCancellationToken),
true => Task.CompletedTask
}).ToArray();
}
@@ -1377,13 +1380,13 @@ namespace Flow.Launcher.ViewModel
// nothing to do here
}
- if (_updateToken.IsCancellationRequested) return;
+ if (currentCancellationToken.IsCancellationRequested) return;
// this should happen once after all queries are done so progress bar should continue
// until the end of all querying
_isQueryRunning = false;
- if (!_updateToken.IsCancellationRequested)
+ if (!currentCancellationToken.IsCancellationRequested)
{
// update to hidden if this is still the current query
ProgressBarVisibility = Visibility.Hidden;
@@ -1443,19 +1446,19 @@ namespace Flow.Launcher.ViewModel
}
}
- void QueryHistoryTask()
+ void QueryHistoryTask(CancellationToken token)
{
// Select last history results and revert its order to make sure last history results are on top
var historyItems = _history.Items.TakeLast(Settings.MaxHistoryResultsToShowForHomePage).Reverse();
var results = GetHistoryItems(historyItems);
- if (_updateToken.IsCancellationRequested) return;
+ if (token.IsCancellationRequested) return;
App.API.LogDebug(ClassName, $"Update results for history");
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, _historyMetadata, query,
- _updateToken)))
+ token)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
From 29f94d66c229cd4036fc00f48e64add87d0fab00 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 9 May 2025 15:57:18 +0800
Subject: [PATCH 0931/1442] Fix startup flicker
---
Flow.Launcher/App.xaml.cs | 2 +-
Flow.Launcher/MainWindow.xaml.cs | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs
index 402812a92..942e94470 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -203,7 +203,7 @@ namespace Flow.Launcher
// it will steal focus from main window which causes window hide
HotKeyMapper.Initialize();
- // Main windows needs initialized before theme change because of blur settings
+ // Initialize theme for main window
Ioc.Default.GetRequiredService().ChangeTheme();
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index e2948c540..e243549e3 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -166,9 +166,6 @@ namespace Flow.Launcher
// Force update position
UpdatePosition();
- // Refresh frame
- await _theme.RefreshFrameAsync();
-
// Initialize resize mode after refreshing frame
SetupResizeMode();
From 7c8a4379a33d9e1fbd0c64d713519d5e8d455831 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sat, 10 May 2025 22:56:48 +1000
Subject: [PATCH 0932/1442] fix clearing of results logic & minor adjustment to
results update (#3524)
---
Flow.Launcher/ViewModel/MainViewModel.cs | 64 ++++++++++++---------
Flow.Launcher/ViewModel/ResultsForUpdate.cs | 3 +-
Flow.Launcher/ViewModel/ResultsViewModel.cs | 11 +++-
3 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index c0b74dc68..0c299875f 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -33,7 +33,7 @@ namespace Flow.Launcher.ViewModel
private bool _isQueryRunning;
private Query _lastQuery;
- private bool _lastIsHomeQuery;
+ private bool _previousIsHomeQuery;
private string _queryTextBeforeLeaveResults;
private string _ignoredQueryText; // Used to ignore query text change when switching between context menu and query results
@@ -1264,7 +1264,7 @@ namespace Flow.Launcher.ViewModel
App.API.LogDebug(ClassName, $"Start query with ActionKeyword <{query.ActionKeyword}> and RawQuery <{query.RawQuery}>");
- var isHomeQuery = query.RawQuery == string.Empty;
+ var currentIsHomeQuery = query.RawQuery == string.Empty;
_updateSource?.Dispose();
@@ -1284,14 +1284,10 @@ namespace Flow.Launcher.ViewModel
// Update the query's IsReQuery property to true if this is a re-query
query.IsReQuery = isReQuery;
- // handle the exclusiveness of plugin using action keyword
- RemoveOldQueryResults(query, isHomeQuery);
-
- _lastQuery = query;
- _lastIsHomeQuery = isHomeQuery;
+
ICollection plugins = Array.Empty();
- if (isHomeQuery)
+ if (currentIsHomeQuery)
{
if (Settings.ShowHomePage)
{
@@ -1347,7 +1343,7 @@ namespace Flow.Launcher.ViewModel
// plugins are ICollection, meaning LINQ will get the Count and preallocate Array
Task[] tasks;
- if (isHomeQuery)
+ if (currentIsHomeQuery)
{
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
@@ -1397,7 +1393,7 @@ namespace Flow.Launcher.ViewModel
{
App.API.LogDebug(ClassName, $"Wait for querying plugin <{plugin.Metadata.Name}>");
- if (searchDelay && !isHomeQuery) // Do not delay for home query
+ if (searchDelay && !currentIsHomeQuery) // Do not delay for home query
{
var searchDelayTime = plugin.Metadata.SearchDelayTime ?? Settings.SearchDelayTime;
@@ -1410,7 +1406,7 @@ namespace Flow.Launcher.ViewModel
// Task.Yield will force it to run in ThreadPool
await Task.Yield();
- var results = isHomeQuery ?
+ var results = currentIsHomeQuery ?
await PluginManager.QueryHomeForPluginAsync(plugin, query, token) :
await PluginManager.QueryForPluginAsync(plugin, query, token);
@@ -1439,8 +1435,13 @@ namespace Flow.Launcher.ViewModel
App.API.LogDebug(ClassName, $"Update results for plugin <{plugin.Metadata.Name}>");
+ // Indicate if to clear existing results so to show only ones from plugins with action keywords
+ var shouldClearExistingResults = ShouldClearExistingResults(query, currentIsHomeQuery);
+ _lastQuery = query;
+ _previousIsHomeQuery = currentIsHomeQuery;
+
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, plugin.Metadata, query,
- token, reSelect)))
+ token, reSelect, shouldClearExistingResults)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
@@ -1542,25 +1543,36 @@ namespace Flow.Launcher.ViewModel
}
}
- private void RemoveOldQueryResults(Query query, bool isHomeQuery)
+ ///
+ /// Determines whether the existing search results should be cleared based on the current query and the previous query type.
+ /// This is needed because of the design that treats plugins with action keywords and global action keywords separately. Results are gathered
+ /// either from plugins with matching action keywords or global action keyword, but not both. So when the current results are from plugins
+ /// with a matching action keyword and a new result set comes from a new query with the global action keyword, the existing results need to be cleared,
+ /// and vice versa. The same applies to home page query results.
+ ///
+ /// There is no need to clear results from global action keyword if a new set of results comes along that is also from global action keywords.
+ /// This is because the removal of obsolete results is handled in ResultsViewModel.NewResults(ICollection).
+ ///
+ /// The current query.
+ /// A flag indicating if the current query is a home query.
+ /// True if the existing results should be cleared, false otherwise.
+ private bool ShouldClearExistingResults(Query query, bool currentIsHomeQuery)
{
- // If last and current query are home query, we don't need to clear the results
- if (_lastIsHomeQuery && isHomeQuery)
+ // If previous or current results are from home query, we need to clear them
+ if (_previousIsHomeQuery || currentIsHomeQuery)
{
- return;
+ App.API.LogDebug(ClassName, $"Cleared old results");
+ return true;
}
- // If last or current query is home query, we need to clear the results
- else if (_lastIsHomeQuery || isHomeQuery)
+
+ // If the last and current query are not home query type, we need to check the action keyword
+ if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
{
- App.API.LogDebug(ClassName, $"Remove old results");
- Results.Clear();
- }
- // If last and current query are not home query, we need to check action keyword
- else if (_lastQuery?.ActionKeyword != query?.ActionKeyword)
- {
- App.API.LogDebug(ClassName, $"Remove old results");
- Results.Clear();
+ App.API.LogDebug(ClassName, $"Cleared old results");
+ return true;
}
+
+ return false;
}
private Result ContextMenuTopMost(Result result)
diff --git a/Flow.Launcher/ViewModel/ResultsForUpdate.cs b/Flow.Launcher/ViewModel/ResultsForUpdate.cs
index bc0be0de8..1563f85ba 100644
--- a/Flow.Launcher/ViewModel/ResultsForUpdate.cs
+++ b/Flow.Launcher/ViewModel/ResultsForUpdate.cs
@@ -9,7 +9,8 @@ namespace Flow.Launcher.ViewModel
PluginMetadata Metadata,
Query Query,
CancellationToken Token,
- bool ReSelectFirstResult = true)
+ bool ReSelectFirstResult = true,
+ bool shouldClearExistingResults = false)
{
public string ID { get; } = Metadata.ID;
}
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index 02fb379fa..cd2736afa 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -232,10 +232,15 @@ namespace Flow.Launcher.ViewModel
if (!resultsForUpdates.Any())
return Results;
+ var newResults = resultsForUpdates.SelectMany(u => u.Results, (u, r) => new ResultViewModel(r, _settings));
+
+ if (resultsForUpdates.Any(x => x.shouldClearExistingResults))
+ return newResults.OrderByDescending(rv => rv.Result.Score).ToList();
+
return Results.Where(r => r?.Result != null && resultsForUpdates.All(u => u.ID != r.Result.PluginID))
- .Concat(resultsForUpdates.SelectMany(u => u.Results, (u, r) => new ResultViewModel(r, _settings)))
- .OrderByDescending(rv => rv.Result.Score)
- .ToList();
+ .Concat(newResults)
+ .OrderByDescending(rv => rv.Result.Score)
+ .ToList();
}
#endregion
From 0c7d0e9300acd52dba2d03dc9f8f54501d01ee71 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 09:28:55 +0800
Subject: [PATCH 0933/1442] Support copy file name
---
.../ContextMenu.cs | 23 +++++++++++++++++++
.../Languages/en.xaml | 2 ++
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 1 -
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
index 633af7b6b..eabd118fb 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
@@ -140,6 +140,29 @@ namespace Flow.Launcher.Plugin.Explorer
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
});
+ contextMenus.Add(new Result
+ {
+ Title = Context.API.GetTranslation("plugin_explorer_copyname"),
+ SubTitle = Context.API.GetTranslation("plugin_explorer_copyname_subtitle"),
+ Action = _ =>
+ {
+ try
+ {
+ Context.API.CopyToClipboard(Path.GetFileName(record.FullPath));
+ return true;
+ }
+ catch (Exception e)
+ {
+ var message = "Fail to set text in clipboard";
+ LogException(message, e);
+ Context.API.ShowMsg(message);
+ return false;
+ }
+ },
+ IcoPath = Constants.CopyImagePath,
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
+ });
+
contextMenus.Add(new Result
{
Title = Context.API.GetTranslation("plugin_explorer_copyfilefolder"),
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
index f7d5bdb18..79f8a5848 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
@@ -82,6 +82,8 @@
Copy pathCopy path of current item to clipboard
+ Copy name
+ Copy name of current item to clipboardCopyCopy current file to clipboardCopy current folder to clipboard
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
index e4056131d..1c5d074a0 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
@@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using System.Windows;
using System.Windows.Controls;
using Flow.Launcher.Plugin.Explorer.Exceptions;
From 315de2b53146c0120c39e944254b0e7a15dc5295 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 09:44:43 +0800
Subject: [PATCH 0934/1442] Adjust margin in appearance page
---
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
index 37de80451..700dc3a91 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
@@ -733,7 +733,7 @@
From 4e6a07c0d7954cc5e2d27aa1421d2d74dcfc19da Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sun, 11 May 2025 11:49:52 +1000
Subject: [PATCH 0935/1442] Check spelling workflow ignore PRs targeting dev
branch
---
.github/workflows/spelling.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml
index 7aaa9296a..003022ac5 100644
--- a/.github/workflows/spelling.yml
+++ b/.github/workflows/spelling.yml
@@ -41,9 +41,8 @@ on:
# tags-ignore:
# - "**"
pull_request_target:
- branches:
- - '**'
- # - '!l10n_dev'
+ branches-ignore:
+ - dev
tags-ignore:
- "**"
types:
From 99a7081d1e60f2edcc5357f115f975fb2fc3b444 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sun, 11 May 2025 11:52:26 +1000
Subject: [PATCH 0936/1442] fix typo
---
.github/workflows/spelling.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml
index 003022ac5..47bd66107 100644
--- a/.github/workflows/spelling.yml
+++ b/.github/workflows/spelling.yml
@@ -42,7 +42,7 @@ on:
# - "**"
pull_request_target:
branches-ignore:
- - dev
+ - master
tags-ignore:
- "**"
types:
From 25d985b98ff4c6b7a90be4715ef6ff835e5de4a5 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 14:32:59 +0800
Subject: [PATCH 0937/1442] Fix Homepage with triggers history results on arrow
up
---
Flow.Launcher/ViewModel/MainViewModel.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 0c299875f..df4144510 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -518,9 +518,10 @@ namespace Flow.Launcher.ViewModel
[RelayCommand]
private void SelectPrevItem()
{
- if (_history.Items.Count > 0
- && QueryText == string.Empty
- && QueryResultsSelected())
+ if (QueryResultsSelected() // Results selected
+ && string.IsNullOrEmpty(QueryText) // No input
+ && Results.Visibility != Visibility.Visible // Results closed which means no items in Results
+ && _history.Items.Count > 0) // Have history items
{
lastHistoryIndex = 1;
ReverseHistory();
From af5ff430c47614824e84cc0ed5690bd34536aa90 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sun, 11 May 2025 18:16:29 +1000
Subject: [PATCH 0938/1442] update comment
---
Flow.Launcher/ViewModel/MainViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index df4144510..52581ea1d 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -520,7 +520,7 @@ namespace Flow.Launcher.ViewModel
{
if (QueryResultsSelected() // Results selected
&& string.IsNullOrEmpty(QueryText) // No input
- && Results.Visibility != Visibility.Visible // Results closed which means no items in Results
+ && Results.Visibility != Visibility.Visible // No items in result list, e.g. when home page is off and no query text is entered, therefore the view is collapsed.
&& _history.Items.Count > 0) // Have history items
{
lastHistoryIndex = 1;
From 6ed5308896762787971ff6e085ac2995b50bcfdf Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 16:53:44 +0800
Subject: [PATCH 0939/1442] Fix null origin query issue
---
Flow.Launcher/Storage/TopMostRecord.cs | 18 +-----------------
Flow.Launcher/ViewModel/MainViewModel.cs | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 7f35904a5..327ad8336 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -12,9 +12,7 @@ namespace Flow.Launcher.Storage
internal bool IsTopMost(Result result)
{
- // origin query is null when user select the context menu item directly of one item from query list
- // in this case, we do not need to check if the result is top most
- if (records.IsEmpty || result.OriginQuery == null ||
+ if (records.IsEmpty ||
!records.TryGetValue(result.OriginQuery.RawQuery, out var value))
{
return false;
@@ -26,25 +24,11 @@ namespace Flow.Launcher.Storage
internal void Remove(Result result)
{
- // origin query is null when user select the context menu item directly of one item from query list
- // in this case, we do not need to remove the record
- if (result.OriginQuery == null)
- {
- return;
- }
-
records.Remove(result.OriginQuery.RawQuery, out _);
}
internal void AddOrUpdate(Result result)
{
- // origin query is null when user select the context menu item directly of one item from query list
- // in this case, we do not need to add or update the record
- if (result.OriginQuery == null)
- {
- return;
- }
-
var record = new Record
{
PluginID = result.PluginID,
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 0c299875f..efa6dd39d 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -444,12 +444,7 @@ namespace Flow.Launcher.ViewModel
if (QueryResultsSelected())
{
_userSelectedRecord.Add(result);
- // origin query is null when user select the context menu item directly of one item from query list
- // so we don't want to add it to history
- if (result.OriginQuery != null)
- {
- _history.Add(result.OriginQuery.RawQuery);
- }
+ _history.Add(result.OriginQuery.RawQuery);
lastHistoryIndex = 1;
}
@@ -1158,7 +1153,7 @@ namespace Flow.Launcher.ViewModel
{
results = PluginManager.GetContextMenusForPlugin(selected);
results.Add(ContextMenuTopMost(selected));
- results.Add(ContextMenuPluginInfo(selected.PluginID));
+ results.Add(ContextMenuPluginInfo(selected));
}
if (!string.IsNullOrEmpty(query))
@@ -1592,7 +1587,8 @@ namespace Flow.Launcher.ViewModel
App.API.ReQuery();
return false;
},
- Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74B")
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74B"),
+ OriginQuery = result.OriginQuery
};
}
else
@@ -1609,15 +1605,17 @@ namespace Flow.Launcher.ViewModel
App.API.ReQuery();
return false;
},
- Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74A")
+ Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE74A"),
+ OriginQuery = result.OriginQuery
};
}
return menu;
}
- private static Result ContextMenuPluginInfo(string id)
+ private static Result ContextMenuPluginInfo(Result result)
{
+ var id = result.PluginID;
var metadata = PluginManager.GetPluginForId(id).Metadata;
var translator = App.API;
@@ -1639,7 +1637,8 @@ namespace Flow.Launcher.ViewModel
{
App.API.OpenUrl(metadata.Website);
return true;
- }
+ },
+ OriginQuery = result.OriginQuery
};
return menu;
}
From 0e6741cf3f7d6960df13fc7a53a24c8e8963a47d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 17:05:55 +0800
Subject: [PATCH 0940/1442] Improve code quality
---
Flow.Launcher/Storage/TopMostRecord.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Flow.Launcher/Storage/TopMostRecord.cs b/Flow.Launcher/Storage/TopMostRecord.cs
index 327ad8336..7714b5001 100644
--- a/Flow.Launcher/Storage/TopMostRecord.cs
+++ b/Flow.Launcher/Storage/TopMostRecord.cs
@@ -12,8 +12,7 @@ namespace Flow.Launcher.Storage
internal bool IsTopMost(Result result)
{
- if (records.IsEmpty ||
- !records.TryGetValue(result.OriginQuery.RawQuery, out var value))
+ if (records.IsEmpty || !records.TryGetValue(result.OriginQuery.RawQuery, out var value))
{
return false;
}
From 1775c0fd26cc2b1efd2d458131e735fc9f72cfbe Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Sun, 11 May 2025 20:27:09 +1000
Subject: [PATCH 0941/1442] New Crowdin updates (#3430)
---
Flow.Launcher/Languages/ar.xaml | 68 +++++++--
Flow.Launcher/Languages/cs.xaml | 68 +++++++--
Flow.Launcher/Languages/da.xaml | 134 +++++++++++-------
Flow.Launcher/Languages/de.xaml | 68 +++++++--
Flow.Launcher/Languages/es-419.xaml | 68 +++++++--
Flow.Launcher/Languages/es.xaml | 68 +++++++--
Flow.Launcher/Languages/fr.xaml | 62 ++++++--
Flow.Launcher/Languages/he.xaml | 77 +++++++---
Flow.Launcher/Languages/it.xaml | 68 +++++++--
Flow.Launcher/Languages/ja.xaml | 134 +++++++++++-------
Flow.Launcher/Languages/ko.xaml | 113 +++++++++------
Flow.Launcher/Languages/nb.xaml | 68 +++++++--
Flow.Launcher/Languages/nl.xaml | 68 +++++++--
Flow.Launcher/Languages/pl.xaml | 112 ++++++++++-----
Flow.Launcher/Languages/pt-br.xaml | 68 +++++++--
Flow.Launcher/Languages/pt-pt.xaml | 59 ++++++--
Flow.Launcher/Languages/ru.xaml | 68 +++++++--
Flow.Launcher/Languages/sk.xaml | 70 ++++++---
Flow.Launcher/Languages/sr.xaml | 68 +++++++--
Flow.Launcher/Languages/tr.xaml | 68 +++++++--
Flow.Launcher/Languages/uk-UA.xaml | 68 +++++++--
Flow.Launcher/Languages/vi.xaml | 68 +++++++--
Flow.Launcher/Languages/zh-cn.xaml | 68 +++++++--
Flow.Launcher/Languages/zh-tw.xaml | 68 +++++++--
.../Languages/ja.xaml | 14 +-
.../Languages/ko.xaml | 4 +-
.../Languages/pt-pt.xaml | 2 +-
.../Languages/ja.xaml | 6 +-
.../Languages/pt-pt.xaml | 2 +-
.../Languages/ja.xaml | 80 +++++------
.../Languages/pt-pt.xaml | 2 +-
.../Languages/ko.xaml | 4 +-
.../Languages/ar.xaml | 1 +
.../Languages/cs.xaml | 1 +
.../Languages/da.xaml | 1 +
.../Languages/de.xaml | 1 +
.../Languages/es-419.xaml | 1 +
.../Languages/es.xaml | 1 +
.../Languages/fr.xaml | 1 +
.../Languages/he.xaml | 1 +
.../Languages/it.xaml | 1 +
.../Languages/ja.xaml | 1 +
.../Languages/ko.xaml | 1 +
.../Languages/nb.xaml | 1 +
.../Languages/nl.xaml | 1 +
.../Languages/pl.xaml | 1 +
.../Languages/pt-br.xaml | 1 +
.../Languages/pt-pt.xaml | 1 +
.../Languages/ru.xaml | 1 +
.../Languages/sk.xaml | 1 +
.../Languages/sr.xaml | 1 +
.../Languages/tr.xaml | 1 +
.../Languages/uk-UA.xaml | 1 +
.../Languages/vi.xaml | 1 +
.../Languages/zh-cn.xaml | 1 +
.../Languages/zh-tw.xaml | 1 +
.../Languages/ar.xaml | 2 +-
.../Languages/cs.xaml | 2 +-
.../Languages/da.xaml | 2 +-
.../Languages/de.xaml | 2 +-
.../Languages/es-419.xaml | 2 +-
.../Languages/es.xaml | 2 +-
.../Languages/fr.xaml | 2 +-
.../Languages/he.xaml | 2 +-
.../Languages/it.xaml | 2 +-
.../Languages/ja.xaml | 22 +--
.../Languages/ko.xaml | 6 +-
.../Languages/nb.xaml | 2 +-
.../Languages/nl.xaml | 2 +-
.../Languages/pl.xaml | 2 +-
.../Languages/pt-br.xaml | 2 +-
.../Languages/pt-pt.xaml | 2 +-
.../Languages/ru.xaml | 2 +-
.../Languages/sk.xaml | 2 +-
.../Languages/sr.xaml | 2 +-
.../Languages/tr.xaml | 2 +-
.../Languages/uk-UA.xaml | 2 +-
.../Languages/vi.xaml | 2 +-
.../Languages/zh-cn.xaml | 2 +-
.../Languages/zh-tw.xaml | 2 +-
.../Languages/ja.xaml | 2 +-
.../Languages/he.xaml | 14 +-
.../Languages/ja.xaml | 28 ++--
.../Languages/ko.xaml | 2 +-
.../Languages/ja.xaml | 2 +-
.../Languages/ko.xaml | 12 +-
.../Properties/Resources.he-IL.resx | 16 +--
87 files changed, 1529 insertions(+), 606 deletions(-)
diff --git a/Flow.Launcher/Languages/ar.xaml b/Flow.Launcher/Languages/ar.xaml
index b5eafaae9..b81c5c9b5 100644
--- a/Flow.Launcher/Languages/ar.xaml
+++ b/Flow.Launcher/Languages/ar.xaml
@@ -42,6 +42,7 @@
وضع اللعبتعليق استخدام مفاتيح التشغيل السريع.إعادة تعيين الموقع
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
خطأ في إعداد التشغيل عند بدء التشغيلإخفاء Flow Launcher عند فقدان التركيزعدم عرض إشعارات الإصدار الجديد
- موضع نافذة البحث
+ Search Window Locationتذكر آخر موقعالشاشة مع مؤشر الماوسالشاشة مع النافذة المركزة
@@ -106,14 +107,35 @@
فتح لوحة المعاينة دائمًا عند تنشيط Flow. اضغط على {0} للتبديل بين المعاينة وعدمها.تأثير الظل غير مسموح به بينما يتم تمكين تأثير التمويه في السمة الحاليةSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ فتح
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.البحث عن إضافة
@@ -130,8 +152,13 @@
كلمة الفعل الحاليةكلمة فعل جديدةتغيير كلمات الفعل
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ مفع
+ الأولوي
+ Search Delay
+ Home Pageالأولوية الحاليةأولوية جديدةالأولوية
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Defaultمتجر الإضافات
@@ -184,6 +210,9 @@
خط عنوان النتيجةخط العنوان الفرعي للنتيجةإعادة التعيين
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.تخصيصوضع النافذةالشفافية
@@ -211,12 +240,13 @@
الساعةالتاريخBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveبلاAcrylicMicaMica Alt
- هذه السمة تدعم الوضعين (فاتح/داكن).
+ This theme supports two (light/dark) modes.هذه السمة تدعم الخلفية الضبابية الشفافة.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
استخدام أيقونات Segoe Fluentاستخدام أيقونات Segoe Fluent لنتائج الاستعلام حيثما كان مدعومًااضغط على المفتاح
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query Onlyبروكسي HTTP
@@ -323,6 +356,7 @@
مجلد السجلاتمسح السجلاتهل أنت متأكد أنك تريد حذف جميع السجلات؟
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window Fontاختر مدير الملفات
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneنجاحاكتمل بنجاح
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.مفتاح اختصار الاستعلام المخصص
diff --git a/Flow.Launcher/Languages/cs.xaml b/Flow.Launcher/Languages/cs.xaml
index 806e9f203..71c9c8c6b 100644
--- a/Flow.Launcher/Languages/cs.xaml
+++ b/Flow.Launcher/Languages/cs.xaml
@@ -42,6 +42,7 @@
Herní režimPotlačit užívání klávesových zkratek.Obnovit pozici
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Při nastavování spouštění došlo k chyběSkrýt Flow Launcher při vykliknutíNezobrazovat oznámení o nové verzi
- Pozice vyhledávacího okna
+ Search Window LocationZapamatovat poslední poziciObrazovka s kurzoremObrazovka s aktivním oknem
@@ -106,14 +107,35 @@
Při aktivaci služby Flow vždy otevřete panel náhledu. Stisknutím klávesy {0} přepnete náhled.Stínový efekt není povolen, pokud je aktivní efekt rozostřeníSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Otevřít
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Vyhledat plugin
@@ -130,8 +152,13 @@
Aktuální aktivační příkazNový aktivační příkazUpravit aktivační příkaz
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Povoleno
+ Priorita
+ Search Delay
+ Home PageAktuální prioritaNová prioritaPriorita
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultObchod s pluginy
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeRežim oknaNeprůhlednost
@@ -211,12 +240,13 @@
HodinyDatumBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Použít ikony Segoe FluentPoužití ikon Segoe Fluent, pokud jsou podporoványStiskněte klávesu
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP Proxy
@@ -323,6 +356,7 @@
Složka s logyVymazat logyOpravdu chcete odstranit všechny logy?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontVybrat správce souborů
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneÚspěšnéÚspěšně dokončeno
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Vlastní klávesová zkratka pro vyhledávání
diff --git a/Flow.Launcher/Languages/da.xaml b/Flow.Launcher/Languages/da.xaml
index 6055a79e1..37723dc9b 100644
--- a/Flow.Launcher/Languages/da.xaml
+++ b/Flow.Launcher/Languages/da.xaml
@@ -30,32 +30,33 @@
IndstillingerOmAfslut
- Close
+ LukCopy
- Cut
- Paste
+ Klip
+ IndsætUndoSelect AllFileFolderTextGame Mode
- Suspend the use of Hotkeys.
+ Suspender brugen af genvejstaster.Position Reset
+ Reset search window positionType here to searchIndstillingerGenereltPortable Mode
- Store all settings and user data in one folder (Useful when used with removable drives or cloud services).
+ Gem alle indstillinger og brugerdata i én mappe (nyttigt ved brug af flytbare drev eller cloud-tjenester).Start Flow Launcher ved system startUse logon task instead of startup entry for faster startup experienceAfter uninstallation, you need to manually remove this task (Flow.Launcher Startup) via Task SchedulerError setting launch on startupSkjul Flow Launcher ved mistet fokusVis ikke notifikationer om nye versioner
- Search Window Position
+ Search Window LocationRemember Last PositionMonitor with Mouse CursorMonitor with Focused Window
@@ -104,16 +105,37 @@
Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.Always PreviewAlways open preview panel when Flow activates. Press {0} to toggle preview.
- Shadow effect is not allowed while current theme has blur effect enabled
+ Skyggeeffekt er ikke tilladt, når det aktuelle tema har sløringseffekt aktiveretSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Åben
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -123,40 +145,44 @@
PluginPluginsFind flere plugins
- On
+ TilDeaktiverAction keyword SettingNøgleordCurrent action keywordNew action keywordChange Action Keywords
- Plugin seach delay time
- Change Plugin Seach Delay Time
- Current Priority
- New Priority
- Priority
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Prioritet
+ Search Delay
+ Home Page
+ Nuværende prioritet
+ Ny prioritet
+ PrioritetChange Plugin Results PriorityPlugin bibliotekafInitaliseringstid:Søgetid:Version
- Website
+ HjemmesideUninstallFail to remove plugin settingsPlugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Default
- Plugin Store
+ Plugin-butikNew ReleaseRecently UpdatedPluginsInstalledRefresh
- Install
+ InstallerUninstallOpdaterPlugin already installed
@@ -168,8 +194,8 @@
TemaAppearanceSøg efter flere temaer
- How to create a theme
- Hi There
+ Hvordan man opretter et tema
+ HejsaExplorerSearch for files, folders and file contentsWebSearch
@@ -184,18 +210,21 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeVindue modeGennemsigtighed
- Theme {0} not exists, fallback to default theme
- Fail to load theme {0}, fallback to default theme
- Theme Folder
- Open Theme Folder
- Color Scheme
- System Default
- Light
- Dark
- Sound Effect
+ Temaet {0} findes ikke. Falder tilbage til standardtema
+ Kunne ikke indlæse temaet {0}. Falder tilbage til standardtema
+ Temamappe
+ Åbn temamappe
+ Farveskema
+ Systemstandard
+ Lys
+ Mørk
+ LydeffektPlay a small sound when the search window opensSound Effect VolumeAdjust the volume of the sound effect
@@ -211,12 +240,13 @@
ClockDateBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Use Segoe Fluent IconsUse Segoe Fluent Icons for query results where supportedPress Key
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP Proxy
@@ -302,7 +335,7 @@
Om
- Website
+ HjemmesideGitHubDocsVersion
@@ -323,6 +356,7 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,29 +367,30 @@
Log LevelDebugInfo
+ Setting Window FontSelect File ManagerPlease specify the file location of the file manager you using and add arguments as required. The "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" represents the file path to open for, used by the Arg for File field and for commands opening specific files.For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank.
- File Manager
- Profile Name
- File Manager Path
- Arg For Folder
- Arg For File
+ Filhåndtering
+ Profilnavn
+ Sti til filhåndtering
+ Arg for mappe
+ Arg for filDefault Web BrowserThe default setting follows the OS default browser setting. If specified separately, flow uses that browser.BrowserBrowser Name
- Browser Path
+ Sti til browserNew WindowNew Tab
- Private Mode
+ Privattilstand
- Change Priority
+ Skift prioritetGreater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative numberPlease provide an valid integer for Priority!
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneFortsætCompleted successfully
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Tilpasset søgegenvejstast
diff --git a/Flow.Launcher/Languages/de.xaml b/Flow.Launcher/Languages/de.xaml
index 4fb441d8c..895a2dab6 100644
--- a/Flow.Launcher/Languages/de.xaml
+++ b/Flow.Launcher/Languages/de.xaml
@@ -42,6 +42,7 @@
SpielmodusAussetzen der Verwendung von Hotkeys.Position zurücksetzen
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Fehler bei Einstellungsstart beim StartFlow Launcher ausblenden, wenn Fokus verloren gehtVersionsbenachrichtigungen nicht zeigen
- Position des Suchfensters
+ Search Window LocationLetzte Position merkenMonitor mit MauscursorMonitor mit fokussiertem Fenster
@@ -106,14 +107,35 @@
Vorschau-Panel immer öffnen, wenn Flow aktiviert ist. Drücken Sie {0}, um Vorschau umzuschalten.Schatteneffekt ist nicht erlaubt, während das aktuelle Theme den Unschärfe-Effekt aktiviert hatSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Öffnen
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Plug-in suchen
@@ -130,8 +152,13 @@
Aktuelles Action-SchlüsselwortNeues Aktions-SchlüsselwortAktions-Schlüsselwörter ändern
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Aktiviert
+ Priorität
+ Search Delay
+ Home PageAktuelle PrioritätNeue PrioritätPriorität
@@ -147,7 +174,6 @@
Plug-ins: {0} - Plug-in-Einstellungsdateien können nicht entfernt werden, bitte entfernen Sie diese manuellFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultPlug-in-Store
@@ -184,6 +210,9 @@
Schriftart des ErgebnistitelsSchriftart des Ergebnis-UntertitelsZurücksetzen
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.Individuell anpassenFenstermodusOpazität
@@ -211,12 +240,13 @@
UhrDatumBackdrop-Typ
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveKeineAcrylicMicaMica Alt
- Dieses Theme unterstützt zwei Modi (hell/dunkel).
+ This theme supports two (light/dark) modes.Dieses Theme unterstützt Unschärfe und transparenten Hintergrund.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Segoe Fluent-Icons verwendenSegoe Fluent-Icons für Abfrageergebnisse verwenden, wo unterstütztTaste drücken
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP-Proxy
@@ -323,6 +356,7 @@
Ordner »Logs«Logs löschenSind Sie sicher, dass Sie alle Logs löschen wollen?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log-EbeneDebugInfo
+ Setting Window FontDateimanager auswählen
@@ -370,13 +405,16 @@
Dieses neue Aktions-Schlüsselwort ist dasselbe wie das alte, bitte wählen Sie ein anderesErfolgErfolgreich abgeschlossen
+ Failed to copyGeben Sie die Aktions-Schlüsselwörter ein, die Sie zum Starten des Plug-ins verwenden möchten, und trennen Sie sie durch Leerzeichen voneinander ab. Verwenden Sie *, wenn Sie keine spezifizieren möchten, und das Plug-in wird ohne jegliche Aktions-Schlüsselwörter ausgelöst.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Benutzerdefinierter Abfrage-Hotkey
diff --git a/Flow.Launcher/Languages/es-419.xaml b/Flow.Launcher/Languages/es-419.xaml
index 23d58eca3..902811a56 100644
--- a/Flow.Launcher/Languages/es-419.xaml
+++ b/Flow.Launcher/Languages/es-419.xaml
@@ -42,6 +42,7 @@
Modo de juegoSuspender el uso de las teclas de acceso directo.Position Reset
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Error setting launch on startupOcultar Flow Launcher cuando se pierde el enfoqueNo mostrar notificaciones de nuevas versiones
- Search Window Position
+ Search Window LocationRemember Last PositionMonitor with Mouse CursorMonitor with Focused Window
@@ -106,14 +107,35 @@
Always open preview panel when Flow activates. Press {0} to toggle preview.El efecto de sombra no está permitido mientras el tema actual tenga el efecto de desenfoque habilitadoSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Abrir
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -130,8 +152,13 @@
Palabra clave actualNueva palabra claveCambiar palabras clave
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Prioridad
+ Search Delay
+ Home PagePrioridad ActualNueva PrioridadPrioridad
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultTienda de Plugins
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeModo VentanaOpacidad
@@ -211,12 +240,13 @@
ClockDateBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Usar Iconos de Segoe FluentUsar iconos de Segoe Fluent para resultados de consultas que sean soportadosPress Key
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyProxy HTTP
@@ -323,6 +356,7 @@
Carpeta de registrosClear LogsAre you sure you want to delete all logs?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontSeleccionar Gestor de Archivos
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneÉxitoCompletado con éxito
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Tecla de Acceso Personalizada
diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml
index 8b3c42fa6..0dc6833af 100644
--- a/Flow.Launcher/Languages/es.xaml
+++ b/Flow.Launcher/Languages/es.xaml
@@ -42,6 +42,7 @@
Modo JuegoSuspende el uso de atajos de teclado.Restablecer posición
+ Restablece la posición de la ventana de búsquedaEscribir aquí para buscar
@@ -106,14 +107,35 @@
Muestra siempre el panel de vista previa al iniciar Flow. Pulsar {0} para mostrar/ocultar la vista previa.El efecto de sombra no está permitido si el tema actual tiene activado el efecto de desenfoqueRetardo de búsqueda
- Retrasa un poco la búsqueda al escribir. Esto reduce los saltos en la interfaz y la carga de resultados.
+ Añade un breve retardo al escribir para reducir el parpadeo de la interfaz de usuario y la carga de resultados. Recomendado si la velocidad de escritura es media.
+ Introduzca el tiempo de espera (en ms) hasta que la entrada se considere completa. Solo se puede editar cuando el retardo de búsqueda está activado.Tiempo de retardo de búsqueda predeterminado
- Tiempo de retardo predeterminado del complemento tras el que aparecerán los resultados de la búsqueda cuando se deje de escribir.
- Muy largo
- Largo
- Normal
- Corto
- Muy corto
+ Tiempo de espera antes de mostrar los resultados después de dejar de teclear. A mayor valor, más tiempo de espera. (ms)
+ Información para usuario de IME coreano
+
+ El método de entrada coreano utilizado en Windows 11 puede causar algunos problemas en Flow Launcher.
+
+ Si se experimenta algún problema, es posible que se tenga que activar "Usar versión anterior del IME coreano".
+
+
+ Abrir Configuración en Windows 11 e ir a:
+
+ Hora e idioma > Idioma y región > Coreano > Opciones de idioma > Teclado - Microsoft IME > Compatibilidad,
+
+ y activar "Usar versión anterior de Microsoft IME".
+
+
+
+ Abrir idioma y región en configuración
+ Abre la ubicación de configuración del IME coreano. Ir a Coreano > Opciones de idioma > Teclado - Microsoft IME > Compatibilidad
+ Abrir
+ Utilizar IME Coreano anterior
+ Se puede cambiar la configuración anterior del IME coreano directamente desde aquí
+ Página de inicio
+ Muestra los resultados de la página de inicio cuando el texto de la consulta está vacío.
+ Mostrar historial de resultados en la página de inicio
+ Número máximo de resultados del historial en la página de inicio
+ Esto solo se puede editar si el complemento soporta la función de Inicio y la Página de Inicio está activada.Buscar complemento
@@ -131,7 +153,12 @@
Nueva palabra clave de acciónCambia la palabra clave de acciónTiempo de retardo de la búsqueda del complemento
- Cambiar tiempo de retardo de la búsqueda del complemento
+ Cambia el tiempo de retardo de la búsqueda del complemento
+ Configuración avanzada:
+ Activado
+ Prioridad
+ Retardo de búsqueda
+ Página de inicioPrioridad actualNueva prioridadPrioridad
@@ -147,7 +174,6 @@
Complementos: {0} - Fallo al eliminar los archivos de configuración del complemento, por favor elimínelos manualmenteFallo al eliminar la caché del complementoComplementos: {0} - Fallo al eliminar los archivos de caché del complemento, por favor elimínelos manualmente
- PredeterminadoTienda complementos
@@ -184,6 +210,9 @@
Fuente del título del resultadoFuente del subtítulo del resultadoRestablecer
+ Restablece la configuración recomendada para la fuente y el tamaño.
+ Importar tamaño del tema
+ Si existe un valor de tamaño del tema previsto por el diseñador, este se recuperará y aplicará.PersonalizaModo VentanaOpacidad
@@ -211,6 +240,7 @@
RelojFechaTipo de telón de fondo
+ El efecto de telón de fondo no se aplica en la vista previa.Telón de fondo compatible a partir de Windows 11 build 22000 y superioresNingunoAcrílico
@@ -283,6 +313,9 @@
Iconos Segoe FluentUtiliza iconos Segoe Fluent para los resultados de la consulta cuando sean compatiblesPulsar Tecla
+ Mostrar distintivos en resultados
+ Para los complementos compatibles, se muestran distintivos que ayudan a distinguirlos más fácilmente.
+ Mostrar distintivos en resultados solo para consulta globalProxy HTTP
@@ -323,9 +356,10 @@
Carpeta de registrosEliminar registros¿Está seguro de que desea eliminar todos los registros?
- Clear Caches
- Are you sure you want to delete all caches?
- Failed to clear part of folders and files. Please see log file for more information
+ Carpeta del caché
+ Limpiar cachés
+ ¿Está seguro de que desea eliminar todos los cachés?
+ No se pudo eliminar parte de las carpetas y archivos. Por favor, consulte el archivo de registro para más informaciónAsistenteUbicación de datos del usuarioLa configuración del usuario y los complementos instalados se guardan en la carpeta de datos del usuario. Esta ubicación puede variar dependiendo de si está en modo portable o no.
@@ -333,6 +367,7 @@
Nivel de registroDepurarInformación
+ Configuración de fuente de la ventanaSeleccionar administrador de archivos
@@ -370,13 +405,16 @@
Esta nueva palabra clave de acción es la misma que la anterior, por favor elija una diferenteCorrectoFinalizado correctamente
+ No se pudo copiarIntroduzca las palabras clave de acción que desea utilizar para iniciar el complemento y utilice espacios en blanco para separarlas. Utilice * si no desea especificar ninguna, para que el complemento se inicie sin ninguna palabra clave de acción.Ajuste del tiempo de retardo de búsqueda
- Seleccionar el tiempo de retardo de búsqueda que se desea utilizar para el complemento. Seleccionar "{0}" si no se desea especificar nada, y el complemento utilizará el tiempo de retardo de búsqueda predeterminado.
- Tiempo de retardo de búsqueda actual
- Nuevo tiempo de retardo de búsqueda
+ Introducir el tiempo de retardo de búsqueda en ms que se desea utilizar para el complemento. Introducir un espacio vacío si no desea especificar ninguno, y el complemento utilizará el tiempo de retardo de búsqueda predeterminado.
+
+
+ Página de inicio
+ Activar el estado de la página de inicio del complemento si se desea mostrar los resultados del complemento cuando la consulta está vacía.Atajo de teclado de consulta personalizada
diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml
index e46e0dc9d..41fdbaa51 100644
--- a/Flow.Launcher/Languages/fr.xaml
+++ b/Flow.Launcher/Languages/fr.xaml
@@ -42,6 +42,7 @@
Mode jeuSuspend l'utilisation des raccourcis claviers.Réinitialiser la position
+ Réinitialiser la position de la fenêtre de rechercheTapez ici pour rechercher
@@ -55,7 +56,7 @@
Erreur lors de la configuration du lancement au démarrageCacher Flow Launcher lors de la perte de focusNe pas afficher le message de mise à jour pour les nouvelles versions
- Position de la fenêtre de recherche
+ Emplacement de la fenêtre de rechercheSe souvenir de la dernière positionSurveiller avec le curseur de la sourisSurveiller avec la fenêtre ciblée
@@ -106,14 +107,35 @@
Toujours ouvrir le panneau d'aperçu lorsque Flow s'active. Appuyez sur {0} pour activer/désactiver l'aperçu.L'effet d'ombre n'est pas autorisé lorsque le thème actuel à un effet de flou activéDélai de recherche
- Attendre un certain temps pour effectuer une recherche lors de la saisie. Cela permet de réduire les sauts d'interface et la charge des résultats.
+ Ajoute un court délai pendant la frappe pour réduire le scintillement de l'interface utilisateur et le chargement des résultats. Recommandé si votre vitesse de frappe est moyenne.
+ Entrez le temps d'attente (en ms) jusqu'à ce que l'entrée soit considérée comme terminée. Cela ne peut être modifié que si le délai de recherche est activé.Délai de recherche par défaut
- Délai par défaut du plugin après lequel les résultats de la recherche s'affichent lorsque la saisie est interrompue.
- Très long
- Long
- Normal
- Court
- Très court
+ Délai d'attente avant l'affichage des résultats après l'arrêt de la saisie. Les valeurs élevées permettent d'attendre plus longtemps. (ms)
+ Information pour les utilisateurs coréens IME
+
+ La méthode de saisie coréenne utilisée dans Windows 11 peut causer des problèmes dans Flow Launcher.
+
+ Si vous rencontrez des problèmes, il se peut que vous deviez activer l'option "Utiliser la version précédente de l'IME coréen".
+
+
+ Ouvrez les Paramètres dans Windows 11 et allez dans :
+
+ Heure et langue > Langue et région > Coréen > Options linguistiques > Claviers - Microsoft IME > Compatibilité,
+
+ et activez l'option "Utiliser la version précédente de Microsoft IME".
+
+
+
+ Ouvrir les paramètres du système de langue et de région
+ Ouvre l'emplacement de réglage IME coréen. Allez dans coréen > Options linguistiques > Claviers - Microsoft IME > Compatibilité
+ Ouvrir
+ Utilisez l'IME coréenne précédente
+ Vous pouvez modifier les paramètres de l'IME coréen précédent directement à partir d'ici
+ Page d'accueil
+ Afficher les résultats de la page d'accueil lorsque le texte de la requête est vide.
+ Afficher les résultats de l'historique sur la page d'accueil
+ Maximum de résultats de l'historique affichés sur la page d'accueil
+ Ceci ne peut être édité que si le plugin prend en charge la fonction Accueil et que la page d'accueil est activée.Rechercher des plugins
@@ -132,6 +154,11 @@
Changer les mots-clés d'actionDélai de recherche du pluginModifier le délai de recherche du plugin
+ Paramètres avancés :
+ Activé
+ Priorité
+ Délai de recherche
+ Page d'accueilPriorité actuelleNouvelle prioritéPriorité
@@ -147,7 +174,6 @@
Plugins : {0} - Échec de la suppression des fichiers de configuration des plugins, veuillez les supprimer manuellementÉchec de la suppression du cache du pluginPlugins : {0} - Échec de la suppression des fichiers cache des plugins, veuillez les supprimer manuellement
- DéfautMagasin des Plugins
@@ -184,6 +210,9 @@
Police du titre du résultatPolice des sous-titres du résultatRéinitialiser
+ Rétablir les paramètres de police et de taille recommandés.
+ Importer la taille du thème
+ Si une valeur de taille prévue par le concepteur du thème est disponible, elle sera récupérée et appliquée.PersonnaliserMode fenêtréOpacité
@@ -211,6 +240,7 @@
HeureDateType d'arrière-plan
+ L'effet de fond n'est pas appliqué dans l'aperçu.Arrière-plan pris en charge à partir de Windows 11 version 22000 et plusAucunAcrylique
@@ -283,6 +313,9 @@
Utiliser les icônes Segoe FluentUtiliser les icônes Segoe Fluent pour les résultats de requête lorsque pris en chargeAppuyez sur une touche
+ Afficher les badges de résultats
+ Pour les plugins pris en charge, des badges sont affichés afin de les distinguer plus facilement.
+ Afficher les badges de résultats pour la requête globale uniquementProxy HTTP
@@ -322,6 +355,7 @@
Répertoire des journauxEffacer le journalÊtes-vous sûr de vouloir supprimer tous les journaux ?
+ Dossier de cacheVider les cachesÊtes-vous sûr de vouloir supprimer tous les caches ?Échec de l'effacement d'une partie des dossiers et des fichiers. Veuillez consulter le fichier journal pour plus d'informations
@@ -332,6 +366,7 @@
Niveau de journalisationDébogageInfo
+ Réglage de la police de la fenêtreSélectionner le gestionnaire de fichiers
@@ -369,13 +404,16 @@
Ce nouveau mot-clé d'action est identique à l'ancien, veuillez en choisir un autreAjoutTerminé avec succès
+ Échec de la copieSaisissez les mots-clés d'action que vous souhaitez utiliser pour lancer le plugin et séparez-les par des espaces. Utilisez * si vous ne voulez en spécifier aucun, et le plugin sera déclenché sans aucun mot-clé d'action.Réglage du délai de recherche
- Sélectionnez le délai de recherche que vous souhaitez utiliser pour le plugin. Sélectionnez "{0}" si vous ne voulez pas en spécifier, et le plugin utilisera le délai de recherche par défaut.
- Délai de recherche actuel
- Nouveau délai de recherche
+ Entrez le délai de recherche en ms que vous souhaitez utiliser pour le plugin. Laissez la case vide et le plugin utilisera le délai de recherche par défaut.
+
+
+ Page d'accueil
+ Activez l'état de la page d'accueil du plugin si vous souhaitez afficher les résultats du plugin lorsque la requête est vide.Requêtes personnalisées
diff --git a/Flow.Launcher/Languages/he.xaml b/Flow.Launcher/Languages/he.xaml
index 38e943cda..52eaf5e9f 100644
--- a/Flow.Launcher/Languages/he.xaml
+++ b/Flow.Launcher/Languages/he.xaml
@@ -42,6 +42,7 @@
מצב משחקהשהה את השימוש במקשי קיצור.איפוס מיקום
+ אפס את מיקום חלון החיפושהקלד כאן כדי לחפש
@@ -55,7 +56,7 @@
שגיאה בהגדרת ההפעלה בעת הפעלת windowsהסתר את Flow Launcher כאשר הוא אינו החלון הפעילאל תציג התראות על גרסה חדשה
- מיקום חלון החיפוש
+ מיקום חלון חיפושזכור את המיקום האחרוןMonitor with Mouse CursorMonitor with Focused Window
@@ -105,21 +106,41 @@
הצג תמיד תצוגה מקדימהפתח תמיד את לוח התצוגה המקדימה כאשר Flow מופעל. הקש על {0} כדי להחליף את התצוגה המקדימה.לא ניתן להחיל אפקט צל כאשר העיצוב הנוכחי מוגדר לאפקט טשטוש
- Search Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
- Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ השהיית חיפוש
+ מוסיף עיכוב קצר בזמן ההקלדה כדי להפחית קפיצות בממשק המשתמש ועומס בתוצאות. מומלץ אם מהירות ההקלדה שלך ממוצעת.
+ הזן את זמן ההמתנה (בשניות) עד שהקלט נחשב כמושלם. ניתן לערוך זאת רק אם השהיית חיפוש מופעלת.
+ זמן עיכוב חיפוש ברירת מחדל
+ זמן המתנה להצגת התוצאות לאחר שתפסיק להקליד. ערכים גבוהים יותר מייצגים המתנה רבה יותר. (שניות)
+ Information for Korean IME user
+
+ שיטת הקלט הקוריאנית שמשמשת ב־Windows 11 עלולה לגרום לבעיות מסוימות ב־Flow Launcher.
+
+ אם אתה נתקל בבעיות, ייתכן שתצטרך להפעיל את האפשרות "השתמש בגרסה הקודמת של IME הקוריאני".
+
+ פתח את ההגדרות ב־Windows 11 וגש אל:
+
+ זמן ושפה > שפה ואזור > קוריאנית > אפשרויות שפה > מקלדת - Microsoft IME > תאימות,
+
+ והפעל את האפשרות "השתמש בגרסה הקודמת של Microsoft IME".
+
+
+
+ פתח את הגדרות מערכת שפה ואזור
+ פותח את מיקום הגדרות ה־IME הקוריאני. עבור אל קוריאנית > אפשרויות שפה > מקלדת - Microsoft IME > תאימות
+ פתח
+ השתמש ב־IME הקוריאני הקודם
+ באפשרותך לשנות את הגדרות ה־IME הקוריאני הקודם ישירות מכאן
+ דף הבית
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.חפש תוסףCtrl+F לחיפוש תוסףלא נמצאו תוצאות
- Please try a different search.
+ אנא נסה חיפוש אחר.תוסףתוספיםמצא תוספים נוספים
@@ -130,8 +151,13 @@
מילת מפתח נוכחית לפעולהמילת מפתח חדשה לפעולהשנה מילות מפתח לפעולה
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ שנה את זמן השהיית חיפוש של תוסף
+ הגדרות מתקדמות:
+ מופעל
+ עדיפות
+ עיכוב חיפוש
+ דף הביתעדיפות נוכחיתעדיפות חדשהעדיפות
@@ -147,7 +173,6 @@
תוספים: {0} - נכשל בהסרת קבצי הגדרות התוסף, יש להסירם ידניתנכשל בהסרת מטמון התוסףתוספים: {0} - נכשל בהסרת קובצי מטמון התוסף, אנא הסר אותם ידנית
- Defaultחנות תוספים
@@ -184,6 +209,9 @@
גופן הכותרת לתוצאהגופן כותרת המשנה לתוצאהאפס
+ אפס להגדרות הגופן והגודל המומלצות.
+ ייבוא גודל ערכת נושא
+ אם ערך הגודל שתוכנן על ידי מעצב ערכת הנושא זמין, הוא יאוחזר ויוחל.התאם אישיתמצב חלוןשקיפות
@@ -211,12 +239,13 @@
שעוןתאריךסוג רקע
+ אפקט הרקע אינו מוחל בתצוגה המקדימה.התמיכה ב-Backdrop קיימת החל מ-Windows 11 build 22000 ומעלהללאאקריליקמיקהMica Alt
- ערכת נושא זאת תומך בשני מצבים (בהיר/כהה).
+ ערכת נושא זאת תומכת בשני מצבים (בהיר/כהה).ערכת נושא זו תומכת בטשטוש רקע שקוף.הצג מציין מיקוםהצג מציין מיקום כאשר השאילתה ריקה
@@ -283,6 +312,9 @@
השתמש ב-Segoe Fluent Iconsהשתמש ב-Segoe Fluent Icons לתוצאות חיפוש כאשר נתמךהקש על מקש
+ הצג תגי תוצאות
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP Proxy
@@ -323,6 +355,7 @@
תיקיית יומני רישוםנקה יומני רישוםהאם אתה בטוח שברצונך למחוק את כל היומנים?
+ תיקיית מטמוןנקה נתוני מטמוןהאם אתה בטוח שברצונך למחוק את כל הנתונים שבמטמון?נכשל ניקוי חלק מהתיקיות והקבצים. עיין בלוג לקבלת מידע נוסף
@@ -330,9 +363,10 @@
מיקום נתוני משתמשהגדרות המשתמש והתוספים המותקנים נשמרים בתיקיית נתוני המשתמש. מיקום זה עשוי להשתנות אם התוכנה במצב נייד.פתח תיקיה
- Log Level
+ רמת יומןניפוי שגיאותמידע
+ Setting Window Fontבחר מנהל קבצים
@@ -370,13 +404,16 @@
מילת הפעולה החדשה זהה לישנה, נא לבחור מילת פעולה שונההצליחהושלם בהצלחה
+ ההעתקה נכשלההזן את מילות הפעולה שבהן תרצה להשתמש כדי להפעיל את התוסף, והשתמש ברווחים כדי להפריד ביניהן. השתמש ב-* אם אינך רוצה להגדיר כלל, והתוסף יופעל ללא מילות פעולה.
- Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ הגדרת זמן עיכוב החיפוש
+ הזן את זמן עיכוב החיפוש בשניות שבו אתה רוצה להשתמש עבור התוסף. השאר ריק אם אינך רוצה לציין, והתוסף ישתמש בזמן ברירת המחדל לעיכוב חיפוש.
+
+
+ דף הבית
+ Enable the plugin home page state if you like to show the plugin results when query is empty.מקש קיצור לשאילתה מותאמת אישית
diff --git a/Flow.Launcher/Languages/it.xaml b/Flow.Launcher/Languages/it.xaml
index fd34bf366..1a356ad65 100644
--- a/Flow.Launcher/Languages/it.xaml
+++ b/Flow.Launcher/Languages/it.xaml
@@ -42,6 +42,7 @@
Modalità giocoSospendere l'uso dei tasti di scelta rapida.Ripristina Posizione
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Errore nell'impostazione del lancio all'avvioNascondi Flow Launcher quando perde il focusNon mostrare le notifiche per una nuova versione
- Posizione Finestra Di Ricerca
+ Search Window LocationRicorda L'Ultima PosizioneMonitora con il cursore del mouseMonitora con la finestra in primo piano
@@ -106,14 +107,35 @@
Apri sempre il pannello di anteprima quando Flow si attiva. Premi {0} per attivare l'anteprima.L'effetto ombra non è consentito mentre il tema corrente ha un effetto di sfocatura abilitatoSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Apri
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Plugin di ricerca
@@ -130,8 +152,13 @@
Parola chiave di azione correnteNuova parola chiave d'azioneCambia Keywords Azione
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Abilitato
+ Priorità
+ Search Delay
+ Home PagePriorità AttualeNuova PrioritàPriorità
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultNegozio dei Plugin
@@ -184,6 +210,9 @@
Font del Titolo del RisultatoFont del Sottotitolo del RisultatoResetta
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.PersonalizzaModalità finestraOpacità
@@ -211,12 +240,13 @@
OrologioDataBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveVuotoAcrylicMicaMica Alt
- Questo tema supporta due (chiaro/scuro) varianti.
+ This theme supports two (light/dark) modes.Questo tema supporta lo sfondo trasparente blurrato.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Usa Icone Segoe FluentUsa Icone Segoe Fluent per risultati di ricerca dove supportatePremi tasto
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyProxy HTTP
@@ -323,6 +356,7 @@
Cartella dei LogCancella i logSei sicuro di voler cancellare tutti i log?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontSeleziona Gestore File
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneSuccessoCompletato con successo
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Tasti scelta rapida per ricerche personalizzate
diff --git a/Flow.Launcher/Languages/ja.xaml b/Flow.Launcher/Languages/ja.xaml
index e6f2223cd..949fe5c99 100644
--- a/Flow.Launcher/Languages/ja.xaml
+++ b/Flow.Launcher/Languages/ja.xaml
@@ -28,7 +28,7 @@
最終実行時間:{0}開く設定
- Flow Launcherについて
+ 情報終了閉じるコピー
@@ -42,7 +42,8 @@
ゲームモードホットキーの使用を一時停止します。位置のリセット
- Type here to search
+ 検索ウィンドウの位置をリセット
+ ここに入力して検索設定
@@ -50,8 +51,8 @@
ポータブルモードすべての設定とユーザーデータを1つのフォルダに保存します(リムーバブルドライブやクラウドサービスで使用する場合に便利です)。スタートアップ時にFlow Launcherを起動する
- Use logon task instead of startup entry for faster startup experience
- After uninstallation, you need to manually remove this task (Flow.Launcher Startup) via Task Scheduler
+ 高速起動のためにスタートアップではなくログオンタスクを使用
+ アンインストール後は、「タスク スケジューラ」からこのタスク(Flow.Launcher Startup)を手動で削除する必要があります。Error setting launch on startupフォーカスを失った時にFlow Launcherを隠す最新版が入手可能であっても、アップグレードメッセージを表示しない
@@ -105,15 +106,36 @@
常にプレビューするFlow が有効になったとき、常にプレビューパネルを開きます。 {0} を押してプレビューの表示/非表示を切り替えます。現在のテーマでぼかしの効果が有効になっている場合、影の効果を有効にすることはできません
- Search Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ 検索遅延
+ 入力中に短い遅延を追加することで、UIのちらつきや結果の読み込みを軽減します。平均的なタイピング速度のユーザーにおすすめです。
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ 開く
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -130,8 +152,13 @@
Current action keywordNew action keywordChange Action Keywords
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ 詳細設定:
+ Enabled
+ 重要度
+ 検索遅延
+ Home PageCurrent PriorityNew Priority重要度
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Defaultプラグインストア
@@ -178,12 +204,15 @@
管理者または別のユーザーとしてプログラムを起動しますプロセスキラー不要なプロセスを終了します
- Search Bar Height
- Item Height
+ 検索バーの高さ
+ アイテムの高さ検索ボックスのフォントResult Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.Customizeウィンドウモード透過度
@@ -210,20 +239,21 @@
カスタム時刻日付
- Backdrop Type
- Backdrop supported starting from Windows 11 build 22000 and above
- None
- Acrylic
- Mica
- Mica Alt
- This theme supports two(light/dark) modes.
+ バックドロップの種類
+ プレビューではバックドロップ効果が適用されません。
+ バックドロップは Windows 11 ビルド 22000 以降でサポートされています。
+ なし
+ アクリル
+ マイカ
+ マイカ(代替)
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.
- Show placeholder
+ プレースホルダーを表示Display placeholder when query is empty
- Placeholder text
+ 検索欄の案内文Change placeholder text. Input empty will use: {0}
- Fixed Window Size
- The window size is not adjustable by dragging.
+ ウィンドウサイズの固定
+ ウィンドウのサイズを固定し、ドラッグでの変更を無効にします。ホットキー
@@ -238,8 +268,8 @@
Select a modifier key to open selected result via keyboard.ホットキーを表示Show result selection hotkey with results.
- Auto Complete
- Runs autocomplete for the selected items.
+ 自動補完
+ 選択された項目に対して自動補完を実行します。Select Next ItemSelect Previous ItemNext Page
@@ -253,7 +283,7 @@
Toggle Game ModeToggle HistoryOpen Containing Folder
- Run As Admin
+ 管理者として実行Refresh Search ResultsReload Plugins DataQuick Adjust Window Width
@@ -283,6 +313,9 @@
Use Segoe Fluent IconsUse Segoe Fluent Icons for query results where supportedPress Key
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP プロキシ
@@ -301,15 +334,15 @@
プロキシ接続に失敗しました
- Flow Launcherについて
+ 情報ウェブサイトGitHub
- Docs
+ ドキュメントバージョンIconsあなたはFlow Launcherを {0} 回利用しましたアップデートを確認する
- Become A Sponsor
+ スポンサーになる新しいバージョン {0} が利用可能です。Flow Launcherを再起動してください。アップデートの確認に失敗しました、api.github.com への接続とプロキシ設定を確認してください。
@@ -323,6 +356,7 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,9 +367,10 @@
Log LevelDebugInfo
+ Setting Window Font
- Select File Manager
+ デフォルトのファイルマネージャーPlease specify the file location of the file manager you using and add arguments as required. The "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" represents the file path to open for, used by the Arg for File field and for commands opening specific files.For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank.File Manager
@@ -345,7 +380,7 @@
Arg For File
- Default Web Browser
+ デフォルトのウェブブラウザーThe default setting follows the OS default browser setting. If specified separately, flow uses that browser.BrowserBrowser Name
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different one成功しましたCompleted successfully
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.
@@ -404,7 +442,7 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
保存Overwrite
-
+ キャンセルReset削除Update
@@ -456,14 +494,14 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
アップデートの詳細
- Skip
- Welcome to Flow Launcher
- Hello, this is the first time you are running Flow Launcher!
- Before starting, this wizard will assist in setting up Flow Launcher. You can skip this if you wish. Please choose a language
- Search and run all files and applications on your PC
- Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse.
- Flow Launcher starts with the hotkey below, go ahead and try it out now. To change it, click on the input and press the desired hotkey on the keyboard.
- Hotkeys
+ スキップ
+ Flow Launcherへようこそ
+ こんにちは!Flow Launcherを初めて起動されたんですね!
+ 開始する前に、このウィザードが Flow Launcher のセットアップをお手伝いします。ご希望の方はスキップできます。言語を選択してください。
+ PC上のファイルとアプリケーションの検索と実行
+ アプリケーション、ファイル、ブックマーク、YouTube、X などあらゆるものを検索して実行できます。マウスに触れることなく、キーボードだけで快適に操作できます。
+ Flow Launcher は以下のホットキーで起動します。さっそく試してみてください。変更するには、入力欄をクリックし、キーボードで希望のホットキーを押してください。
+ ホットキーAction Keyword and CommandsSearch the web, launch applications or run various functions through Flow Launcher plugins. Certain functions start with an action keyword, and if necessary, they can be used without action keywords. Try the queries below in Flow Launcher.Let's Start Flow Launcher
diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml
index 3aee3f5e4..9ae2e0195 100644
--- a/Flow.Launcher/Languages/ko.xaml
+++ b/Flow.Launcher/Languages/ko.xaml
@@ -18,7 +18,7 @@
Failed to register hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.
- Failed to unregister hotkey "{0}". Please try again or see log for details
+ 단축키 "{0}" 등록 해제에 실패했습니다. 다시 시도하시거나 로그를 확인하세요Flow Launcher{0}을 실행할 수 없습니다.Flow Launcher 플러그인 파일 형식이 유효하지 않습니다.
@@ -42,6 +42,7 @@
게임 모드단축키 사용을 일시중단합니다.창 위치 초기화
+ 검색창 위치 초기화검색어 입력
@@ -105,15 +106,27 @@
항상 미리보기Flow 사용시 항상 미리보기 패널을 열어둡니다. {0} 키를 눌러 프리뷰창을 켜고 끌 수 있습니다.반투명 흐림 효과를 사용하는 경우, 그림자 효과를 쓸 수 없습니다.
- Search Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
- Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ 검색 지연
+ 타이핑 중 UI 깜빡임과 결과 로드를 줄이기 위해 짧은 지연을 추가합니다. 타이핑 속도가 평균 수준이라면 권장합니다.
+ 입력이 완료된 것으로 감지될 때까지의 대기 시간(밀리초 단위)을 입력하세요. 이 항목은 검색 지연이 활성화된 경우에만 편집할 수 있습니다.
+ 기본 검색 지연 시간
+ 입력이 멈춘 후 결과를 표시하기까지의 대기 시간입니다. 값이 클수록 더 오래 기다립니다. (ms)
+ 한국어 IME 사용 안내
+
+ Windows 11에서 사용하는 한국어 IME가 Flow Launcher에서 일부 문제를 일으킬 수 있습니다. 문제가 발생하는 경우, “이전 버전의 Microsoft IME 사용” 옵션을 활성화해야 할 수 있습니다. Windows 11 설정을 열고 다음으로 이동하세요: 시간 및 언어 > 언어 및 지역 > 한국어 > 언어 옵션 > 키보드 옵션 – Microsoft IME > 호환성에서 “이전 버전의 Microsoft IME 사용"을 켭니다.
+
+
+
+ 시스템의 시간 및 언어 설정 열기
+ 한국어 IME 설정 위치를 엽니다. 한국어>언어 옵션>키보드 - Microsoft IME> 호환성으로 이동하세요
+ 열기
+ 이전 버전의 Microsoft IME 사용
+ 이전 버전의 IME를 사용하도록 시스템 설정을 변경합니다
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.플러그인 검색
@@ -130,8 +143,13 @@
현재 액션 키워드새 액션 키워드액션 키워드 변경
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ 고급 설정:
+ 켬
+ 중요
+ 검색 지연
+ Home Page현재 중요도:새 중요도:중요도
@@ -147,7 +165,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Default플러그인 스토어
@@ -172,18 +189,21 @@
안녕하세요!탐색기Search for files, folders and file contents
- WebSearch
- Search the web with different search engine support
+ 웹 검색
+ 다양한 검색 엔진을 통해 웹을 검색합니다프로그램Launch programs as admin or a different user
- ProcessKiller
- Terminate unwanted processes
+ 프로세스 킬러
+ 필요없는 프로세스를 종료합니다검색창 높이결과 항목 높이쿼리 상자 글꼴결과 제목 글꼴결과 부제목 글꼴초기화
+ 권장되는 글꼴 및 크기 설정으로 초기화 합니다.
+ 테마 크기 가져오기
+ 테마 디자이너가 의도한 크기 값이 존재하는 경우, 해당 값을 불러와 적용합니다.사용자 지정윈도우 모드투명도
@@ -211,19 +231,20 @@
시계날짜배경 효과 타입
- Backdrop supported starting from Windows 11 build 22000 and above
+ 프리뷰 영역에선 배경효과가 적용되지 않아요.
+ 배경 효과는 윈도우 11 빌드 22000 이상부터 지원합니다없음아크릴
- Mica
- Mica Alt
- This theme supports two(light/dark) modes.
- This theme supports Blur Transparent Background.
+ 마이카
+ 마이카 변형
+ This theme supports two (light/dark) modes.
+ 이 테마는 흐릿한 배경 효과를 지원합니다.안내 텍스트 표시입력 내용이 없을때 입력창 위치를 알 수 있는 텍스트를 표시합니다안내 텍스트안내 텍스트를 변경하세요. 아무것도 입력하지 않으면 다음을 사용합니다: "{0}"
- Fixed Window Size
- The window size is not adjustable by dragging.
+ 창 크기 고정
+ 창 크기를 드래그하여 조절할 수 없습니다.단축키
@@ -233,13 +254,13 @@
미리보기 전환미리보기 패널을 켜고 끌 때 사용할 단축키를 입력하세요.단축키 프리셋
- List of currently registered hotkeys
+ 현재 등록된 단축키 목록결과 선택 단축키결과 항목을 선택하는 단축키입니다.단축키 표시결과창에서 결과 선택 단축키를 표시합니다.자동 완성
- Runs autocomplete for the selected items.
+ 선택된 항목에 대해 자동 완성을 실행합니다.다음 항목 선택이전 항목 선택다음 페이지
@@ -247,7 +268,7 @@
이전 쿼리로 전환다음 쿼리로 전환콘텍스트 메뉴 열기
- Open Native Context Menu
+ 시스템 우클릭 메뉴 열기설정창 열기파일 경로 복사게임 모드 전환
@@ -283,6 +304,9 @@
플루언트 아이콘 사용결과 및 일부 메뉴에서 플루언트 아이콘을 사용합니다.사용할 키를 누르세요
+ 결과 뱃지 표시
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ 전역 검색 결과에서만 뱃지 표시HTTP 프록시
@@ -323,21 +347,23 @@
로그 폴더로그 삭제정말 모든 로그를 삭제하시겠습니까?
- Clear Caches
- Are you sure you want to delete all caches?
+ Cache Folder
+ 캐시 지우기
+ 모든 캐시를 삭제하시겠습니까?Failed to clear part of folders and files. Please see log file for more information마법사사용자 데이터 위치사용자 설정과 설치된 플러그인은 사용자 데이터 폴더에 저장됩니다. 이 위치는 휴대용 모드 활성화 여부에 따라 달라질 수 있습니다.폴더 열기
- Log Level
+ 로그 레벨DebugInfo
+ Setting Window Font파일관리자 선택
- Please specify the file location of the file manager you using and add arguments as required. The "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" represents the file path to open for, used by the Arg for File field and for commands opening specific files.
- For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank.
+ 사용 중인 파일 관리자의 파일 위치를 지정하고, 필요한 경우 인수를 추가하세요. "%d"는 열고자 하는 디렉터리 경로를 나타내며, 폴더용 인수 필드 및 특정 디렉터리를 여는 명령어에서 사용됩니다. "%f"는 열고자 하는 파일 경로를 나타내며, 파일용 인수 필드 및 특정 파일을 여는 명령어에서 사용됩니다.
+ 예를 들어, 파일 관리자가 totalcmd.exe /A c:\windows와 같은 명령어로 c:\windows 디렉터리를 연다면, 파일 관리자 경로는 totalcmd.exe가 되고, 폴더용 인수는 /A "%d"가 됩니다. QTTabBar와 같은 일부 파일 관리자는 경로만 전달하면 되는 경우가 있으므로, 이 경우에는 파일 관리자 경로에 "%d"를 입력하고 나머지 필드는 비워두세요.파일관리자프로필 이름파일관리자 경로
@@ -367,16 +393,19 @@
플러그인을 찾을 수 없습니다.새 액션 키워드를 입력하세요.새 액션 키워드가 할당된 플러그인이 이미 있습니다. 다른 액션 키워드를 입력하세요.
- This new Action Keyword is the same as old, please choose a different one
+ 이 새로운 액션 키워드는 기존 것과 동일합니다. 다른 키워드를 선택해주세요.성공성공적으로 완료했습니다.
+ Failed to copy플러그인을 실행할 때 사용할 액션 키워드를 입력하세요. 여러 개를 입력할 경우 공백으로 구분하세요. 아무 키워드도 지정하지 않으려면 * 를 입력하세요. 이 경우 액션 키워드 없이도 플러그인이 실행됩니다.
- Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ 검색 지연 시간 설정
+ 플러그인에서 사용할 검색 지연 시간(ms)을 입력하세요. 지정하지 않으려면 비워두세요. 기본 검색 지연 시간이 사용됩니다.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.사용자지정 쿼리 단축키
@@ -389,7 +418,7 @@
Current hotkey is unavailable.This hotkey is reserved for "{0}" and can't be used. Please choose another hotkey.This hotkey is already in use by "{0}". If you press "Overwrite", it will be removed from "{0}".
- Press the keys you want to use for this function.
+ 이 기능에 사용할 키를 눌러주세요.사용자 지정 쿼리 단축어
@@ -403,13 +432,13 @@ If you add an '@' prefix while inputting a shortcut, it matches any position in
저장
- Overwrite
+ 덮어쓰기취소
- Reset
+ 초기화삭제확인
- Yes
- No
+ 예
+ 아니오배경
diff --git a/Flow.Launcher/Languages/nb.xaml b/Flow.Launcher/Languages/nb.xaml
index b78bcb7d7..58571a1c4 100644
--- a/Flow.Launcher/Languages/nb.xaml
+++ b/Flow.Launcher/Languages/nb.xaml
@@ -42,6 +42,7 @@
SpillmodusStopp bruken av hurtigtaster.Tilbakestilling av posisjon
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Feil ved å sette kjør ved oppstartSkjul Flow Launcher når fokus forsvinnerIkke vis varsler om nye versjoner
- Posisjon til søkevindu
+ Search Window LocationHusk siste posisjonSkjerm med musepekerenSkjerm med fokusert vindu
@@ -106,14 +107,35 @@
Åpne alltid forhåndsvisningspanel når Flow aktiveres. Trykk på {0} for å velge forhåndsvisning.Skyggeeffekt er ikke tillatt mens gjeldende tema har uskarphet-effekt aktivertSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Åpne
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Søk etter programtillegg
@@ -130,8 +152,13 @@
Nåværende handlingsnøkkelordNytt handlingsnøkkelordEndre handlingsnøkkelord
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Aktivert
+ Prioritet
+ Search Delay
+ Home PageGjeldende prioritetNy prioritetPrioritet
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultProgramtillegg butikk
@@ -184,6 +210,9 @@
Skrift for resultattittelSkrift for resultatundertittelTilbakestill
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.TilpassVindumodusUgjennomsiktighet
@@ -211,12 +240,13 @@
KlokkeDatoBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveIngenAcrylicMicaMica Alt
- Dette temaet støtter to (lys/mørk) moduser.
+ This theme supports two (light/dark) modes.Dette temaet støtter uskarp gjennomsiktig bakgrunn.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Bruk Segoe Fluent ikonerBruk Segoe Fluent Icons for spørreresultater der det støttesTrykk tast
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP proxy
@@ -323,6 +356,7 @@
LoggmappeTøm loggerEr du sikker på at du vil slette alle loggene?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontVelg filbehandler
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneVellykketFullført vellykket
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Hurtigtast for egendefinert spørring
diff --git a/Flow.Launcher/Languages/nl.xaml b/Flow.Launcher/Languages/nl.xaml
index ce3406142..70a58e322 100644
--- a/Flow.Launcher/Languages/nl.xaml
+++ b/Flow.Launcher/Languages/nl.xaml
@@ -42,6 +42,7 @@
SpelmodusStop het gebruik van Sneltoetsen.Positie resetten
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Fout bij het instellen van uitvoeren bij opstartenVerberg Flow Launcher als focus verloren isLaat geen nieuwe versie notificaties zien
- Positie Zoekvenster
+ Search Window LocationLaatste Positie OnthoudenMonitor met MuiscursorMonitor met Gefocust Venster
@@ -106,14 +107,35 @@
Open altijd het voorbeeld paneel wanneer Flow activeert. Druk op {0} om voorbeeld te schakelen.Schaduw effect is niet toegestaan omdat het huidige thema een vervagingseffect heeftSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Openen
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Plug-ins zoeken
@@ -130,8 +152,13 @@
Huidige actie sneltoetsNieuw actie sneltoetsWijzig actie-sneltoets
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Priority
+ Search Delay
+ Home PageHuidige PrioriteitNieuwe PrioriteitPrioriteit
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultPlugin Winkel
@@ -184,6 +210,9 @@
Resultaat titel lettertypeResult Subtitle FontHerstellen
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.AanpassenVenster ModusOndoorzichtigheid
@@ -211,12 +240,13 @@
KlokDatumBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- Dit thema ondersteunt twee (licht/donker) modi.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Gebruik Segoe Fluent pictogrammenGebruik Segoe Fluent iconen voor zoekresultaten wanneer ondersteundPress Key
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP Proxy
@@ -323,6 +356,7 @@
Log MapLogbestanden wissenWeet u zeker dat u alle logbestanden wilt verwijderen?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontBestandsbeheerder selecteren
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneSuccesvolSuccesvol afgerond
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Custom Query Sneltoets
diff --git a/Flow.Launcher/Languages/pl.xaml b/Flow.Launcher/Languages/pl.xaml
index 12af37c3e..7cc6dfcb1 100644
--- a/Flow.Launcher/Languages/pl.xaml
+++ b/Flow.Launcher/Languages/pl.xaml
@@ -8,9 +8,9 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Wybierz plik wykonywalny {0}
- Your selected {0} executable is invalid.
+ Wybrany plik wykonywalny {0} jest nieprawidłowy.
{2}{2}
- Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
+ Kliknij Tak, jeśli chcesz ponownie wybrać plik wykonywalny {0}. Kliknij Nie, jeśli chcesz pobrać {1}
Nie można ustawić ścieżki do pliku wykonywalnego {0}. Spróbuj ponownie w ustawieniach Flow (przewiń na sam dół).Nie udało się zainicjować wtyczek
@@ -42,7 +42,8 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Tryb graniaWstrzymaj używanie skrótów.Resetowanie pozycji
- Type here to search
+ Zresetuj pozycję okna wyszukiwania
+ Wpisz tutaj, aby wyszukaćUstawienia
@@ -105,15 +106,36 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Zawsze podglądZawsze otwieraj panel podglądu, gdy aktywowany jest Flow. Naciśnij {0}, aby przełączyć podgląd.Efekt cienia jest niedozwolony, gdy bieżący motyw ma włączony efekt rozmycia
- Search Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
- Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Opóźnienie wyszukiwania
+ Dodaje krótkie opóźnienie podczas pisania, aby zmniejszyć migotanie interfejsu i obciążenie wynikami. Zalecane przy przeciętnej szybkości pisania.
+ Wprowadź czas oczekiwania (w ms), po którym wprowadzanie zostanie uznane za zakończone. Edycja jest możliwa tylko, gdy włączone jest Opóźnienie wyszukiwania.
+ Domyślne opóźnienie wyszukiwania
+ Opóźnienie (ms) przed pokazaniem wyników po zakończeniu pisania. Wyższe wartości oznaczają dłuższe oczekiwanie.
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Otwórz
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Szukaj wtyczek
@@ -130,8 +152,13 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Bieżące słowo kluczowe akcjiNowe słowo kluczowe akcjiZmień słowa kluczowe akcji
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Opóźnienie wyszukiwania wtyczek
+ Zmień opóźnienie wyszukiwania wtyczek
+ Ustawienia zaawansowane:
+ Aktywny
+ Priorytet
+ Opóźnienie wyszukiwania
+ Home PageObecny PriorytetNowy PriorytetPriorytet
@@ -145,9 +172,8 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
OdinstalowywanieNie udało się usunąć ustawień wtyczkiWtyczki: {0} – nie udało się usunąć plików ustawień wtyczek, usuń je ręcznie
- Fail to remove plugin cache
- Plugins: {0} - Fail to remove plugin cache files, please remove them manually
- Default
+ Nie udało się usunąć cache wtyczki
+ Wtyczki: {0} - Nie udało się usunąć plików cache wtyczki, usuń je ręcznieSklep z wtyczkami
@@ -184,6 +210,9 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Czcionka tytułu wynikuCzcionka podtytułu wynikuResetuj
+ Przywróć zalecane ustawienia czcionki i rozmiaru.
+ Rozmiar importu motywu
+ Jeśli wartość rozmiaru przewidziana przez projektanta motywu jest dostępna, zostanie pobrana i zastosowana.PersonalizujTryb w okniePrzeźroczystość
@@ -210,20 +239,21 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
NiestandardowaZegarData
- Backdrop Type
- Backdrop supported starting from Windows 11 build 22000 and above
+ Typ tła
+ Efekt tła nie jest stosowany w podglądzie.
+ Efekt tła obsługiwany od Windows 11 kompilacja 22000 i nowszychBrak
- Acrylic
- Mica
+ Akryl
+ MikaMica AltTen motyw obsługuje dwa tryby (jasny/ciemny).Ten motyw obsługuje rozmyte przezroczyste tło.
- Show placeholder
- Display placeholder when query is empty
- Placeholder text
- Change placeholder text. Input empty will use: {0}
- Fixed Window Size
- The window size is not adjustable by dragging.
+ Pokaż placeholder
+ Wyświetlaj placeholder, gdy zapytanie jest puste
+ Tekst placeholdera
+ Zmień tekst placeholdera. Jeśli pole będzie puste, zostanie użyty: {0}
+ Stały rozmiar okna
+ Nie można zmienić rozmiaru okna, przeciągając.Skrót klawiszowy
@@ -283,6 +313,9 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Użyj ikon Segoe FluentUżyj ikon Segoe Fluent dla wyników wyszukiwania, gdzie jest to obsługiwaneNaciśnij klawisz
+ Pokaż odznaki wyników
+ W przypadku wspieranych wtyczek wyświetlane są odznaki, aby łatwiej je rozróżnić.
+ Pokaż odznaki wyników tylko dla zapytań globalnychSerwer proxy HTTP
@@ -323,16 +356,18 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Folder dziennikaWyczyść logiCzy na pewno chcesz usunąć wszystkie logi?
- Clear Caches
- Are you sure you want to delete all caches?
- Failed to clear part of folders and files. Please see log file for more information
+ Cache Folder
+ Wyczyść pamięć podręczną
+ Czy na pewno chcesz usunąć wszystkie pamięci podręczne?
+ Nie udało się wyczyścić części folderów i plików. Więcej informacji w pliku dziennikaKreatorLokalizacja danych użytkownikaUstawienia użytkownika i zainstalowane wtyczki są zapisywane w folderze danych użytkownika. Ta lokalizacja może się różnić w zależności od tego, czy aplikacja jest w trybie przenośnym, czy nie.Otwórz folder
- Log Level
+ Poziom logowaniaDebugInfo
+ Ustawienia czcionki oknaWybierz menedżer plików
@@ -367,16 +402,19 @@ Kliknij "nie", jeśli jest już zainstalowany. Zostaniesz wtedy popros
Nie można odnaleźć podanej wtyczkiNowy wyzwalacz nie może być pustyTen wyzwalacz został już przypisany do innej wtyczki, musisz podać inny wyzwalacz.
- This new Action Keyword is the same as old, please choose a different one
+ Nowe słowo kluczowe akcji jest takie samo jak poprzednie. Wybierz inneSukcesZakończono pomyślnie
- Enter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.
+ Failed to copy
+ Wpisz słowa kluczowe uruchamiające wtyczkę (oddzielone spacją). Wpisz *, aby uruchamiać wtyczkę bez słów kluczowych.
- Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Ustawienie opóźnienia wyszukiwania
+ Podaj czas opóźnienia wyszukiwania (w ms) dla wtyczki. Pozostaw puste, aby użyć wartości domyślnej.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Skrót klawiszowy niestandardowych zapyta
diff --git a/Flow.Launcher/Languages/pt-br.xaml b/Flow.Launcher/Languages/pt-br.xaml
index d0040d799..bd74d1d5f 100644
--- a/Flow.Launcher/Languages/pt-br.xaml
+++ b/Flow.Launcher/Languages/pt-br.xaml
@@ -42,6 +42,7 @@
Modo GamerSuspender o uso de Teclas de Atalho.Redefinição de Posição
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Erro ao ativar início com o sistemaEsconder Flow Launcher quando foco for perdidoNão mostrar notificações de novas versões
- Posição da Janela de Busca
+ Search Window LocationLembrar Última PosiçãoMonitor com o Cursor do MouseMonitor com Janela em Foco
@@ -106,14 +107,35 @@
Sempre abrir o painel de pré-visualização quando o Flow é ativado. Pressione {0} para ativar ou desativar a pré-visualização.O efeito de sombra não é permitido enquanto o tema atual tem o efeito de desfoque ativadoSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Abrir
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Buscar Plugin
@@ -130,8 +152,13 @@
Palavra-chave de ação atualNova palavra-chave de açãoAlterar Palavras-chave de Ação
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Prioridade
+ Search Delay
+ Home PagePrioridade atualNova PrioridadePrioridade
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultLoja de Plugins
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeModo JanelaOpacidade
@@ -211,12 +240,13 @@
RelógioDataBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Usar Segoe Fluent IconsUsar Segoe Fluent Icons para resultados da consulta quando suportadoApertar Tecla
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyProxy HTTP
@@ -323,6 +356,7 @@
Pasta de RegistroLimpar RegistrosTem certeza que quer excluir todos os registros?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontSelecione o Gerenciador de Arquivos
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneSucessoConcluído com sucesso
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Atalho de Consulta Personalizada
diff --git a/Flow.Launcher/Languages/pt-pt.xaml b/Flow.Launcher/Languages/pt-pt.xaml
index 9dc520cbd..cf7312956 100644
--- a/Flow.Launcher/Languages/pt-pt.xaml
+++ b/Flow.Launcher/Languages/pt-pt.xaml
@@ -42,6 +42,7 @@
Modo de jogoSuspender utilização das teclas de atalhoRepor posição
+ Repor posição da janela de pesquisaEscreva aqui para pesquisar
@@ -106,14 +107,34 @@
Abrir painel de pré-visualização ao ativar Flow Launcher. Prima {0} para comutar a pré-visualização.O efeito sombra não é permitido com este tema porque o efeito desfocar está ativoAtraso da pesquisa
- Tempo a esperar após a digitação. Esta definição melhora o carregamento dos resultados.
+ Adiciona um pequeno atraso durante a escrita para reduzir a oscilação ao carregar os resultados. Recomendado se a sua velocidade de escrita for média.
+ Introduza o tempo de espera (ms) até que a entrada seja considerada completa. Apenas pode editar se ativara opção Atraso de pesquisa.Tempo de espera padrão
- O valor padrão a esperar, antes de iniciar a pesquisa após terminar a digitação.
- Muito longo
- Longo
- Normal
- Curto
- Muito curto
+ Tempo a aguardar antes de mostrar os resultados. Valores mais altos resultam num atraso maior (ms).
+ Informações para utilizadores coreanos
+
+ O método de introdução Coreano em sistemas Windows 11 pode causar erros no Flow Launcher.
+
+ Se estiver a sofrer problemas, pode ser necessário ativar "Utilizar versão anterior do IME Coreano".
+
+ Abra as definições no seu sistema e aceda a:
+
+ Hora e Idioma > Idioma e Região > Coreano > Opções de idioma > Teclado - Microsoft IME > Compatibilidade
+
+ e ative "Utilizar versão anterior de Microsoft IME".
+
+
+
+ Abrir definições de Idioma e Região
+ Abra a definição do método de introdução coreano. Aceda a Corano > Opções de idioma > Teclado - Microsoft IME > Compatibilidade
+ Abrir
+ Utilizar versão anterior de IME Coreano
+ Pode alterar as definições do método de introdução coreano aqui
+ Página inicial
+ Mostrar resultados da página inicial se o termo de pesquisa estiver vazio.
+ Mostrar histórico na página inicial
+ Máximo de resultados a mostrar na Página inicial
+ Esta opção apenas pode ser editada se o plugin tiver suporte a Página inicial e se estiver ativo.Pesquisar plugins
@@ -132,6 +153,11 @@
Alterar palavras-chaveTempo de espera do pluginAlterar tempo de espera do plugin
+ Definições avançadas:
+ Ativo
+ Prioridade
+ Atraso da pesquisa
+ Página inicialPrioridade atualNova prioridadePrioridade
@@ -147,7 +173,6 @@
Plugin: {0} - Falha ao remover o ficheiro de definições do plugin. Experimente remover manualmente.Falha ao limpar a cache do pluginPlugin: {0} - Falha ao remover os ficheiros em cache do plugin. Experimente remover manualmente.
- PadrãoLoja de plugins
@@ -184,6 +209,9 @@
Tipo de letra dos títulosTipo de letra dos subtítulosRepor
+ Repor definições recomendadas para fontes e tamanho.
+ Tamanho do tema importado
+ Se o programador do tema tiver disponibilizado o valor, este será utilizado.PersonalizarModo da janelaOpacidade
@@ -211,6 +239,7 @@
RelógioDataTipo de fundo
+ O efeito de fundo não é aplicado na pré-visualização.Esta opção apenas está disponível em sistemas após Windows 11 Build 22000NenhumaAcrílico
@@ -283,6 +312,9 @@
Utilizar ícones Segoe FluentSe possível, utilizar ícones Segoe Fluent para os resultadosPrima a tecla
+ Mostrar emblemas dos resultados
+ Para plugins suportados, são mostrados emblemas para nos ajudar a distingui-los mais facilmente.
+ Mostrar emblemas apenas para a consulta globalProxy HTTP
@@ -322,6 +354,7 @@
Pasta de registosLimpar registosTem a certeza de que deseja remover todos os registos?
+ Pasta de cacheLimpar cacheTem a certeza de que pretende limpar todas as caches?Não foi possível limpar todas as pastas e ficheiros. Consulte o ficheiro de registo para mais informações.
@@ -332,6 +365,7 @@
Nível de registoDepuraçãoInformação
+ Setting Window FontSelecione o gestor de ficheiros
@@ -369,13 +403,16 @@
A palavra-chave escolhida é igual à anterior. Por favor escolha outra.SucessoTerminado com sucesso
+ Falha ao copiarIntroduza as palavras-chave que pretende utilizar para iniciar o plugin e um espaço vazio caso queira mais do que uma. Utilize * se não quiser especificar uma palavra-chave e o plugin será ativado sem palavras-chave.Definição do tempo de espera
- Selecione o tempo de espera que pretende utilizar com este plugin. Selecione "{0}" se não o quiser especificar e, desta forma, o plugin irá utilizar o tempo de espera padrão.
- Tempo de espera atual
- Novo tempo de espera
+ Indique o tempo de espera que pretende utilizar com este plugin. Nada escreva se não o quiser especificar e o plugin irá utilizar o tempo de espera padrão.
+
+
+ Página inicial
+ Ative o plugin Página inicial se quiser mostrar os seus resultados so termo de pesquisa estiver vazio.Tecla de atalho personalizada
diff --git a/Flow.Launcher/Languages/ru.xaml b/Flow.Launcher/Languages/ru.xaml
index c38855474..69069c5ec 100644
--- a/Flow.Launcher/Languages/ru.xaml
+++ b/Flow.Launcher/Languages/ru.xaml
@@ -42,6 +42,7 @@
Игровой режимПриостановить использование горячих клавиш.Сброс положения
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Ошибка настройки запуска при запускеСкрывать Flow Launcher, если потерян фокуcНе отображать сообщение об обновлении, когда доступна новая версия
- Положение окна поиска
+ Search Window LocationЗапомнить последнее положениеМонитор с курсором мышиМонитор с фокусированным окном
@@ -106,14 +107,35 @@
Всегда открывать панель предварительного просмотра при запуске Flow. Нажмите {0}, чтобы переключить предварительный просмотр.Эффект тени не допускается, если в текущей теме включён эффект размытияSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Открыть
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Поиск плагина
@@ -130,8 +152,13 @@
Ключевое слово текущего действияКлючевое слово нового действияИзменить ключевое слово действия
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Приоритет
+ Search Delay
+ Home PageТекущий приоритетНовый приоритетПриоритет
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultМагазин плагинов
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeОконный режимПрозрачность
@@ -211,12 +240,13 @@
ЧасыДатаBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Использование значков Segoe FluentИспользовать значки Segoe Fluent для результатов запросов, где они поддерживаютсяНажмите клавишу
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyНТТР-прокси
@@ -323,6 +356,7 @@
Папка журналаОчистить журналВы уверены, что хотите удалить все журналы?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontВыбор менеджера файлов
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneУспешноВыполнено успешно
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Задаваемые горячие клавиши для запросов
diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml
index 0f07387c6..88ed1c9df 100644
--- a/Flow.Launcher/Languages/sk.xaml
+++ b/Flow.Launcher/Languages/sk.xaml
@@ -42,6 +42,7 @@
Herný režimPozastaviť používanie klávesových skratiek.Resetovať pozíciu
+ Resetovať pozíciu vyhľadávacieho oknaZadajte text na vyhľadávanie
@@ -55,7 +56,7 @@
Chybné nastavenie spustenia pri spusteníSchovať Flow Launcher po strate fokusuNezobrazovať upozornenia na novú verziu
- Pozícia vyhľadávacieho okna
+ Poloha vyhľadávacieho oknaZapamätať si poslednú pozíciuMonitor s kurzorom myšiMonitor s aktívnym oknom
@@ -106,14 +107,35 @@
Pri aktivácii Flowu vždy otvoriť panel s náhľadom. Stlačením klávesu {0} prepnete náhľad.Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostreniaOneskorenie vyhľadávania
- Pri písaní sa na chvíľu oneskorí vyhľadávanie. Tým sa zníži skákanie rozhrania a načítanie výsledkov.
+ Pridá krátke oneskorenie počas písania, aby na zníženie blikanie rozhrania počas načítavania. Odporúča sa pri priemernej rýchlosti písania.
+ Zadajte čas (v ms) čakania, kým vstup bude považovaný za ukončený. Úprava je povolená len vtedy, ak je povolené oneskorenie vyhľadávania.Predvolené oneskorenie vyhľadávania
- Predvolené oneskorenie pluginu, po ktorom sa zobrazia výsledky vyhľadávania po zastavení písania.
- Veľmi dlhé
- Dlhé
- Normálne
- Krátke
- Veľmi krátke
+ Čas čakania pred zobrazením výsledkov po ukončení písania. Pri vyšších hodnotách sa čaká dlhšie. (ms)
+ Informácie pre kórejského používateľa IME
+
+ Kórejská metóda vstupu použitá vo Windows 11 môže spôsobiť určité problémy vo Flow Launcheri.
+
+ Ak sa vyskytnú problémy, možno bude potrebné povoliť "Použiť predchádzajúcu verziu editora Microsoft IME".
+
+
+ Otvorte nastavenia Windows 11 a prejdite do:
+
+ Čas a jazyk > Jazyk a oblasť > Kórejčina> Možnosti jazyka > Klávesnice – Microsoft IME > Možnosti klávesnice – Kompatibilita,
+
+ a povoľte "Predcházdajúca verzia editora Microsoft IME".
+
+
+
+ Otvoriť nastavenia systému Jazyk a oblasť
+ Otvorí okno s nastaveniami kórejského editora Microsoft IME. Prejdite do Kórejčina > Možnosti jazyka > Klávesnice – Microsoft IME > Možnosti klávesnice – Kompatibilita
+ Otvoriť
+ Použiť predchádzajúcu verziu editora Microsoft IME
+ Zmeniť na predchádzajúcu verziu editora Microsoft IME môžete priamo tu
+ Domovská stránka
+ Zobraziť výsledky Domovskej stránky, keď je text dopytu prázdny.
+ Zobraziť výsledky histórie na Domovskej stránke
+ Maximálny počet histórie výsledkov zobrazenej na Domovskej stránke
+ Úprava je možná len vtedy, ak plugin podporuje funkciu Domovská stránka a Domovská stránka je povolená.Vyhľadať plugin
@@ -130,8 +152,13 @@
Aktuálny aktivačný príkazNový aktivačný príkazUpraviť aktivačný príkaz
- Oneskorenie vyhľadávania pomocou pluginu
- Zmení oneskorenie vyhľadávania pomocou pluginu
+ Oneskorenie vyhľadávania pluginu
+ Zmení oneskorenie vyhľadávania pluginu
+ Rozšírené nastavenia:
+ Povolené
+ Priorita
+ Oneskorenie vyhľadávania
+ Domovská stránkaAktuálna prioritaNová prioritaPriorita
@@ -147,7 +174,6 @@
Pluginy: {0} – Nepodarilo sa odstrániť súbory s nastaveniami pluginu, odstráňte ich manuálneNepodarilo sa odstrániť vyrovnávaciu pamäť pluginuPluginy: {0} – Nepodarilo sa odstrániť vyrovnávaciu pamäť pluginu, odstráňte ju manuálne
- PredvolenéRepozitár pluginov
@@ -184,6 +210,9 @@
Písmo nadpisu výsledkuPísmo podnadpisu výsledkuResetovať
+ Resetuje písmo a jeho veľkosť na predvolené hodnoty.
+ Importovať rozmery motívu
+ Ak je k dispozícii hodnota veľkosti definovaná autorom motívu, načíta sa a použije.PrispôsobiťRežim oknoNepriehľadnosť
@@ -210,8 +239,9 @@
VlastnéHodinyDátum
- Typ pozadia
- Backdrop je podporovaný od Windows 11 zostava 22000 a novších
+ Typ pozadia (backdrop)
+ Efekt pozadia sa v náhľade nezobrazuje.
+ Pozadie je podporované od Windows 11 zostava 22000 a novšíchŽiadnaAcrylicMica
@@ -283,6 +313,9 @@
Použiť ikony Segoe FluentPoužiť ikony Segoe Fluent, ak sú podporovanéStlačte kláves
+ Zobraziť výsledok v odznaku
+ Ak to plugin podporuje, zobrazí sa jeho ikona v odznaku na jednoduchšie odlíšenie.
+ Zobraziť výsledok v odznaku len pre globálne vyhľadávanieHTTP proxy
@@ -323,6 +356,7 @@
Priečinok s logmiVymazať logyNaozaj chcete odstrániť všetky logy?
+ Priečinok vyrovnávacej pamäteVymazať vyrovnávaciu pamäťNaozaj chcete vymazať všetky vyrovnávacie pamäte?Nepodarilo sa odstrániť niektoré priečinky a súbory. Pre viac informácií si pozrite súbor logu
@@ -333,6 +367,7 @@
Úroveň logovaniaDebugInfo
+ Nastavenie písma oknaVyberte správcu súborov
@@ -370,13 +405,16 @@
Tento nový aktivačný príkaz je rovnaký ako starý, vyberte inýÚspešnéÚspešne dokončené
+ Nepodarilo sa skopírovaťZadajte aktivačné príkazy, ktoré chcete používať na spustenie pluginu a oddeľte ich medzerou. Ak nechcete zadať aktivačný príkaz, použite * a plugin bude spustený bez aktivačného príkazu.Nastavenie oneskoreného vyhľadávania
- Vyberte oneskorenie vyhľadávania, ktoré chcete použiť pre plugin. Ak vyberiete "{0}", plugin použije predvolené oneskorenie vyhľadávania.
- Aktuálne oneskorenie vyhľadávania
- Nové oneskorenie vyhľadávania
+ Zadajte oneskorenie vyhľadávania v ms, ktoré chcete použiť pre plugin. Nechajte prázdne, ak nechcete zadať žiadne, plugin použije predvolené oneskorenie vyhľadávania.
+
+
+ Domovská stránka
+ Ak chcete zobrazovať výsledky pluginu, keď je dopyt prázdny, povoľte funkciu Domovská stránka.Klávesová skratka vlastného vyhľadávania
diff --git a/Flow.Launcher/Languages/sr.xaml b/Flow.Launcher/Languages/sr.xaml
index 1d1eb9120..4b3e3bc0c 100644
--- a/Flow.Launcher/Languages/sr.xaml
+++ b/Flow.Launcher/Languages/sr.xaml
@@ -42,6 +42,7 @@
Game ModeSuspend the use of Hotkeys.Position Reset
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Error setting launch on startupSakri Flow Launcher kada se izgubi fokusNe prikazuj obaveštenje o novoj verziji
- Search Window Position
+ Search Window LocationRemember Last PositionMonitor with Mouse CursorMonitor with Focused Window
@@ -106,14 +107,35 @@
Always open preview panel when Flow activates. Press {0} to toggle preview.Shadow effect is not allowed while current theme has blur effect enabledSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Otvori
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -130,8 +152,13 @@
Current action keywordNew action keywordChange Action Keywords
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Priority
+ Search Delay
+ Home PageCurrent PriorityNew PriorityPriority
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultPlugin Store
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.CustomizeRežim prozoraNeprozirnost
@@ -211,12 +240,13 @@
ClockDateBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Use Segoe Fluent IconsUse Segoe Fluent Icons for query results where supportedPress Key
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP proksi
@@ -323,6 +356,7 @@
Log FolderClear LogsAre you sure you want to delete all logs?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontSelect File Manager
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneUspešnoCompleted successfully
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.prečica za ručno dodat upit
diff --git a/Flow.Launcher/Languages/tr.xaml b/Flow.Launcher/Languages/tr.xaml
index b9b5d351e..665694ace 100644
--- a/Flow.Launcher/Languages/tr.xaml
+++ b/Flow.Launcher/Languages/tr.xaml
@@ -42,6 +42,7 @@
Oyun ModuKısayol tuşlarının kullanımını durdurun.Pencere Konumunu Sıfırla
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Sistemle başlatma ayarı başarısız olduOdak Pencereden Ayrıldığında GizleGüncelleme bildirimlerini gösterme
- Pencere Konumu
+ Search Window LocationSon Konumu HatırlaFare İmlecinin Bulunduğu MonitörAktif Pencerenin Bulunduğu Monitör
@@ -106,14 +107,35 @@
Önizleme panelini her zaman aç. Önizlemeyi bu ayardan bağımsız {0} kısayolu ile açıp kapatabilirsiniz.Mevcut temada bulanıklık efekti etkinken gölgelendirme efektine izin verilmezSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Aç
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Eklenti Ara
@@ -130,8 +152,13 @@
Geçerli anahtar kelimeYeni anahtar kelimeAnahtar kelimeyi değiştir
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Enabled
+ Priority
+ Search Delay
+ Home PageMevcut öncelikYeni ÖncelikÖncelik
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultEklenti Mağazası
@@ -184,6 +210,9 @@
Arama Sonuçları Yazı TipiArama Sonuçları Yazı TipiSıfırla
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.KişiselleştirPencere ModuSaydamlık
@@ -211,12 +240,13 @@
SaatTarihBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveHiçbiriAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Segoe Fluent SimgeleriArama sonuçlarında mümkünse Segoe Fluent simgelerini kullan.Tuşa basın
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyVekil Sunucu
@@ -323,6 +356,7 @@
Günlük KlasörüGünlükleri TemizleTüm günlük kayıtlarını silmek istediğinize emin misiniz?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontDosya Yöneticisi Seçenekleri
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneBaşarılıBaşarıyla tamamlandı
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Özel Sorgu Kısayolları
diff --git a/Flow.Launcher/Languages/uk-UA.xaml b/Flow.Launcher/Languages/uk-UA.xaml
index 427511c66..b3dc2cd16 100644
--- a/Flow.Launcher/Languages/uk-UA.xaml
+++ b/Flow.Launcher/Languages/uk-UA.xaml
@@ -42,6 +42,7 @@
Режим гриПризупинити використання гарячих клавіш.Скидання позиції
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Помилка запуску налаштування під час запускуСховати Flow Launcher, якщо втрачено фокусНе повідомляти про доступні нові версії
- Положення вікна пошуку
+ Search Window LocationПам'ятати останню позиціюМонітор з курсором мишіМонітор зі сфокусованим вікном
@@ -106,14 +107,35 @@
Завжди відкривати панель попереднього перегляду при активації Flow. Натисніть {0}, щоб переключити попередній перегляд.Ефект тіні не дозволено, коли поточна тема має ефект розмиттяSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Відкрити
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Плагін для пошуку
@@ -130,8 +152,13 @@
Поточна гаряча клавішаНова гаряча клавішаЗмінити гарячі клавіши
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Увімкнено
+ Пріоритет
+ Search Delay
+ Home PageПоточний пріоритетНовий пріоритетПріоритет
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultМагазин плагінів
@@ -184,6 +210,9 @@
Шрифт заголовка результатуШрифт підзаголовка результатуСкинути
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.ПідлаштуватиВіконний режимПрозорість
@@ -211,12 +240,13 @@
ГодинникДатаBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveНемаAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.Ця тема підтримує розмитий прозорий фон.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Використання іконок Segoe FluentВикористання іконок Segoe Fluent Icons для результатів запитів, де це підтримуєтьсяНатисніть клавішу
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP-проксі
@@ -323,6 +356,7 @@
Тека журналуОчистити журналиВи впевнені, що хочете видалити всі журнали?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window FontВиберіть файловий менеджер
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different oneУспішноУспішно завершено
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Задані гарячі клавіші для запитів
diff --git a/Flow.Launcher/Languages/vi.xaml b/Flow.Launcher/Languages/vi.xaml
index 6223efc00..b7b56213b 100644
--- a/Flow.Launcher/Languages/vi.xaml
+++ b/Flow.Launcher/Languages/vi.xaml
@@ -42,6 +42,7 @@
Chế độ trò chơiTạm dừng sử dụng phím nóng.Đặt lại vị trí
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Không lưu được tính năng tự khởi động khi khởi động hệ thốngẨn Flow Launcher khi mất tiêu điểmKhông hiển thị thông báo khi có phiên bản mới
- Vị trí Suchfenster
+ Search Window LocationGhi nhớ vị trí cuối cùngMàn hình bằng con trỏ chuộtMàn hình có cửa sổ được tập trung
@@ -106,14 +107,35 @@
Luôn mở bảng xem trước khi Flow kích hoạt. Nhấn {0} để chuyển đổi chế độ xem trước.Hiệu ứng đổ bóng không được phép nếu chủ đề hiện tại bật hiệu ứng làm mờSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ Mở
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Plugin tìm kiếm
@@ -130,8 +152,13 @@
Từ hành động hiện tạiTừ hành động mớiThay đổi từ hành động
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ Đã bật
+ Ưu tiên
+ Search Delay
+ Home PageƯu tiên hiện tạiƯu tiên mớiƯu tiên
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- DefaultTải tiện ích mở rộng
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontĐặt lại
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.Customizechế độ cửa sổđộ mờ
@@ -211,12 +240,13 @@
GiờNgàyBackdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveKhôngAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
Sử dụng biểu tượng SegoeSử dụng Biểu tượng Segoe Fluent cho kết quả truy vấn nếu được hỗ trợNhấn phím
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyProxy HTTP
@@ -325,6 +358,7 @@
Thư mục nhật kýXóa tệp nhật kýBạn có chắc chắn muốn xóa tất cả nhật ký không?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -335,6 +369,7 @@
Log LevelDebugInfo
+ Setting Window FontChọn trình quản lý tệp
@@ -372,13 +407,16 @@
This new Action Keyword is the same as old, please choose a different oneThành côngĐã hoàn tất thành công
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.Phím nóng truy vấn tùy chỉnh
diff --git a/Flow.Launcher/Languages/zh-cn.xaml b/Flow.Launcher/Languages/zh-cn.xaml
index 3d302da5b..bd3142992 100644
--- a/Flow.Launcher/Languages/zh-cn.xaml
+++ b/Flow.Launcher/Languages/zh-cn.xaml
@@ -42,6 +42,7 @@
游戏模式暂停使用热键。重置位置
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
设置开机自启时出错失去焦点时自动隐藏 Flow Launcher不显示新版本提示
- 搜索窗口位置
+ Search Window Location记住上次的位置鼠标光标所在显示器聚焦窗口所在显示器
@@ -106,14 +107,35 @@
Flow 启动时总是打开预览面板。按 {0} 以切换预览。当前主题已启用模糊效果,不允许启用阴影效果Search Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ 打开
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.搜索插件
@@ -130,8 +152,13 @@
当前触发关键字新触发关键字更改触发关键字
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ 启用
+ 优先级
+ Search Delay
+ Home Page当前优先级新优先级优先级
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Default插件商店
@@ -184,6 +210,9 @@
结果标题字体结果字幕字体重置
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.自定义窗口模式透明度
@@ -211,12 +240,13 @@
时钟日期Backdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and above无AcrylicMicaMica Alt
- 该主题支持两种(浅色/深色)模式。
+ This theme supports two (light/dark) modes.该主题支持模糊透明背景。Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
使用 Segoe Fluent 图标在支持时在选项中显示 Segoe Fluent 图标按下按键
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP 代理
@@ -323,6 +356,7 @@
日志目录清除日志你确定要删除所有的日志吗?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window Font默认文件管理器
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different one成功成功完成
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.自定义查询热键
diff --git a/Flow.Launcher/Languages/zh-tw.xaml b/Flow.Launcher/Languages/zh-tw.xaml
index cecad8e0d..1a71ae135 100644
--- a/Flow.Launcher/Languages/zh-tw.xaml
+++ b/Flow.Launcher/Languages/zh-tw.xaml
@@ -42,6 +42,7 @@
遊戲模式暫停使用快捷鍵。重設位置
+ Reset search window positionType here to search
@@ -55,7 +56,7 @@
Error setting launch on startup失去焦點時自動隱藏 Flow Launcher不顯示新版本提示
- 搜尋視窗位置
+ Search Window Location記住最後位置Monitor with Mouse CursorMonitor with Focused Window
@@ -106,14 +107,35 @@
當 Flow 啟動時,一律開啟預覽面板。按下 {0} 可切換預覽。Shadow effect is not allowed while current theme has blur effect enabledSearch Delay
- Delay for a while to search when typing. This reduces interface jumpiness and result load.
+ Adds a short delay while typing to reduce UI flicker and result load. Recommended if your typing speed is average.
+ Enter the wait time (in ms) until input is considered complete. This can only be edited if Search Delay is enabled.Default Search Delay Time
- Plugin default delay time after which search results appear when typing is stopped.
- Very long
- Long
- Normal
- Short
- Very short
+ Wait time before showing results after typing stops. Higher values wait longer. (ms)
+ Information for Korean IME user
+
+ The Korean input method used in Windows 11 may cause some issues in Flow Launcher.
+
+ If you experience any problems, you may need to enable "Use previous version of Korean IME".
+
+
+ Open Setting in Windows 11 and go to:
+
+ Time & Language > Language & Region > Korean > Language Options > Keyboard - Microsoft IME > Compatibility,
+
+ and enable "Use previous version of Microsoft IME".
+
+
+
+ Open Language and Region System Settings
+ Opens the Korean IME setting location. Go to Korean > Language Options > Keyboard - Microsoft IME > Compatibility
+ 開啟
+ Use Previous Korean IME
+ You can change the Previous Korean IME settings directly from here
+ Home Page
+ Show home page results when query text is empty.
+ Show History Results in Home Page
+ Maximum History Results Shown in Home Page
+ This can only be edited if plugin supports Home feature and Home Page is enabled.Search Plugin
@@ -130,8 +152,13 @@
目前觸發關鍵字新觸發關鍵字更改觸發關鍵字
- Plugin seach delay time
- Change Plugin Seach Delay Time
+ Plugin search delay time
+ Change Plugin Search Delay Time
+ Advanced Settings:
+ 已啟用
+ 優先
+ Search Delay
+ Home Page目前優先新增優先優先
@@ -147,7 +174,6 @@
Plugins: {0} - Fail to remove plugin settings files, please remove them manuallyFail to remove plugin cachePlugins: {0} - Fail to remove plugin cache files, please remove them manually
- Default插件商店
@@ -184,6 +210,9 @@
Result Title FontResult Subtitle FontReset
+ Reset to the recommended font and size settings.
+ Import Theme Size
+ If a size value intended by the theme designer is available, it will be retrieved and applied.Customize視窗模式透明度
@@ -211,12 +240,13 @@
時鐘日期Backdrop Type
+ The backdrop effect is not applied in the preview.Backdrop supported starting from Windows 11 build 22000 and aboveNoneAcrylicMicaMica Alt
- This theme supports two(light/dark) modes.
+ This theme supports two (light/dark) modes.This theme supports Blur Transparent Background.Show placeholderDisplay placeholder when query is empty
@@ -283,6 +313,9 @@
使用 Segoe Fluent 圖示在支援的情況下,在查詢結果使用 Segoe Fluent 圖示按下按鍵
+ Show Result Badges
+ For supported plugins, badges are displayed to help distinguish them more easily.
+ Show Result Badges for Global Query OnlyHTTP 代理
@@ -323,6 +356,7 @@
日誌資料夾清除日誌請確認要刪除所有日誌嗎?
+ Cache FolderClear CachesAre you sure you want to delete all caches?Failed to clear part of folders and files. Please see log file for more information
@@ -333,6 +367,7 @@
Log LevelDebugInfo
+ Setting Window Font選擇檔案管理器
@@ -370,13 +405,16 @@
This new Action Keyword is the same as old, please choose a different one成功成功完成
+ Failed to copyEnter the action keywords you like to use to start the plugin and use whitespace to divide them. Use * if you don't want to specify any, and the plugin will be triggered without any action keywords.Search Delay Time Setting
- Select the search delay time you like to use for the plugin. Select "{0}" if you don't want to specify any, and the plugin will use default search delay time.
- Current search delay time
- New search delay time
+ Input the search delay time in ms you like to use for the plugin. Input empty if you don't want to specify any, and the plugin will use default search delay time.
+
+
+ Home Page
+ Enable the plugin home page state if you like to show the plugin results when query is empty.自定義快捷鍵查詢
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml
index d278faf98..e553a1b7e 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ja.xaml
@@ -2,8 +2,8 @@
- Browser Bookmarks
- Search your browser bookmarks
+ ブラウザブックマーク
+ ブラウザのブックマークを検索しますBookmark Data
@@ -12,16 +12,16 @@
New tabSet browser from path:Choose
- Copy url
- Copy the bookmark's url to clipboard
+ URLをコピー
+ ブックマークのURLをクリップボードにコピーLoad Browser From:Browser NameData Directory Path
- 追
- 編
+ 追加
+ 編集削除Browse
- Others
+ その他のブラウザBrowser EngineIf you are not using Chrome, Firefox or Edge, or you are using their portable version, you need to add bookmarks data directory and select correct browser engine to make this plugin work.For example: Brave's engine is Chromium; and its default bookmarks data location is: "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". For Firefox engine, the bookmarks directory is the userdata folder contains the places.sqlite file.
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml
index 93916ffaa..a374e7fc1 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/ko.xaml
@@ -12,8 +12,8 @@
새 탭Set browser from path:선택
- Copy url
- Copy the bookmark's url to clipboard
+ URL 복사
+ 북마크의 URL을 클립보드에 복사데이터를 가져올 브라우저:브라우저 이름데이터 디렉토리 위치
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml
index 4344e8c3d..06af5ea5b 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/pt-pt.xaml
@@ -24,5 +24,5 @@
OutrosMotor do navegadorSe não estiver a usar o Chrome, Firefox ou Edge ou se estiver a usar a versão portátil, tem que adicionar o diretório de dados dos marcadores e selecionar o motor do navegador para que este plugin funcione.
- Por exemplo: o motor do Brave é Chromium e a localização padrão dos marcadores é "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". Para o navegafor Firefox, o diretório de marcadores é a pasta do utilizador que contém o ficheiro places.sqlite.
+ Por exemplo: o motor do Brave é Chromium e a localização padrão dos marcadores é "%LOCALAPPDATA%\BraveSoftware\Brave-Browser\UserData". Para o navegador Firefox, o diretório de marcadores é a pasta de utilizador que contém o ficheiro places.sqlite.
diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/ja.xaml
index 15598118c..757394b4c 100644
--- a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/ja.xaml
@@ -1,11 +1,11 @@
- Calculator
- Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)
+ 電卓
+ 数式の計算ができます(Flow Launcherで「5*3-2」と入力してみてください)Not a number (NaN)Expression wrong or incomplete (Did you forget some parentheses?)
- Copy this number to the clipboard
+ この数字をクリップボードにコピーしますDecimal separatorThe decimal separator to be used in the output.Use system locale
diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/pt-pt.xaml
index c61f8b3df..b751f3f39 100644
--- a/Plugins/Flow.Launcher.Plugin.Calculator/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Calculator/Languages/pt-pt.xaml
@@ -7,7 +7,7 @@
Expressão errada ou incompleta (esqueceu-se de algum parêntese?)Copiar número para a área de transferênciaSeparador decimal
- O separador decimal a ser usado no resultado.
+ O separador decimal para utilizar no resultado.Utilizar definições do sistemaVírgula (,)Ponto (.)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml
index df6199976..29c97a651 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/ja.xaml
@@ -21,26 +21,26 @@
削除
- 編
- 追
- General Setting
- Customise Action Keywords
+ 編集
+ 追加
+ 一般設定
+ アクションキーワードのカスタマイズQuick Access LinksEverything Setting
- Preview Panel
+ プレビューパネルサイズ
- Date Created
- Date Modified
- Display File Info
- Date and time format
+ 作成日時
+ 更新日時
+ ファイル情報の表示
+ 日付と時刻の形式Sort Option:Everything Path:Launch HiddenEditor PathShell Path
- Index Search Excluded Paths
- Use search result's location as the working directory of the executable
- Hit Enter to open folder in Default File Manager
+ インデックス検索の除外パス
+ 検索結果の場所を実行ファイルの作業ディレクトリとして使用
+ Enterキーで既定のファイルマネージャーでフォルダーを開くUse Index Search For Path SearchIndexing OptionsSearch:
@@ -49,7 +49,7 @@
Index Search:Quick Access:Current Action Keyword
- 完
+ 完了EnabledWhen disabled Flow will not execute this search option, and will additionally revert back to '*' to free up the action keywordEverything
@@ -63,57 +63,57 @@
Content Search EngineDirectory Recursive Search EngineIndex Search Engine
- Open Windows Index Option
+ Windowsのインデックスオプションを開くExcluded File Types (comma seperated)For example: exe,jpg,pngMaximum resultsThe maximum number of results requested from active search engine
- Explorer
- Find and manage files and folders via Windows Search or Everything
+ エクスプローラー
+ Windows SearchまたはEverythingを使って、ファイルやフォルダーを検索・管理しますCtrl + Enter to open the directoryCtrl + Enter to open the containing folder
- Copy path
- Copy path of current item to clipboard
- Copy
- Copy current file to clipboard
- Copy current folder to clipboard
+ パスをコピー
+ 現在の項目のパスをコピー
+ コピー
+ 現在のファイルをコピー
+ 現在のフォルダーをコピー削除
- Permanently delete current file
- Permanently delete current folder
+ 現在のファイルを完全に削除
+ 現在のフォルダーを完全に削除Path:Delete the selectedRun as different userRun the selected using a different user account
- Open containing folder
- Open the location that contains current item
- Open With Editor:
+ フォルダーを開く
+ 現在の項目が含まれている場所を開きます
+ エディターで開く:Failed to open file at {0} with Editor {1} at {2}
- Open With Shell:
+ シェルで開く:Failed to open folder {0} with Shell {1} at {2}Exclude current and sub-directories from Index SearchExcluded from Index Search
- Open Windows Indexing Options
+ Windowsインデックスオプションを開くManage indexed files and folders
- Failed to open Windows Indexing Options
- Add to Quick Access
- Add current item to Quick Access
+ Windowsインデックスオプションを開けませんでした
+ クイックアクセスに追加
+ 現在の項目をクイックアクセスに追加Successfully Added
- Successfully added to Quick Access
+ クイックアクセスに追加しましたSuccessfully RemovedSuccessfully removed from Quick Access
- Add to Quick Access so it can be opened with Explorer's Search Activation action keyword
- Remove from Quick Access
- Remove from Quick Access
- Remove current item from Quick Access
- Show Windows Context Menu
- Open With
- Select a program to open with
+ エクスプローラーの検索アクティベーション用アクションキーワードで開けるように、クイックアクセスに追加します
+ クイックアクセスから削除
+ クイックアクセスから削除
+ 現在の項目をクイックアクセスから削除
+ Windowsの右クリックメニューを表示
+ アプリで開く
+ 開くためのプログラムを選択します{0} free of {1}
@@ -153,7 +153,7 @@
Successfully installed Everything serviceFailed to automatically install Everything service. Please manually install it from https://www.voidtools.comClick here to start it
- Unable to find an Everything installation, would you like to manually select a location?{0}{0}Click no and Everything will be automatically installed for you
+ Everythingのインストールが見つかりませんでした。手動で場所を指定しますか?{0}{0}「いいえ」をクリックすると、Everythingが自動的にインストールされます。Do you want to enable content search for Everything?It can be very slow without index (which is only supported in Everything v1.5+)
diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml
index 27f98449f..39d056e28 100644
--- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/pt-pt.xaml
@@ -6,7 +6,7 @@
Selecione a ligação para a pastaTem a certeza de que deseja eliminar {0}?Tem a certeza de que pretende eliminar permanentemente este ficheiro?
- Tem a certeza de que pretende eliminar permanentemente este ficheiro ou pasta?
+ Tem a certeza de que pretende eliminar permanentemente este ficheiro/pasta?Eliminada com sucesso{0} eliminado(a) com sucesso.A atribuição de uma palavra-chave global pode devolver demasiados resultados. Deve escolher uma palavra-chave específica.
diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
index cc78c9a9a..7af9e9306 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Languages/ko.xaml
@@ -1,9 +1,9 @@
- Activate {0} plugin action keyword
+ {0} 플러그인의 액션 키워드
- 플러그인 인디케이터
+ 플러그인 키워드 힌트사용중인 플러그인들의 전체 액션 키워드 목록을 보여줍니다
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
index 04619239d..006dd93d6 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ar.xaml
@@ -8,6 +8,7 @@
قتل عمليات {0}قتل جميع الأمثلة
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
index d621b63c4..d53616cc0 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/cs.xaml
@@ -8,6 +8,7 @@
ukončit {0} procesůukončit všechny instance
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/da.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
index 766d170a4..7968ef2d8 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/de.xaml
@@ -8,6 +8,7 @@
{0} Prozesse beendenAlle Instanzen beenden
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
index 9b4a20a69..50799dca2 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es-419.xaml
@@ -8,6 +8,7 @@
terminar {0} procesostermina todas las instancias
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
index ab788075e..6ab3f9797 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/es.xaml
@@ -8,6 +8,7 @@
finalizar {0} procesosfinalizar todas las instancias
+ Mostrar el título de los procesos con ventanas visiblesColocar procesos con ventanas visibles en la parte superior
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
index 7064de1fe..ae3b6bab2 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/fr.xaml
@@ -8,6 +8,7 @@
Tuer {0} processusTuer toutes les instances
+ Afficher le titre des processus avec des fenêtres visiblesPlacer les processus dont les fenêtres sont visibles en haut de la page
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
index 8567b5412..15d14a42c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/he.xaml
@@ -8,6 +8,7 @@
סגור {0} תהליכיםסגור את כל המופעים
+ הצג כותרת עבור תהליכים בעלי חלונות גלוייםהצב תהליכים עם חלונות גלויים בחלק העליון
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
index 1333fe573..5bd4a9eac 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/it.xaml
@@ -8,6 +8,7 @@
termina {0} processitermina tutte le istanze
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ja.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
index c3d1f6d08..09679a58b 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ko.xaml
@@ -8,6 +8,7 @@
{0} 프로세스 종료모든 인스턴스 종료
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
index 1210818bf..37413385d 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nb.xaml
@@ -8,6 +8,7 @@
terminer {0} processesterminer alle forekomstene
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
index cfcd71c37..ea9f9a591 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/nl.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsZet processen met zichtbare vensters bovenaan
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
index 650f14657..7e59db5ec 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pl.xaml
@@ -8,6 +8,7 @@
zamknij {0} procesówzamknij wszystkie instancje
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-br.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
index 944a883c9..b50a31744 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/pt-pt.xaml
@@ -8,6 +8,7 @@
terminar {0} processosterminar todas as instâncias
+ Mostrar título dos processos com janelas visíveisColocar processos com janelas visíveis por cima
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
index 0e2bef052..d030a778e 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/ru.xaml
@@ -8,6 +8,7 @@
удалить {0} процессовудалить все экземпляры
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
index 2b06d3bbe..6c85b9476 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sk.xaml
@@ -8,6 +8,7 @@
ukončiť {0} procesovukončiť všetky inštancie
+ Zobraziť nadpis pre procesy s viditeľnými oknamiZobraziť procesy s viditeľným oknom navrchu
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/sr.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/tr.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
index 02dab46ba..56004028b 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/uk-UA.xaml
@@ -8,6 +8,7 @@
вбити {0} процесіввбити всі екземпляри
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
index 89fd67635..5ce54a0dc 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/vi.xaml
@@ -8,6 +8,7 @@
Buộc tắt các tiến trình {0}Tắt tất cả phên bản
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
index 15e717c79..ceb909db1 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-cn.xaml
@@ -8,6 +8,7 @@
杀死 {0} 进程杀死所有实例
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
index 8563f49a0..0a7176d2c 100644
--- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
+++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/zh-tw.xaml
@@ -8,6 +8,7 @@
kill {0} processeskill all instances
+ Show title for processes with visible windowsPut processes with visible windows on the top
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/ar.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/ar.xaml
index 69ca16b69..d352368cb 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/ar.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/ar.xaml
@@ -74,7 +74,7 @@
التشغيل كمستخدم مختلفالتشغيل كمسؤولفتح المجلد المحتوي
- تعطيل عرض هذا البرنامج
+ Hideفتح المجلد الهدفالبرنامج
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/cs.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/cs.xaml
index 1c70c6b6f..ca57bf027 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/cs.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/cs.xaml
@@ -74,7 +74,7 @@
Spustit jako jiný uživatelSpustit jako správceOtevřít umístění složky
- Zakázat zobrazování tohoto programu
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/da.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/da.xaml
index 0f39f5d56..a0f09a3b5 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/da.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/da.xaml
@@ -74,7 +74,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
index 14e228b2a..ec5d273d6 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/de.xaml
@@ -74,7 +74,7 @@
Als anderer Benutzer ausführenAls Administrator ausführenEnthaltenden Ordner öffnen
- Dieses Programm von der Anzeige deaktivieren
+ HideZielordner öffnenProgramm
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/es-419.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/es-419.xaml
index b928bd1ce..d9ffa668c 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/es-419.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/es-419.xaml
@@ -74,7 +74,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/es.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/es.xaml
index 57b5c94b7..d0b6851d9 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/es.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/es.xaml
@@ -74,7 +74,7 @@
Ejecutar como usuario diferenteEjecutar como administradorAbrir carpeta contenedora
- Desactivar la visualización de este programa
+ OcultarAbrir carpeta de destinoPrograma
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/fr.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/fr.xaml
index 7cccd5a42..e6fd67936 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/fr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/fr.xaml
@@ -74,7 +74,7 @@
Exécuter en tant qu'utilisateur différentExécuter en tant qu'administrateurOuvrir l'emplacement du fichier
- Masquer ce programme des résultats
+ MasquerOuvrir le répertoire cibleProgrammes
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
index af272fb46..88053ac57 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/he.xaml
@@ -74,7 +74,7 @@
הפעל כמשתמש אחרהפעל כמנהלפתח תיקייה מכילה
- השבת הצגת תוכנה זו
+ הסתרפתח תיקיית יעדתוכנה
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/it.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/it.xaml
index cf5de9bab..5004d41cf 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/it.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/it.xaml
@@ -74,7 +74,7 @@
Esegui Come Utente DifferenteEsegui Come AmministratoreApri percorso file
- Disabilita questo programma dalla visualizzazione
+ HideOpen target folderProgramma
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/ja.xaml
index 1f1dd4d37..96ca3af60 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/ja.xaml
@@ -4,12 +4,12 @@
Reset Default削除
- 編
- 追
+ 編集
+ 追加Name有効Enabled
- Disable
+ 無効StatusEnabledDisabled
@@ -28,11 +28,11 @@
When enabled, Flow will load programs from the registryPATHWhen enabled, Flow will load programs from the PATH environment variable
- Hide app path
- For executable files such as UWP or lnk, hide the file path from being visible
+ アプリのパスを非表示
+ UWPやlnkなどの実行可能ファイルについて、サブタイトル領域にファイルパスが表示されないようにします。Hide uninstallersHides programs with common uninstaller names, such as unins000.exe
- Search in Program Description
+ プログラムの説明で検索Flow will search program's descriptionHide duplicated appsHide duplicated Win32 programs that are already in the UWP list
@@ -71,14 +71,14 @@
Insert protocols of .url files you want to index. Protocols should be separated by ';', and should end with "://". (ex>ftp://;mailto://)
- Run As Different User
- Run As Administrator
+ 別のユーザーとして実行
+ 管理者として実行Open containing folder
- Disable this program from displaying
+ HideOpen target folder
- Program
- Search programs in Flow Launcher
+ プログラム
+ Flow Launcherでプログラムを検索Invalid Path
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/ko.xaml
index affa7567f..266aa4b45 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/ko.xaml
@@ -34,7 +34,7 @@
Unins000처럼 일반적으로 사용되는 설치 삭제(Uninstaller) 프로그램의 이름을 숨깁니다.프로그램 설명 검색Flow will search program's description
- Hide duplicated apps
+ 중복된 앱 숨기기Hide duplicated Win32 programs that are already in the UWP list확장자최대 깊이
@@ -74,8 +74,8 @@
다른 유저 권한으로 실행관리자 권한으로 실행포함된 폴더 열기
- 이 프로그램 표시 비활성화
- Open target folder
+ Hide
+ 대상 폴더 열기프로그램Flow Launcher에서 프로그램을 검색합니다
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/nb.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/nb.xaml
index 3fa53aba8..c4b218204 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/nb.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/nb.xaml
@@ -74,7 +74,7 @@
Kjør som en annen brukerKjør som administratorÅpne inneholdende mappe
- Deaktiver visningen av dette programmet
+ HideÅpne målmappeProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/nl.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/nl.xaml
index 8a86dc511..495296694 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/nl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/nl.xaml
@@ -74,7 +74,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/pl.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/pl.xaml
index 8a163de7a..f38fd9623 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/pl.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/pl.xaml
@@ -74,7 +74,7 @@
Uruchom jako inny użytkownikUruchom jako administratorOtwórz folder nadrzędny
- Wyłącz wyświetlanie tego programu
+ HideOtwórz folder docelowyProgramy
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-br.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-br.xaml
index bab077683..3ff8be551 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-br.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-br.xaml
@@ -74,7 +74,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-pt.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-pt.xaml
index c7b394593..aa3c500a3 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-pt.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/pt-pt.xaml
@@ -74,7 +74,7 @@
Executar com outro utilizadorExecutar como administradorAbrir pasta de destino
- Desativar exibição deste programa
+ OcultarAbrir pasta de destinoProgramas
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/ru.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/ru.xaml
index 8cb62137e..a75a6d836 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/ru.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/ru.xaml
@@ -74,7 +74,7 @@
Запустить от имени другого пользователяЗапустить от имени администратораОткрыть содержащую папку
- Отключить отображение этой программы
+ HideOpen target folderПрограмма
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/sk.xaml
index ee0705b96..7fda65160 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/sk.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/sk.xaml
@@ -74,7 +74,7 @@
Spustiť ako iný používateľSpustiť ako správcaOtvoriť umiestnenie priečinka
- Zakázať zobrazovanie tohto programu
+ SkryťOtvoriť cieľový priečinokProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/sr.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/sr.xaml
index a69d7e96b..f2da895b0 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/sr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/sr.xaml
@@ -74,7 +74,7 @@
Run As Different UserRun As AdministratorOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/tr.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/tr.xaml
index d46de0592..6bda659dd 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/tr.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/tr.xaml
@@ -74,7 +74,7 @@
Run As Different UserYönetici Olarak ÇalıştırOpen containing folder
- Disable this program from displaying
+ HideOpen target folderProgram
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/uk-UA.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/uk-UA.xaml
index 8e8d55f47..3686925a9 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/uk-UA.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/uk-UA.xaml
@@ -74,7 +74,7 @@
Запустити від імені іншого користувачаЗапустити від імені адміністратораВідкрити папку
- Вимкнути відображення цієї програми
+ HideВідкрити цільову папкуПрограма
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml
index 21a3981c5..6b238c638 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/vi.xaml
@@ -74,7 +74,7 @@
Xóa lựa chọn đã chọnChạy với quyền quản trịMở thư mục chứa
- Vô hiệu hóa chương trình này hiển thị
+ HideMở thư mục đíchChương trình
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-cn.xaml
index 6d5c0079f..b36b72b9b 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-cn.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-cn.xaml
@@ -74,7 +74,7 @@
以其他用户身份运行以管理员身份运行打开文件所在文件夹
- 禁止显示该程序
+ Hide打开目标文件夹程序
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-tw.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-tw.xaml
index fd0bd427a..084adfbac 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-tw.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/zh-tw.xaml
@@ -74,7 +74,7 @@
Run As Different User以系統管理員身分執行開啟檔案位置
- Disable this program from displaying
+ HideOpen target folder程式
diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Shell/Languages/ja.xaml
index 90eb49317..781227267 100644
--- a/Plugins/Flow.Launcher.Plugin.Shell/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Shell/Languages/ja.xaml
@@ -12,7 +12,7 @@
Allows to execute system commands from Flow Launcherthis command has been executed {0} timesexecute command through command shell
- Run As Administrator
+ 管理者として実行Copy the commandOnly show number of most used commands:
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
index 86688a130..b02a89a0a 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/he.xaml
@@ -26,7 +26,7 @@
מדריך Flow Launcherתיקיית הנתונים של Flow Launcherמצב משחק
- Set the Flow Launcher Theme
+ הגדר את ערכת הנושא של Flow Launcherערו
@@ -51,7 +51,7 @@
עיין במדריך של Flow Launcher לקבלת מידע נוסף וטיפיםפתח את מיקום תיקיית ההגדרות של Flow Launcherהפעל/כבה מצב משחק
- Quickly change the Flow Launcher theme
+ שנה במהירות את ערכת הנושא של Flow Launcherהצליח
@@ -62,14 +62,14 @@
האם אתה בטוח שברצונך להפעיל מחדש את המחשב עם אפשרויות אתחול מתקדמות?האם אתה בטוח שברצונך להתנתק?
- Command Keyword Setting
- Custom Command Keyword
- Enter a keyword to search for command: {0}. This keyword is used to match your query.
- Command Keyword
+ הגדרת מילת מפתח לפקודה
+ מילת מפתח מותאמת לפקודה
+ הזן מילת מפתח כדי לחפש את הפקודה: {0}. מילת מפתח זו משמשת להתאמה לשאילתה שלך.
+ מילת מפתח לפקודהאפסאישוביטול
- Please enter a non-empty command keyword
+ אנא הזן מילת מפתח תקינה לפקודהפקודות מערכתמספק פקודות הקשורות למערכת, כגון כיבוי, נעילה, הגדרות ועוד.
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
index bc7dff59f..27fee87be 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ja.xaml
@@ -6,20 +6,20 @@
説明コマンド
- Shutdown
- Restart
+ シャットダウン
+ 再起動Restart With Advanced Boot OptionsLog Off/Sign OutLockSleepHibernateIndex Option
- Empty Recycle Bin
- Open Recycle Bin
- 終
- Save Settings
+ ごみ箱を空にする
+ ごみ箱を開く
+ 終了
+ 設定を保存Flow Launcherを再起動する
- 設
+ 設定プラグインデータのリロードCheck For UpdateOpen Log Location
@@ -28,7 +28,7 @@
Toggle Game ModeSet the Flow Launcher Theme
- 編
+ 編集コンピュータをシャットダウンする
@@ -41,7 +41,7 @@
このアプリの設定スリープゴミ箱を空にする
- Open recycle bin
+ ごみ箱を開くIndexing OptionsHibernate computerSave all Flow Launcher settings
@@ -58,17 +58,17 @@
All Flow Launcher settings savedReloaded all applicable plugin dataAre you sure you want to shut the computer down?
- Are you sure you want to restart the computer?
- Are you sure you want to restart the computer with Advanced Boot Options?
- Are you sure you want to log off?
+ 本当にコンピューターを再起動しますか?
+ 高度な起動オプションでコンピューターを再起動しますか?
+ 本当にログオフしますか?Command Keyword SettingCustom Command KeywordEnter a keyword to search for command: {0}. This keyword is used to match your query.Command KeywordReset
- Confirm
-
+ 確認
+ キャンセルPlease enter a non-empty command keywordシステムコマンド
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
index f2049038f..e38e6e68b 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/ko.xaml
@@ -66,7 +66,7 @@
Custom Command KeywordEnter a keyword to search for command: {0}. This keyword is used to match your query.Command Keyword
- Reset
+ 초기화확인취소Please enter a non-empty command keyword
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
index 9ae628853..4112f41ff 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ja.xaml
@@ -34,7 +34,7 @@
タイトル
- Status
+ 状態アイコンを選択アイコンキャンセル
diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
index 3ac9f6a6c..c8f069ca7 100644
--- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
+++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/ko.xaml
@@ -21,20 +21,18 @@
자동완성 데이터 출처:웹 검색을 선택하세요Are you sure you want to delete {0}?
- If you want to add a search for a particular website to Flow, first enter a dummy text string in the search bar of that website, and launch the search. Now copy the contents of the browser's address bar, and paste it in the URL field below. Replace your test string with {q}. For example, if you search for casino on Netflix, its address bar reads
+ 특정 웹사이트의 검색 기능을 Flow에 추가하고 싶다면, 먼저 해당 웹사이트의 검색창에 임의의 텍스트를 입력하고 검색을 실행하세요. 그런 다음 브라우저의 주소 표시줄에 표시된 내용을 복사하여 아래의 URL 필드에 붙여넣습니다. 이때, 검색에 사용한 테스트 문자열을 {q}로 바꿔주세요. 예를 들어, Netflix에서 casino를 검색하면 주소 표시줄에는 다음과 같이 표시됩니다.https://www.netflix.com/search?q=Casino
- Now copy this entire string and paste it in the URL field below.
- Then replace casino with {q}.
- Thus, the generic formula for a search on Netflix is https://www.netflix.com/search?q={q}
+ 이제 이 전체 문자열을 복사해서 아래의 URL 필드에 붙여넣으세요. 그런 다음 casino를 **{q}**로 바꿔주세요. 따라서 Netflix에서의 일반적인 검색 형식은 다음과 같습니다: https://www.netflix.com/search?q={q}
- Copy URL
- Copy search URL to clipboard
+ URL 복사
+ 검색 주소를 클립보드에 복사이름
- Status
+ 상태아이콘 선택아이콘취소
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
index faa8c2dcc..5bf27c746 100644
--- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
+++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Properties/Resources.he-IL.resx
@@ -416,7 +416,7 @@
Area Privacy
- Cangjie IME
+ קלט CangjieArea TimeAndLanguage
@@ -547,7 +547,7 @@
Area Control Panel (legacy settings)
- deuteranopia
+ עיוורון צבעים – אדום־ירוקMedical: Mean you don't can see red colors
@@ -697,7 +697,7 @@
Area Control Panel (legacy settings)
- Game DVR
+ מקליט משחקיםArea Gaming
@@ -721,7 +721,7 @@
Area Control Panel (legacy settings)
- Glance
+ הצצהArea Personalization, Deprecated in Windows 10, version 1809 and later
@@ -1251,7 +1251,7 @@
Area System
- protanopia
+ עיוורון צבעים – אדוםMedical: Mean you don't can see green colors
@@ -1297,7 +1297,7 @@
Mean the weakness you can't differ between red and green colors
- Red week
+ שבוע אדוםMean you don't can see red colors
@@ -1332,7 +1332,7 @@
Area Control Panel (legacy settings)
- schedtasks
+ משימות מתוזמנותFile name, Should not translated
@@ -1544,7 +1544,7 @@
שקיפות
- tritanopia
+ עיוורון צבעים – כחולMedical: Mean you don't can see yellow and blue colors
From 71b6cb2ca53ce28697fb9ed0ee75004aaf712e49 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Sun, 11 May 2025 20:56:21 +0800
Subject: [PATCH 0942/1442] Fix sound effect issue after sleep or hiberation
---
Flow.Launcher/MainWindow.xaml.cs | 33 +++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index e243549e3..46eeb2adc 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -22,6 +22,7 @@ using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel;
+using Microsoft.Win32;
using ModernWpf.Controls;
using DataObject = System.Windows.DataObject;
using Key = System.Windows.Input.Key;
@@ -88,6 +89,8 @@ namespace Flow.Launcher
InitSoundEffects();
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
+
+ SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
}
#endregion
@@ -540,16 +543,29 @@ namespace Flow.Launcher
#region Window Sound Effects
+ private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
+ {
+ // Fix for sound not playing after sleep / hibernate
+ // https://stackoverflow.com/questions/64805186/mediaplayer-doesnt-play-after-computer-sleeps
+ if (e.Mode == PowerModes.Resume)
+ {
+ InitSoundEffects();
+ }
+ }
+
private void InitSoundEffects()
{
if (_settings.WMPInstalled)
{
+ animationSoundWMP?.Close();
animationSoundWMP = new MediaPlayer();
animationSoundWMP.Open(new Uri(AppContext.BaseDirectory + "Resources\\open.wav"));
}
else
{
+ animationSoundWPF?.Dispose();
animationSoundWPF = new SoundPlayer(AppContext.BaseDirectory + "Resources\\open.wav");
+ animationSoundWPF.Load();
}
}
@@ -816,7 +832,7 @@ namespace Flow.Launcher
{
Name = progressBarAnimationName, Storyboard = progressBarStoryBoard
};
-
+
var stopStoryboard = new StopStoryboard()
{
BeginStoryboardName = progressBarAnimationName
@@ -837,7 +853,7 @@ namespace Flow.Launcher
progressStyle.Triggers.Add(trigger);
ProgressBar.Style = progressStyle;
-
+
_viewModel.ProgressBarVisibility = Visibility.Hidden;
}
@@ -885,7 +901,7 @@ namespace Flow.Launcher
Duration = TimeSpan.FromMilliseconds(animationLength),
FillBehavior = FillBehavior.HoldEnd
};
-
+
var rightMargin = GetThicknessFromStyle(ClockPanel.Style, new Thickness(0, 0, DefaultRightMargin, 0)).Right;
var thicknessAnimation = new ThicknessAnimation
@@ -913,10 +929,10 @@ namespace Flow.Launcher
clocksb.Children.Add(ClockOpacity);
iconsb.Children.Add(IconMotion);
iconsb.Children.Add(IconOpacity);
-
+
_settings.WindowLeft = Left;
_isArrowKeyPressed = false;
-
+
clocksb.Begin(ClockPanel);
iconsb.Begin(SearchIcon);
}
@@ -1088,7 +1104,7 @@ namespace Flow.Launcher
{
e.Handled = true;
}
-
+
#endregion
#region Placeholder
@@ -1140,7 +1156,7 @@ namespace Flow.Launcher
}
#endregion
-
+
#region Search Delay
private void QueryTextBox_TextChanged1(object sender, TextChangedEventArgs e)
@@ -1162,6 +1178,9 @@ namespace Flow.Launcher
{
_hwndSource?.Dispose();
_notifyIcon?.Dispose();
+ animationSoundWMP?.Close();
+ animationSoundWPF?.Dispose();
+ SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
}
_disposed = true;
From 165e498a9450c6bb5f05a256b2e96e87564ed340 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 12 May 2025 15:12:23 +0800
Subject: [PATCH 0943/1442] Fix exception when deleteing temp files
---
.../ChromiumBookmarkLoader.cs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
index 66be08903..e859976bd 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
@@ -131,7 +131,17 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
- File.Delete(tempDbPath);
+ try
+ {
+ if (File.Exists(tempDbPath))
+ {
+ File.Delete(tempDbPath);
+ }
+ }
+ catch (Exception ex1)
+ {
+ Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex1);
+ }
Main._context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
return;
}
From 4931a1436a5b12c99f49a596b75b13115ddf4797 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 12 May 2025 17:19:16 +0800
Subject: [PATCH 0944/1442] Validate the cache directory before loading all
bookmarks
---
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
index 9ad31ad14..155069495 100644
--- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
+++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
@@ -37,8 +37,6 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
context.CurrentPluginMetadata.PluginCacheDirectoryPath,
"FaviconCache");
- FilesFolders.ValidateDirectory(_faviconCacheDir);
-
LoadBookmarksIfEnabled();
}
@@ -50,6 +48,9 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
return;
}
+ // Validate the cache directory before loading all bookmarks because Flow needs this directory to storage favicons
+ FilesFolders.ValidateDirectory(_faviconCacheDir);
+
_cachedBookmarks = BookmarkLoader.LoadAllBookmarks(_settings);
_ = MonitorRefreshQueueAsync();
_initialized = true;
From ed148267de6bce771b554b647b64d45ab507f36d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 12 May 2025 20:37:37 +0800
Subject: [PATCH 0945/1442] Do not show error message for initialization if
plugin is already disabled
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index a3e80a73f..eb775c2f0 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -220,9 +220,17 @@ namespace Flow.Launcher.Core.Plugin
catch (Exception e)
{
API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
- pair.Metadata.Disabled = true;
- pair.Metadata.HomeDisabled = true;
- failedPlugins.Enqueue(pair);
+ if (pair.Metadata.Disabled && pair.Metadata.HomeDisabled)
+ {
+ // If this plugin is already disabled, do not show error message again
+ // Or else it will be shown every time
+ }
+ else
+ {
+ pair.Metadata.Disabled = true;
+ pair.Metadata.HomeDisabled = true;
+ failedPlugins.Enqueue(pair);
+ }
}
}));
From b96a69a5b636c91ff00b681adad785446b98f5c4 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 12 May 2025 22:03:00 +0800
Subject: [PATCH 0946/1442] Fix Window Positioning with Multiple Montiors
Co-authored-by: onesounds
---
.../UserSettings/Settings.cs | 4 +
Flow.Launcher/MainWindow.xaml.cs | 87 +++++++++++++++++--
Flow.Launcher/SettingWindow.xaml.cs | 30 ++++++-
3 files changed, 109 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 34bf4f90e..ce1269a29 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -293,6 +293,10 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public double WindowLeft { get; set; }
public double WindowTop { get; set; }
+ public double PreviousScreenWidth { get; set; }
+ public double PreviousScreenHeight { get; set; }
+ public double PreviousDpiX { get; set; }
+ public double PreviousDpiY { get; set; }
///
/// Custom left position on selected monitor
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 46eeb2adc..230472d88 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -711,8 +711,26 @@ namespace Flow.Launcher
{
if (_settings.SearchWindowScreen == SearchWindowScreens.RememberLastLaunchLocation)
{
- Top = _settings.WindowTop;
+ var previousScreenWidth = _settings.PreviousScreenWidth;
+ var previousScreenHeight = _settings.PreviousScreenHeight;
+ GetDpi(out var previousDpiX, out var previousDpiY);
+
+ _settings.PreviousScreenWidth = SystemParameters.VirtualScreenWidth;
+ _settings.PreviousScreenHeight = SystemParameters.VirtualScreenHeight;
+ GetDpi(out var currentDpiX, out var currentDpiY);
+
+ if (previousScreenWidth != 0 && previousScreenHeight != 0 &&
+ previousDpiX != 0 && previousDpiY != 0 &&
+ (previousScreenWidth != SystemParameters.VirtualScreenWidth ||
+ previousScreenHeight != SystemParameters.VirtualScreenHeight ||
+ previousDpiX != currentDpiX || previousDpiY != currentDpiY))
+ {
+ AdjustPositionForResolutionChange();
+ return;
+ }
+
Left = _settings.WindowLeft;
+ Top = _settings.WindowTop;
}
else
{
@@ -725,27 +743,73 @@ namespace Flow.Launcher
break;
case SearchWindowAligns.CenterTop:
Left = HorizonCenter(screen);
- Top = 10;
+ Top = VerticalTop(screen);
break;
case SearchWindowAligns.LeftTop:
Left = HorizonLeft(screen);
- Top = 10;
+ Top = VerticalTop(screen);
break;
case SearchWindowAligns.RightTop:
Left = HorizonRight(screen);
- Top = 10;
+ Top = VerticalTop(screen);
break;
case SearchWindowAligns.Custom:
- Left = Win32Helper.TransformPixelsToDIP(this,
- screen.WorkingArea.X + _settings.CustomWindowLeft, 0).X;
- Top = Win32Helper.TransformPixelsToDIP(this, 0,
- screen.WorkingArea.Y + _settings.CustomWindowTop).Y;
+ var customLeft = Win32Helper.TransformPixelsToDIP(this,
+ screen.WorkingArea.X + _settings.CustomWindowLeft, 0);
+ var customTop = Win32Helper.TransformPixelsToDIP(this, 0,
+ screen.WorkingArea.Y + _settings.CustomWindowTop);
+ Left = customLeft.X;
+ Top = customTop.Y;
break;
}
}
}
}
+ private void AdjustPositionForResolutionChange()
+ {
+ var screenWidth = SystemParameters.VirtualScreenWidth;
+ var screenHeight = SystemParameters.VirtualScreenHeight;
+ GetDpi(out var currentDpiX, out var currentDpiY);
+
+ var previousLeft = _settings.WindowLeft;
+ var previousTop = _settings.WindowTop;
+ GetDpi(out var previousDpiX, out var previousDpiY);
+
+ var widthRatio = screenWidth / _settings.PreviousScreenWidth;
+ var heightRatio = screenHeight / _settings.PreviousScreenHeight;
+ var dpiXRatio = currentDpiX / previousDpiX;
+ var dpiYRatio = currentDpiY / previousDpiY;
+
+ var newLeft = previousLeft * widthRatio * dpiXRatio;
+ var newTop = previousTop * heightRatio * dpiYRatio;
+
+ var screenLeft = SystemParameters.VirtualScreenLeft;
+ var screenTop = SystemParameters.VirtualScreenTop;
+
+ var maxX = screenLeft + screenWidth - ActualWidth;
+ var maxY = screenTop + screenHeight - ActualHeight;
+
+ Left = Math.Max(screenLeft, Math.Min(newLeft, maxX));
+ Top = Math.Max(screenTop, Math.Min(newTop, maxY));
+ }
+
+ private void GetDpi(out double dpiX, out double dpiY)
+ {
+ var source = PresentationSource.FromVisual(this);
+ if (source != null && source.CompositionTarget != null)
+ {
+ var matrix = source.CompositionTarget.TransformToDevice;
+ dpiX = 96 * matrix.M11;
+ dpiY = 96 * matrix.M22;
+ }
+ else
+ {
+ dpiX = 96;
+ dpiY = 96;
+ }
+ }
+
private Screen SelectedScreen()
{
Screen screen;
@@ -806,6 +870,13 @@ namespace Flow.Launcher
return left;
}
+ public double VerticalTop(Screen screen)
+ {
+ var dip1 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
+ var top = dip1.Y + 10;
+ return top;
+ }
+
#endregion
#region Window Animation
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 79bd171ed..cf84317ac 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -137,18 +137,40 @@ public partial class SettingWindow
if (previousTop == null || previousLeft == null || !IsPositionValid(previousTop.Value, previousLeft.Value))
{
- Top = WindowTop();
- Left = WindowLeft();
+ SetWindowPosition(WindowTop(), WindowLeft());
}
else
{
- Top = previousTop.Value;
- Left = previousLeft.Value;
+ var left = _settings.SettingWindowLeft.Value;
+ var top = _settings.SettingWindowTop.Value;
+ AdjustWindowPosition(ref top, ref left);
+ SetWindowPosition(top, left);
}
WindowState = _settings.SettingWindowState;
}
+ private void SetWindowPosition(double top, double left)
+ {
+ // Ensure window does not exceed screen boundaries
+ top = Math.Max(top, SystemParameters.VirtualScreenTop);
+ left = Math.Max(left, SystemParameters.VirtualScreenLeft);
+ top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight);
+ left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth);
+
+ Top = top;
+ Left = left;
+ }
+
+ private void AdjustWindowPosition(ref double top, ref double left)
+ {
+ // Adjust window position if it exceeds screen boundaries
+ top = Math.Max(top, SystemParameters.VirtualScreenTop);
+ left = Math.Max(left, SystemParameters.VirtualScreenLeft);
+ top = Math.Min(top, SystemParameters.VirtualScreenHeight - ActualHeight);
+ left = Math.Min(left, SystemParameters.VirtualScreenWidth - ActualWidth);
+ }
+
private static bool IsPositionValid(double top, double left)
{
foreach (var screen in Screen.AllScreens)
From 7509a86cbfde81f7a0696049b2e0438e6bff4f9a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 09:47:46 +0800
Subject: [PATCH 0947/1442] Use skip message for failed initialization when
plugin is already disabled
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index eb775c2f0..c9d13b61d 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -219,17 +219,18 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
- API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
if (pair.Metadata.Disabled && pair.Metadata.HomeDisabled)
{
// If this plugin is already disabled, do not show error message again
// Or else it will be shown every time
+ API.LogDebug(ClassName, $"Skip init for <{pair.Metadata.Name}>");
}
else
{
pair.Metadata.Disabled = true;
pair.Metadata.HomeDisabled = true;
failedPlugins.Enqueue(pair);
+ API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
}
}
}));
From 810f7bb4a79e76f6c8a950240113500199948702 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 09:58:24 +0800
Subject: [PATCH 0948/1442] Add disable information
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index c9d13b61d..690fda011 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -219,6 +219,7 @@ namespace Flow.Launcher.Core.Plugin
}
catch (Exception e)
{
+ API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
if (pair.Metadata.Disabled && pair.Metadata.HomeDisabled)
{
// If this plugin is already disabled, do not show error message again
@@ -230,7 +231,7 @@ namespace Flow.Launcher.Core.Plugin
pair.Metadata.Disabled = true;
pair.Metadata.HomeDisabled = true;
failedPlugins.Enqueue(pair);
- API.LogException(ClassName, $"Fail to Init plugin: {pair.Metadata.Name}", e);
+ API.LogDebug(ClassName, $"Disable plugin <{pair.Metadata.Name}> because init failed");
}
}
}));
From 58f80996b7691ad8e59d0b8a3b5e20717653f6e8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 10:36:46 +0800
Subject: [PATCH 0949/1442] Fix results context menu display issue
---
.../ViewModels/SettingsPaneThemeViewModel.cs | 2 +-
Flow.Launcher/ViewModel/MainViewModel.cs | 12 +++++++++---
Flow.Launcher/ViewModel/ResultsViewModel.cs | 16 +++++++++++++---
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index d542eb019..f1f3e22c6 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -479,7 +479,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
)
}
};
- var vm = new ResultsViewModel(Settings);
+ var vm = new ResultsViewModel(Settings, null);
vm.AddResults(results, "PREVIEW");
PreviewResults = vm;
}
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 401f71ae3..ac339b715 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -148,19 +148,19 @@ namespace Flow.Launcher.ViewModel
_userSelectedRecord = _userSelectedRecordStorage.Load();
_topMostRecord = _topMostRecordStorage.Load();
- ContextMenu = new ResultsViewModel(Settings)
+ ContextMenu = new ResultsViewModel(Settings, this)
{
LeftClickResultCommand = OpenResultCommand,
RightClickResultCommand = LoadContextMenuCommand,
IsPreviewOn = Settings.AlwaysPreview
};
- Results = new ResultsViewModel(Settings)
+ Results = new ResultsViewModel(Settings, this)
{
LeftClickResultCommand = OpenResultCommand,
RightClickResultCommand = LoadContextMenuCommand,
IsPreviewOn = Settings.AlwaysPreview
};
- History = new ResultsViewModel(Settings)
+ History = new ResultsViewModel(Settings, this)
{
LeftClickResultCommand = OpenResultCommand,
RightClickResultCommand = LoadContextMenuCommand,
@@ -1662,6 +1662,12 @@ namespace Flow.Launcher.ViewModel
return selected;
}
+ internal bool ResultsSelected(ResultsViewModel results)
+ {
+ var selected = SelectedResults == results;
+ return selected;
+ }
+
#endregion
#region Hotkey
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index cd2736afa..799546808 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -21,6 +21,7 @@ namespace Flow.Launcher.ViewModel
private readonly object _collectionLock = new();
private readonly Settings _settings;
+ private readonly MainViewModel _mainVM;
private int MaxResults => _settings?.MaxResultsToShow ?? 6;
public ResultsViewModel()
@@ -29,9 +30,10 @@ namespace Flow.Launcher.ViewModel
BindingOperations.EnableCollectionSynchronization(Results, _collectionLock);
}
- public ResultsViewModel(Settings settings) : this()
+ public ResultsViewModel(Settings settings, MainViewModel mainVM) : this()
{
_settings = settings;
+ _mainVM = mainVM;
_settings.PropertyChanged += (s, e) =>
{
switch (e.PropertyName)
@@ -179,6 +181,7 @@ namespace Flow.Launcher.ViewModel
UpdateResults(newResults);
}
+
///
/// To avoid deadlock, this method should not called from main thread
///
@@ -202,11 +205,18 @@ namespace Flow.Launcher.ViewModel
SelectedItem = Results[0];
}
+ if (token.IsCancellationRequested)
+ return;
+
switch (Visibility)
{
case Visibility.Collapsed when Results.Count > 0:
- SelectedIndex = 0;
- Visibility = Visibility.Visible;
+ // Show it only if the results are selected
+ if (_mainVM == null || _mainVM.ResultsSelected(this))
+ {
+ SelectedIndex = 0;
+ Visibility = Visibility.Visible;
+ }
break;
case Visibility.Visible when Results.Count == 0:
Visibility = Visibility.Collapsed;
From fa350ddb0779f70d2fa0fbd0f7bf37c84c110638 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 10:48:00 +0800
Subject: [PATCH 0950/1442] Add code comments
---
Flow.Launcher/ViewModel/ResultsViewModel.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index 799546808..b91bf0f30 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -211,8 +211,8 @@ namespace Flow.Launcher.ViewModel
switch (Visibility)
{
case Visibility.Collapsed when Results.Count > 0:
- // Show it only if the results are selected
- if (_mainVM == null || _mainVM.ResultsSelected(this))
+ if (_mainVM == null || // The results is for preview only in apprerance page
+ _mainVM.ResultsSelected(this)) // The results are selected
{
SelectedIndex = 0;
Visibility = Visibility.Visible;
From 8e7e1738507a0f99f75f5b7898743d8b6bf66821 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 10:49:40 +0800
Subject: [PATCH 0951/1442] Add code comments
---
.../SettingPages/ViewModels/SettingsPaneThemeViewModel.cs | 1 +
Flow.Launcher/ViewModel/ResultsViewModel.cs | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index f1f3e22c6..07d70a67c 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -479,6 +479,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
)
}
};
+ // Set main view model to null because this results are for preview only
var vm = new ResultsViewModel(Settings, null);
vm.AddResults(results, "PREVIEW");
PreviewResults = vm;
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index b91bf0f30..0dc1b85c4 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -211,7 +211,7 @@ namespace Flow.Launcher.ViewModel
switch (Visibility)
{
case Visibility.Collapsed when Results.Count > 0:
- if (_mainVM == null || // The results is for preview only in apprerance page
+ if (_mainVM == null || // The results are for preview only in apprerance page
_mainVM.ResultsSelected(this)) // The results are selected
{
SelectedIndex = 0;
From 03b558c1fc0947d6994f0c71d5ae002f50e52123 Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Tue, 13 May 2025 10:51:44 +0800
Subject: [PATCH 0952/1442] Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher/ViewModel/ResultsViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs
index 0dc1b85c4..b100bba25 100644
--- a/Flow.Launcher/ViewModel/ResultsViewModel.cs
+++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs
@@ -211,7 +211,7 @@ namespace Flow.Launcher.ViewModel
switch (Visibility)
{
case Visibility.Collapsed when Results.Count > 0:
- if (_mainVM == null || // The results are for preview only in apprerance page
+ if (_mainVM == null || // The results are for preview only in appearance page
_mainVM.ResultsSelected(this)) // The results are selected
{
SelectedIndex = 0;
From a73ff5f1227598231420e7778a0f76ded73a9c14 Mon Sep 17 00:00:00 2001
From: Jeremy Wu
Date: Tue, 13 May 2025 13:07:49 +1000
Subject: [PATCH 0953/1442] update comment
---
Flow.Launcher.Core/Plugin/PluginManager.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs
index 690fda011..aae8dd764 100644
--- a/Flow.Launcher.Core/Plugin/PluginManager.cs
+++ b/Flow.Launcher.Core/Plugin/PluginManager.cs
@@ -224,7 +224,7 @@ namespace Flow.Launcher.Core.Plugin
{
// If this plugin is already disabled, do not show error message again
// Or else it will be shown every time
- API.LogDebug(ClassName, $"Skip init for <{pair.Metadata.Name}>");
+ API.LogDebug(ClassName, $"Skipped init for <{pair.Metadata.Name}> due to error");
}
else
{
From 93a9a92a4068906a67d46178503e09f312cb43a0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 11:11:50 +0800
Subject: [PATCH 0954/1442] Fix typos
---
.../SettingPages/ViewModels/SettingsPaneThemeViewModel.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
index 07d70a67c..79465cd71 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
@@ -479,7 +479,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel
)
}
};
- // Set main view model to null because this results are for preview only
+ // Set main view model to null because the results are for preview only
var vm = new ResultsViewModel(Settings, null);
vm.AddResults(results, "PREVIEW");
PreviewResults = vm;
From e0ac6d5feed2b4f86e7cfcf19a476506d538b362 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 12:49:35 +0800
Subject: [PATCH 0955/1442] Improve Program plugin delete button logic
---
.../Languages/en.xaml | 1 +
.../Views/ProgramSetting.xaml | 6 ++
.../Views/ProgramSetting.xaml.cs | 72 ++++++++++++-------
3 files changed, 54 insertions(+), 25 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
index ee6b4379d..c19347f2a 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
@@ -48,6 +48,7 @@
Please select a program sourceAre you sure you want to delete the selected program sources?
+ Please select program sources that you addedAnother program source with the same location already exists.Program Source
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml
index 5c0ba8d0b..3bf1c6ad1 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml
@@ -203,6 +203,12 @@
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Click="btnEditProgramSource_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_edit}" />
+ 0
@@ -141,6 +142,7 @@ namespace Flow.Launcher.Plugin.Program.Views
{
btnProgramSourceStatus.Visibility = Visibility.Visible;
btnEditProgramSource.Visibility = Visibility.Visible;
+ btnDeleteProgramSource.Visibility = Visibility.Visible;
}
programSourceView.Items.Refresh();
@@ -270,8 +272,8 @@ namespace Flow.Launcher.Plugin.Program.Views
if (directoriesToAdd.Count > 0)
{
- directoriesToAdd.ForEach(x => _settings.ProgramSources.Add(x));
- directoriesToAdd.ForEach(x => ProgramSettingDisplayList.Add(x));
+ directoriesToAdd.ForEach(_settings.ProgramSources.Add);
+ directoriesToAdd.ForEach(ProgramSettingDisplayList.Add);
ViewRefresh();
ReIndexing();
@@ -296,24 +298,12 @@ namespace Flow.Launcher.Plugin.Program.Views
if (selectedItems.Count == 0)
{
- string msg = context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source");
+ var msg = context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source");
context.API.ShowMsgBox(msg);
return;
}
- if (IsAllItemsUserAdded(selectedItems))
- {
- var msg = string.Format(
- context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source"));
-
- if (context.API.ShowMsgBox(msg, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
- {
- return;
- }
-
- DeleteProgramSources(selectedItems);
- }
- else if (HasMoreOrEqualEnabledItems(selectedItems))
+ if (HasMoreOrEqualEnabledItems(selectedItems))
{
await ProgramSettingDisplay.SetProgramSourcesStatusAsync(selectedItems, false);
@@ -341,10 +331,9 @@ namespace Flow.Launcher.Plugin.Program.Views
private void GridViewColumnHeaderClickedHandler(object sender, RoutedEventArgs e)
{
- var headerClicked = e.OriginalSource as GridViewColumnHeader;
ListSortDirection direction;
- if (headerClicked != null)
+ if (e.OriginalSource is GridViewColumnHeader headerClicked)
{
if (headerClicked.Role != GridViewColumnHeaderRole.Padding)
{
@@ -397,11 +386,7 @@ namespace Flow.Launcher.Plugin.Program.Views
.SelectedItems.Cast()
.ToList();
- if (IsAllItemsUserAdded(selectedItems))
- {
- btnProgramSourceStatus.Content = context.API.GetTranslation("flowlauncher_plugin_program_delete");
- }
- else if (HasMoreOrEqualEnabledItems(selectedItems))
+ if (HasMoreOrEqualEnabledItems(selectedItems))
{
btnProgramSourceStatus.Content = context.API.GetTranslation("flowlauncher_plugin_program_disable");
}
@@ -420,6 +405,43 @@ namespace Flow.Launcher.Plugin.Program.Views
}
}
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "")]
+ private async void btnDeleteProgramSource_OnClick(object sender, RoutedEventArgs e)
+ {
+ var selectedItems = programSourceView
+ .SelectedItems.Cast()
+ .ToList();
+
+ if (selectedItems.Count == 0)
+ {
+ var msg = context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source");
+ context.API.ShowMsgBox(msg);
+ return;
+ }
+
+ if (!IsAllItemsUserAdded(selectedItems))
+ {
+ var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_not_user_added");
+ context.API.ShowMsgBox(msg1);
+ return;
+ }
+
+ var msg2 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source");
+ if (context.API.ShowMsgBox(msg2, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
+ {
+ return;
+ }
+
+ DeleteProgramSources(selectedItems);
+
+ if (await selectedItems.IsReindexRequiredAsync())
+ ReIndexing();
+
+ programSourceView.SelectedItems.Clear();
+
+ ViewRefresh();
+ }
+
private bool IsAllItemsUserAdded(List items)
{
return items.All(x => _settings.ProgramSources.Any(y => y.UniqueIdentifier == x.UniqueIdentifier));
@@ -427,8 +449,8 @@ namespace Flow.Launcher.Plugin.Program.Views
private void ListView_SizeChanged(object sender, SizeChangedEventArgs e)
{
- ListView listView = sender as ListView;
- GridView gView = listView.View as GridView;
+ var listView = sender as ListView;
+ var gView = listView.View as GridView;
var workingWidth =
listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
From 284729afb5ef3e5450f15e5f278612d3c4f5a3d7 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 13:01:24 +0800
Subject: [PATCH 0956/1442] Improve message noticification
---
Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml | 3 ++-
.../Views/ProgramSetting.xaml.cs | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
index c19347f2a..bf6de50fe 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
@@ -48,7 +48,8 @@
Please select a program sourceAre you sure you want to delete the selected program sources?
- Please select program sources that you added
+ Please select program sources that are not added by you
+ Please select program sources that are added by youAnother program source with the same location already exists.Program Source
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 71879181e..59ee40c12 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -303,6 +303,13 @@ namespace Flow.Launcher.Plugin.Program.Views
return;
}
+ if (IsAllItemsUserAdded(selectedItems))
+ {
+ var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_not_user_added");
+ context.API.ShowMsgBox(msg1);
+ return;
+ }
+
if (HasMoreOrEqualEnabledItems(selectedItems))
{
await ProgramSettingDisplay.SetProgramSourcesStatusAsync(selectedItems, false);
From a0999351697248e1f90a6198eb2bbd5a0eae839c Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 13:03:04 +0800
Subject: [PATCH 0957/1442] Fix message
---
Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml | 4 ++--
.../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
index bf6de50fe..65fd8951c 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
@@ -48,8 +48,8 @@
Please select a program sourceAre you sure you want to delete the selected program sources?
- Please select program sources that are not added by you
- Please select program sources that are added by you
+ Please select program sources that are not added by you
+ Please select program sources that are added by youAnother program source with the same location already exists.Program Source
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 59ee40c12..8b19ba81c 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -428,7 +428,7 @@ namespace Flow.Launcher.Plugin.Program.Views
if (!IsAllItemsUserAdded(selectedItems))
{
- var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_not_user_added");
+ var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_user_added");
context.API.ShowMsgBox(msg1);
return;
}
From 204d1d285a4cb26b29692588704fba4c9d95270d Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 13:04:26 +0800
Subject: [PATCH 0958/1442] Improve string keys
---
Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml | 4 ++--
.../Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
index 65fd8951c..e551a7dcb 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
+++ b/Plugins/Flow.Launcher.Plugin.Program/Languages/en.xaml
@@ -48,8 +48,8 @@
Please select a program sourceAre you sure you want to delete the selected program sources?
- Please select program sources that are not added by you
- Please select program sources that are added by you
+ Please select program sources that are not added by you
+ Please select program sources that are added by youAnother program source with the same location already exists.Program Source
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 8b19ba81c..6ae1c4422 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -305,7 +305,7 @@ namespace Flow.Launcher.Plugin.Program.Views
if (IsAllItemsUserAdded(selectedItems))
{
- var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_not_user_added");
+ var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_select_not_user_added");
context.API.ShowMsgBox(msg1);
return;
}
@@ -428,7 +428,7 @@ namespace Flow.Launcher.Plugin.Program.Views
if (!IsAllItemsUserAdded(selectedItems))
{
- var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_user_added");
+ var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_select_user_added");
context.API.ShowMsgBox(msg1);
return;
}
From e961ffaa7a8d7dd52ab0dcb66bf081a0eb97c991 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 13:08:20 +0800
Subject: [PATCH 0959/1442] Disable auto restart after plugin install by
default
---
Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs
index 811bec50c..f23ff71f0 100644
--- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs
+++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs
@@ -10,6 +10,6 @@
public bool WarnFromUnknownSource { get; set; } = true;
- public bool AutoRestartAfterChanging { get; set; } = true;
+ public bool AutoRestartAfterChanging { get; set; } = false;
}
}
From 8aa36f38c82a388c386d7e3d86c44798dad632ad Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 21:50:13 +0800
Subject: [PATCH 0960/1442] Add ShowAtTopmost in settings
---
.../UserSettings/Settings.cs | 38 +++++++++++++++----
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 34bf4f90e..3f382c276 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -59,8 +59,11 @@ namespace Flow.Launcher.Infrastructure.UserSettings
get => _language;
set
{
- _language = value;
- OnPropertyChanged();
+ if (_language != value)
+ {
+ _language = value;
+ OnPropertyChanged();
+ }
}
}
public string Theme
@@ -68,7 +71,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
get => _theme;
set
{
- if (value != _theme)
+ if (_theme != value)
{
_theme = value;
OnPropertyChanged();
@@ -283,9 +286,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings
get => _querySearchPrecision;
set
{
- _querySearchPrecision = value;
- if (_stringMatcher != null)
- _stringMatcher.UserSettingSearchPrecision = value;
+ if (_querySearchPrecision != value)
+ {
+ _querySearchPrecision = value;
+ if (_stringMatcher != null)
+ _stringMatcher.UserSettingSearchPrecision = value;
+ }
}
}
@@ -348,12 +354,28 @@ namespace Flow.Launcher.Infrastructure.UserSettings
get => _hideNotifyIcon;
set
{
- _hideNotifyIcon = value;
- OnPropertyChanged();
+ if (_hideNotifyIcon != value)
+ {
+ _hideNotifyIcon = value;
+ OnPropertyChanged();
+ }
}
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactivated { get; set; } = true;
+ private bool _showAtTopmost;
+ public bool ShowAtTopmost
+ {
+ get => _showAtTopmost;
+ set
+ {
+ if (_showAtTopmost != value)
+ {
+ _showAtTopmost = value;
+ OnPropertyChanged();
+ }
+ }
+ }
public bool SearchQueryResultsWithDelay { get; set; }
public int SearchDelayTime { get; set; } = 150;
From 587ab629aa9b831ba8ed684eb2039dbba6b28ff1 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 21:54:03 +0800
Subject: [PATCH 0961/1442] Support changing ShowAtTopmost
---
Flow.Launcher/MainWindow.xaml.cs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 46eeb2adc..72a990ada 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -84,6 +84,8 @@ namespace Flow.Launcher
_viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ Topmost = _settings.ShowAtTopmost;
+
InitializeComponent();
UpdatePosition();
@@ -283,6 +285,9 @@ namespace Flow.Launcher
_viewModel.QueryResults();
}
break;
+ case nameof(Settings.ShowAtTopmost):
+ Topmost = _settings.ShowAtTopmost;
+ break;
}
};
From 4e88ce3f48b9eae47dc57c595acfe7862b540476 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 22:01:36 +0800
Subject: [PATCH 0962/1442] Set ShowAtTopmost default to true
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 3f382c276..7cd3821dc 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -363,7 +363,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactivated { get; set; } = true;
- private bool _showAtTopmost;
+ private bool _showAtTopmost = true;
public bool ShowAtTopmost
{
get => _showAtTopmost;
From b8f743eb4c2ad44bc89366698a6ee8543d1d5343 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 22:06:04 +0800
Subject: [PATCH 0963/1442] Add ui in general setting page
---
Flow.Launcher/Languages/en.xaml | 2 ++
.../SettingPages/Views/SettingsPaneGeneral.xaml | 11 +++++++++++
2 files changed, 13 insertions(+)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 22ab2016c..f728f1095 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -131,6 +131,8 @@
Show History Results in Home PageMaximum History Results Shown in Home PageThis can only be edited if plugin supports Home feature and Home Page is enabled.
+ Show Search Window at Topmost
+ Show search window above other windowsSearch Plugin
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index c0c5613de..fba1b3d86 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -77,6 +77,17 @@
OnContent="{DynamicResource enable}" />
+
+
+
+
From b636f253e65114639dca2aa7d14271d013a993a6 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 13 May 2025 22:52:06 +0800
Subject: [PATCH 0964/1442] Add blank line
---
Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 7cd3821dc..8dc48f7f2 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -363,6 +363,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactivated { get; set; } = true;
+
private bool _showAtTopmost = true;
public bool ShowAtTopmost
{
From da770855083b33eb6fab955eda4a06ac052da54f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 14 May 2025 11:37:55 +0800
Subject: [PATCH 0965/1442] Fix logic & Improve code quality
---
.../Views/ProgramSetting.xaml.cs | 22 +++++--------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index 6ae1c4422..9ac447085 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -298,15 +298,7 @@ namespace Flow.Launcher.Plugin.Program.Views
if (selectedItems.Count == 0)
{
- var msg = context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source");
- context.API.ShowMsgBox(msg);
- return;
- }
-
- if (IsAllItemsUserAdded(selectedItems))
- {
- var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_select_not_user_added");
- context.API.ShowMsgBox(msg1);
+ context.API.ShowMsgBox(context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source"));
return;
}
@@ -376,7 +368,7 @@ namespace Flow.Launcher.Plugin.Program.Views
var dataView = CollectionViewSource.GetDefaultView(programSourceView.ItemsSource);
dataView.SortDescriptions.Clear();
- SortDescription sd = new SortDescription(sortBy, direction);
+ var sd = new SortDescription(sortBy, direction);
dataView.SortDescriptions.Add(sd);
dataView.Refresh();
}
@@ -421,20 +413,18 @@ namespace Flow.Launcher.Plugin.Program.Views
if (selectedItems.Count == 0)
{
- var msg = context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source");
- context.API.ShowMsgBox(msg);
+ context.API.ShowMsgBox(context.API.GetTranslation("flowlauncher_plugin_program_pls_select_program_source"));
return;
}
if (!IsAllItemsUserAdded(selectedItems))
{
- var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_select_user_added");
- context.API.ShowMsgBox(msg1);
+ context.API.ShowMsgBox(context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_select_user_added"));
return;
}
- var msg2 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source");
- if (context.API.ShowMsgBox(msg2, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
+ if (context.API.ShowMsgBox(context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source"),
+ string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
{
return;
}
From f0aa285199266843b447635a1cafa8aa5f0c97bd Mon Sep 17 00:00:00 2001
From: DB P
Date: Wed, 14 May 2025 12:50:45 +0900
Subject: [PATCH 0966/1442] Add theme change handler to refresh frame on
application theme change
---
Flow.Launcher/MainWindow.xaml.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 46eeb2adc..0b7ebf148 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -89,7 +89,7 @@ namespace Flow.Launcher
InitSoundEffects();
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
-
+ ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged;
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
}
@@ -543,6 +543,10 @@ namespace Flow.Launcher
#region Window Sound Effects
+ private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager sender, object args)
+ {
+ _theme.RefreshFrameAsync();
+ }
private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
// Fix for sound not playing after sleep / hibernate
From 1e51bdc37b147cd4c9125951e7953d28da7142e0 Mon Sep 17 00:00:00 2001
From: DB P
Date: Wed, 14 May 2025 13:03:31 +0900
Subject: [PATCH 0967/1442] Unsubscribe from theme change event to prevent
memory leaks
---
Flow.Launcher/MainWindow.xaml.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 0b7ebf148..ab26d417c 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -1184,6 +1184,7 @@ namespace Flow.Launcher
_notifyIcon?.Dispose();
animationSoundWMP?.Close();
animationSoundWPF?.Dispose();
+ ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
}
From c128a667722ece5c67b3370765a0c2d5e83bc9f3 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 14 May 2025 12:09:18 +0800
Subject: [PATCH 0968/1442] Manage handle in dispose
---
Flow.Launcher/MainWindow.xaml.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 0b7ebf148..4465c8e33 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -99,6 +99,11 @@ namespace Flow.Launcher
#pragma warning disable VSTHRD100 // Avoid async void methods
+ private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager sender, object args)
+ {
+ _theme.RefreshFrameAsync();
+ }
+
private void OnSourceInitialized(object sender, EventArgs e)
{
var handle = Win32Helper.GetWindowHandle(this, true);
@@ -543,10 +548,6 @@ namespace Flow.Launcher
#region Window Sound Effects
- private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager sender, object args)
- {
- _theme.RefreshFrameAsync();
- }
private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
// Fix for sound not playing after sleep / hibernate
@@ -1184,6 +1185,7 @@ namespace Flow.Launcher
_notifyIcon?.Dispose();
animationSoundWMP?.Close();
animationSoundWPF?.Dispose();
+ ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
}
From 8325963047c112e9762cf1ab25089bd11d563a90 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Wed, 14 May 2025 14:23:35 +0800
Subject: [PATCH 0969/1442] Fix size changed width issue
---
.../Views/ProgramSetting.xaml.cs | 3 +++
Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs | 11 +++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
index deb110698..57c1542e4 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs
@@ -432,6 +432,9 @@ namespace Flow.Launcher.Plugin.Program.Views
var workingWidth =
listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
+
+ if (workingWidth <= 0) return;
+
var col1 = 0.25;
var col2 = 0.15;
var col3 = 0.60;
diff --git a/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs
index 0a38fda04..1a8621eeb 100644
--- a/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs
+++ b/Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml.cs
@@ -21,16 +21,15 @@ namespace Flow.Launcher.Plugin.Sys
ListView listView = sender as ListView;
GridView gView = listView.View as GridView;
- var workingWidth = listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
+ var workingWidth =
+ listView.ActualWidth - SystemParameters.VerticalScrollBarWidth; // take into account vertical scrollbar
+
+ if (workingWidth <= 0) return;
+
var col1 = 0.2;
var col2 = 0.6;
var col3 = 0.2;
- if (workingWidth <= 0)
- {
- return;
- }
-
gView.Columns[0].Width = workingWidth * col1;
gView.Columns[1].Width = workingWidth * col2;
gView.Columns[2].Width = workingWidth * col3;
From e417a1d3a6eed686eef4934b7c0bbde05cc26303 Mon Sep 17 00:00:00 2001
From: DB P
Date: Thu, 15 May 2025 16:42:11 +0900
Subject: [PATCH 0970/1442] Add dynamic font family to SettingWindow
---
Flow.Launcher/SettingWindow.xaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index a75a51c8f..da128266c 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -13,6 +13,7 @@
MinHeight="600"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
Closed="OnClosed"
+ FontFamily="{DynamicResource SettingWindowFont}"
Icon="Images\app.ico"
Left="{Binding SettingWindowLeft, Mode=TwoWay}"
Loaded="OnLoaded"
From 57dccce1bf04664b7e49721ab5e720a8d21dca18 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 15 May 2025 18:35:57 +0800
Subject: [PATCH 0971/1442] Fix setting window navigation update issue & Check
view model null instead of IsInitialized flag
---
.../Resources/Pages/WelcomePage1.xaml.cs | 2 +-
.../Resources/Pages/WelcomePage2.xaml.cs | 2 +-
.../Resources/Pages/WelcomePage3.xaml.cs | 2 +-
.../Resources/Pages/WelcomePage4.xaml.cs | 2 +-
.../Resources/Pages/WelcomePage5.xaml.cs | 2 +-
.../Views/SettingsPaneAbout.xaml.cs | 8 ++++-
.../Views/SettingsPaneGeneral.xaml.cs | 8 ++++-
.../Views/SettingsPaneHotkey.xaml.cs | 8 ++++-
.../Views/SettingsPanePluginStore.xaml.cs | 7 +++-
.../Views/SettingsPanePlugins.xaml.cs | 7 +++-
.../Views/SettingsPaneProxy.xaml.cs | 8 ++++-
.../Views/SettingsPaneTheme.xaml.cs | 8 ++++-
Flow.Launcher/SettingWindow.xaml.cs | 33 +++++++++++++++++--
.../ViewModel/SettingWindowViewModel.cs | 18 +++++++++-
14 files changed, 100 insertions(+), 15 deletions(-)
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
index a3b008206..1b1dd21e9 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
@@ -14,7 +14,7 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
index a63edbcda..7408d8a14 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
@@ -16,7 +16,7 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
index 4a6610e61..bd14bf0f7 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
@@ -12,7 +12,7 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
index 1ee3284d2..b20e4ce0a 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
@@ -12,7 +12,7 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
index 6328c9914..84d298966 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
@@ -15,7 +15,7 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
index e57cba6d4..93515caec 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
@@ -1,21 +1,27 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneAbout
{
private SettingsPaneAboutViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneAbout);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index 31653962d..fa3406bd9 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -1,21 +1,27 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneGeneral
{
private SettingsPaneGeneralViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneGeneral);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
index 8b757bd60..e590dc9a8 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
@@ -1,21 +1,27 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneHotkey
{
private SettingsPaneHotkeyViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneHotkey);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
index 5ddfe4650..aa6900dae 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
@@ -11,16 +11,21 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPanePluginStore
{
private SettingsPanePluginStoreViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPanePluginStore);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
index e9490804a..6424aabdf 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
@@ -11,16 +11,21 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPanePlugins
{
private SettingsPanePluginsViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPanePlugins);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
index 258f2a4ad..c89a050f5 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
@@ -1,21 +1,27 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneProxy
{
private SettingsPaneProxyViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneProxy);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index cee8e4ae4..8759c8efc 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -1,21 +1,27 @@
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
+using Flow.Launcher.ViewModel;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneTheme
{
private SettingsPaneThemeViewModel _viewModel = null!;
+ private SettingWindowViewModel _settingViewModel = null;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- if (!IsInitialized)
+ if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
+ _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
InitializeComponent();
}
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneTheme);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index cf84317ac..14e4343e3 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
@@ -18,6 +19,7 @@ public partial class SettingWindow
#region Private Fields
private readonly Settings _settings;
+ private readonly SettingWindowViewModel _viewModel;
#endregion
@@ -26,8 +28,8 @@ public partial class SettingWindow
public SettingWindow()
{
_settings = Ioc.Default.GetRequiredService();
- var viewModel = Ioc.Default.GetRequiredService();
- DataContext = viewModel;
+ _viewModel = Ioc.Default.GetRequiredService();
+ DataContext = _viewModel;
InitializeComponent();
UpdatePositionAndState();
@@ -48,10 +50,37 @@ public partial class SettingWindow
hwndTarget.RenderMode = RenderMode.SoftwareOnly; // Must use software only render mode here
UpdatePositionAndState();
+
+ _viewModel.PropertyChanged += ViewModel_PropertyChanged;
+ }
+
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to update the selected item here
+ private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ switch (e.PropertyName)
+ {
+ case nameof(SettingWindowViewModel.PageType):
+ var selectedIndex = _viewModel.PageType.Name switch
+ {
+ nameof(SettingsPaneGeneral) => 0,
+ nameof(SettingsPanePlugins) => 1,
+ nameof(SettingsPanePluginStore) => 2,
+ nameof(SettingsPaneTheme) => 3,
+ nameof(SettingsPaneHotkey) => 4,
+ nameof(SettingsPaneProxy) => 5,
+ nameof(SettingsPaneAbout) => 6,
+ _ => 0
+ };
+ NavView.SelectedItem = NavView.MenuItems[selectedIndex];
+ break;
+ }
}
private void OnClosed(object sender, EventArgs e)
{
+ _viewModel.PropertyChanged -= ViewModel_PropertyChanged;
+
// If app is exiting, settings save is not needed because main window closing event will handle this
if (App.Exiting) return;
// Save settings when window is closed
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 17a1a2b50..9e7eaf6e8 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -1,5 +1,7 @@
-using Flow.Launcher.Infrastructure.UserSettings;
+using System;
+using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
+using Flow.Launcher.SettingPages.Views;
namespace Flow.Launcher.ViewModel;
@@ -12,6 +14,20 @@ public partial class SettingWindowViewModel : BaseModel
_settings = settings;
}
+ private Type _pageType = typeof(SettingsPaneGeneral);
+ public Type PageType
+ {
+ get => _pageType;
+ set
+ {
+ if (_pageType != value)
+ {
+ _pageType = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
public double SettingWindowWidth
{
get => _settings.SettingWindowWidth;
From 1a67c8906b42a9e0bffba8a497a57703de7ae7e8 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 15 May 2025 19:36:45 +0800
Subject: [PATCH 0972/1442] Fix component initialization issue
---
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs | 4 ++++
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs | 4 ++++
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs | 4 ++++
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs | 4 ++++
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs | 4 ++++
.../SettingPages/Views/SettingsPanePluginStore.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs | 4 ++++
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs | 4 ++++
12 files changed, 48 insertions(+)
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
index 1b1dd21e9..3199e81b7 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
@@ -14,10 +14,14 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
index 7408d8a14..1eef9fc8c 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
@@ -16,10 +16,14 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
index bd14bf0f7..d27368aa1 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
@@ -12,10 +12,14 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
index b20e4ce0a..b0999504b 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
@@ -12,10 +12,14 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
index 84d298966..2ece4ce88 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
@@ -15,10 +15,14 @@ namespace Flow.Launcher.Resources.Pages
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
Settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
index 93515caec..00426546a 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
@@ -12,11 +12,15 @@ public partial class SettingsPaneAbout
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index fa3406bd9..524e4f5f5 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -12,11 +12,15 @@ public partial class SettingsPaneGeneral
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
index e590dc9a8..53a639aa5 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
@@ -12,11 +12,15 @@ public partial class SettingsPaneHotkey
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
index aa6900dae..34cd33ec1 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
@@ -15,11 +15,15 @@ public partial class SettingsPanePluginStore
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
index 6424aabdf..94e0d24a2 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
@@ -15,11 +15,15 @@ public partial class SettingsPanePlugins
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
index c89a050f5..aa47383e8 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
@@ -12,11 +12,15 @@ public partial class SettingsPaneProxy
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index 8759c8efc..215a8c70c 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -12,11 +12,15 @@ public partial class SettingsPaneTheme
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
_settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
+ }
+ if (!IsInitialized)
+ {
InitializeComponent();
}
// Sometimes the navigation is not triggered by button click,
From 5b17fad67cab25ba9da890d188c988f03835f74a Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 15 May 2025 19:51:30 +0800
Subject: [PATCH 0973/1442] Fix duplicated value change
---
Flow.Launcher/SettingWindow.xaml.cs | 1 +
Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 14e4343e3..d8444d45d 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -263,6 +263,7 @@ public partial class SettingWindow
nameof(About) => typeof(SettingsPaneAbout),
_ => typeof(SettingsPaneGeneral)
};
+ _viewModel.SetPageType(pageType);
ContentFrame.Navigate(pageType);
}
}
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 9e7eaf6e8..5b130eb6d 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -14,6 +14,11 @@ public partial class SettingWindowViewModel : BaseModel
_settings = settings;
}
+ public void SetPageType(Type pageType)
+ {
+ _pageType = pageType;
+ }
+
private Type _pageType = typeof(SettingsPaneGeneral);
public Type PageType
{
From d0e799b8edaf7378d38a7ef8bf71311dda29e262 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 15 May 2025 20:16:50 +0800
Subject: [PATCH 0974/1442] Fix double navigation issue
---
.../SettingPages/Views/SettingsPaneAbout.xaml.cs | 10 +++++-----
.../SettingPages/Views/SettingsPaneGeneral.xaml.cs | 10 +++++-----
.../SettingPages/Views/SettingsPaneHotkey.xaml.cs | 10 +++++-----
.../Views/SettingsPanePluginStore.xaml.cs | 10 +++++-----
.../SettingPages/Views/SettingsPanePlugins.xaml.cs | 10 +++++-----
.../SettingPages/Views/SettingsPaneProxy.xaml.cs | 10 +++++-----
.../SettingPages/Views/SettingsPaneTheme.xaml.cs | 10 +++++-----
Flow.Launcher/SettingWindow.xaml.cs | 11 ++++++++---
Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 8 +++++---
9 files changed, 48 insertions(+), 41 deletions(-)
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
index 00426546a..47532b243 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs
@@ -8,24 +8,24 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneAbout
{
private SettingsPaneAboutViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneAbout);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPaneAbout);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
index 524e4f5f5..753cb7b0e 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs
@@ -8,24 +8,24 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneGeneral
{
private SettingsPaneGeneralViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneGeneral);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPaneGeneral);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
index 53a639aa5..202869bc5 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
@@ -8,24 +8,24 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneHotkey
{
private SettingsPaneHotkeyViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneHotkey);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPaneHotkey);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
index 34cd33ec1..c0a77957a 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml.cs
@@ -11,15 +11,18 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPanePluginStore
{
private SettingsPanePluginStoreViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPanePluginStore);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
@@ -27,9 +30,6 @@ public partial class SettingsPanePluginStore
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPanePluginStore);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
index 94e0d24a2..f486a3443 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml.cs
@@ -11,15 +11,18 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPanePlugins
{
private SettingsPanePluginsViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPanePlugins);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
@@ -27,9 +30,6 @@ public partial class SettingsPanePlugins
InitializeComponent();
}
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPanePlugins);
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
index aa47383e8..3e617229d 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml.cs
@@ -8,24 +8,24 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneProxy
{
private SettingsPaneProxyViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneProxy);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPaneProxy);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
index 215a8c70c..170003994 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
@@ -8,24 +8,24 @@ namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneTheme
{
private SettingsPaneThemeViewModel _viewModel = null!;
- private SettingWindowViewModel _settingViewModel = null;
+ private readonly SettingWindowViewModel _settingViewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page type
+ _settingViewModel.PageType = typeof(SettingsPaneTheme);
+
// If the navigation is not triggered by button click, view model will be null again
if (_viewModel == null)
{
_viewModel = Ioc.Default.GetRequiredService();
- _settingViewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
}
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page type
- _settingViewModel.PageType = typeof(SettingsPaneTheme);
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index d8444d45d..ebbb38414 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -241,6 +241,7 @@ public partial class SettingWindow
{
if (args.IsSettingsSelected)
{
+ _viewModel.SetPageType(typeof(SettingsPaneGeneral));
ContentFrame.Navigate(typeof(SettingsPaneGeneral));
}
else
@@ -263,8 +264,11 @@ public partial class SettingWindow
nameof(About) => typeof(SettingsPaneAbout),
_ => typeof(SettingsPaneGeneral)
};
- _viewModel.SetPageType(pageType);
- ContentFrame.Navigate(pageType);
+ // Only navigate if the page type changes to fix navigation forward/back issue
+ if (_viewModel.SetPageType(pageType))
+ {
+ ContentFrame.Navigate(pageType);
+ }
}
}
@@ -282,7 +286,8 @@ public partial class SettingWindow
private void ContentFrame_Loaded(object sender, RoutedEventArgs e)
{
- NavView.SelectedItem ??= NavView.MenuItems[0]; /* Set First Page */
+ _viewModel.SetPageType(null); // Set page type to null so that NavigationView_SelectionChanged can navigate the frame
+ NavView.SelectedItem = NavView.MenuItems[0]; /* Set First Page */
}
#endregion
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 5b130eb6d..1134a81b8 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -1,7 +1,6 @@
using System;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
-using Flow.Launcher.SettingPages.Views;
namespace Flow.Launcher.ViewModel;
@@ -14,12 +13,15 @@ public partial class SettingWindowViewModel : BaseModel
_settings = settings;
}
- public void SetPageType(Type pageType)
+ public bool SetPageType(Type pageType)
{
+ if (_pageType == pageType) return false;
+
_pageType = pageType;
+ return true;
}
- private Type _pageType = typeof(SettingsPaneGeneral);
+ private Type _pageType = null;
public Type PageType
{
get => _pageType;
From ad94ebadcfc8c175c4406be9b2b055fe448cacd2 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 15 May 2025 20:23:38 +0800
Subject: [PATCH 0975/1442] Fix possible issue in welcome pages
---
.../Resources/Pages/WelcomePage1.xaml.cs | 17 ++++++-----------
.../Resources/Pages/WelcomePage2.xaml.cs | 17 ++++++-----------
.../Resources/Pages/WelcomePage3.xaml.cs | 17 ++++++-----------
.../Resources/Pages/WelcomePage4.xaml.cs | 17 ++++++-----------
.../Resources/Pages/WelcomePage5.xaml.cs | 17 ++++++-----------
5 files changed, 30 insertions(+), 55 deletions(-)
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
index 3199e81b7..16252086e 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
@@ -9,24 +9,19 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage1
{
- public Settings Settings { get; private set; }
- private WelcomeViewModel _viewModel;
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
+ private readonly WelcomeViewModel _viewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- // If the navigation is not triggered by button click, view model will be null again
- if (_viewModel == null)
- {
- Settings = Ioc.Default.GetRequiredService();
- _viewModel = Ioc.Default.GetRequiredService();
- }
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page number
+ _viewModel.PageNum = 1;
+
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page number
- _viewModel.PageNum = 1;
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
index 1eef9fc8c..37767f128 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
@@ -11,24 +11,19 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage2
{
- public Settings Settings { get; private set; }
- private WelcomeViewModel _viewModel;
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
+ private readonly WelcomeViewModel _viewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- // If the navigation is not triggered by button click, view model will be null again
- if (_viewModel == null)
- {
- Settings = Ioc.Default.GetRequiredService();
- _viewModel = Ioc.Default.GetRequiredService();
- }
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page number
+ _viewModel.PageNum = 2;
+
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page number
- _viewModel.PageNum = 2;
base.OnNavigatedTo(e);
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
index d27368aa1..4c3184f8c 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
@@ -7,24 +7,19 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage3
{
- public Settings Settings { get; private set; }
- private WelcomeViewModel _viewModel;
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
+ private readonly WelcomeViewModel _viewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- // If the navigation is not triggered by button click, view model will be null again
- if (_viewModel == null)
- {
- Settings = Ioc.Default.GetRequiredService();
- _viewModel = Ioc.Default.GetRequiredService();
- }
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page number
+ _viewModel.PageNum = 3;
+
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page number
- _viewModel.PageNum = 3;
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
index b0999504b..63c9b9a7a 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
@@ -7,24 +7,19 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage4
{
- public Settings Settings { get; private set; }
- private WelcomeViewModel _viewModel;
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
+ private readonly WelcomeViewModel _viewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- // If the navigation is not triggered by button click, view model will be null again
- if (_viewModel == null)
- {
- Settings = Ioc.Default.GetRequiredService();
- _viewModel = Ioc.Default.GetRequiredService();
- }
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page number
+ _viewModel.PageNum = 4;
+
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page number
- _viewModel.PageNum = 4;
base.OnNavigatedTo(e);
}
}
diff --git a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
index 2ece4ce88..8db0a9f7e 100644
--- a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
+++ b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
@@ -10,24 +10,19 @@ namespace Flow.Launcher.Resources.Pages
{
public partial class WelcomePage5
{
- public Settings Settings { get; private set; }
- private WelcomeViewModel _viewModel;
+ public Settings Settings { get; } = Ioc.Default.GetRequiredService();
+ private readonly WelcomeViewModel _viewModel = Ioc.Default.GetRequiredService();
protected override void OnNavigatedTo(NavigationEventArgs e)
{
- // If the navigation is not triggered by button click, view model will be null again
- if (_viewModel == null)
- {
- Settings = Ioc.Default.GetRequiredService();
- _viewModel = Ioc.Default.GetRequiredService();
- }
+ // Sometimes the navigation is not triggered by button click,
+ // so we need to reset the page number
+ _viewModel.PageNum = 5;
+
if (!IsInitialized)
{
InitializeComponent();
}
- // Sometimes the navigation is not triggered by button click,
- // so we need to reset the page number
- _viewModel.PageNum = 5;
base.OnNavigatedTo(e);
}
From 7e3de02ecb020468532b577e16eba0db466b1df0 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Fri, 16 May 2025 19:23:49 +0800
Subject: [PATCH 0976/1442] initialize position before InitializeComponent
---
Flow.Launcher/SettingWindow.xaml.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index ebbb38414..ed4f4eb08 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -30,9 +30,9 @@ public partial class SettingWindow
_settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
- InitializeComponent();
-
+ // Because WindowStartupLocation is Manual, so we need to initialize position before InitializeComponent
UpdatePositionAndState();
+ InitializeComponent();
}
#endregion
From 07ac325593718ec9fee3a57aadcc6fabd07a8c2e Mon Sep 17 00:00:00 2001
From: Jack Ye <1160210343@qq.com>
Date: Fri, 16 May 2025 19:27:10 +0800
Subject: [PATCH 0977/1442] Improve code comments
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
Flow.Launcher/SettingWindow.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index ed4f4eb08..c53a4ea80 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -30,7 +30,7 @@ public partial class SettingWindow
_settings = Ioc.Default.GetRequiredService();
_viewModel = Ioc.Default.GetRequiredService();
DataContext = _viewModel;
- // Because WindowStartupLocation is Manual, so we need to initialize position before InitializeComponent
+ // Since WindowStartupLocation is set to Manual, initialize the window position before calling InitializeComponent
UpdatePositionAndState();
InitializeComponent();
}
From 050c2cb64781a4eba0cb84474dfde815d65c5d30 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 17 May 2025 15:08:20 +0900
Subject: [PATCH 0978/1442] Refactor OpenDirectory method to improve path
handling and streamline process start logic
---
Flow.Launcher/PublicAPIInstance.cs | 48 ++++++++++++++++++++++--------
1 file changed, 36 insertions(+), 12 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 5b8e8c9af..28b4b0429 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -314,24 +314,48 @@ namespace Flow.Launcher
((PluginJsonStorage)_pluginJsonStorages[type]).Save();
}
- public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
+ public void OpenDirectory(string directoryPath, string fileNameOrFilePath = null)
{
- using var explorer = new Process();
- var explorerInfo = _settings.CustomExplorer;
+ string targetPath;
- explorer.StartInfo = new ProcessStartInfo
+ if (fileNameOrFilePath is null)
{
- FileName = explorerInfo.Path.Replace("%d", DirectoryPath),
+ targetPath = directoryPath;
+ }
+ else
+ {
+ targetPath = Path.IsPathRooted(fileNameOrFilePath)
+ ? fileNameOrFilePath
+ : Path.Combine(directoryPath, fileNameOrFilePath);
+ }
+
+ var explorerInfo = _settings.CustomExplorer;
+ var explorerPath = explorerInfo.Path.Trim().ToLowerInvariant();
+
+ // If explorer.exe, ignore and pass only the path to Shell
+ if (Path.GetFileNameWithoutExtension(explorerPath) == "explorer")
+ {
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = targetPath, // Not explorer, Only path.
+ UseShellExecute = true // Must be true to open folder
+ });
+ return;
+ }
+
+ // Custom File Manager
+ var psi = new ProcessStartInfo
+ {
+ FileName = explorerInfo.Path.Replace("%d", directoryPath),
UseShellExecute = true,
- Arguments = FileNameOrFilePath is null
- ? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath)
+ Arguments = fileNameOrFilePath is null
+ ? explorerInfo.DirectoryArgument.Replace("%d", directoryPath)
: explorerInfo.FileArgument
- .Replace("%d", DirectoryPath)
- .Replace("%f",
- Path.IsPathRooted(FileNameOrFilePath) ? FileNameOrFilePath : Path.Combine(DirectoryPath, FileNameOrFilePath)
- )
+ .Replace("%d", directoryPath)
+ .Replace("%f", targetPath)
};
- explorer.Start();
+
+ Process.Start(psi);
}
private void OpenUri(Uri uri, bool? inPrivate = null)
From b5bbd9f123ede83f9fe53732a28bb17952c60b21 Mon Sep 17 00:00:00 2001
From: DB p
Date: Sat, 17 May 2025 15:16:34 +0900
Subject: [PATCH 0979/1442] Refactor OpenDirectory method to standardize
parameter naming and improve path handling
---
Flow.Launcher/PublicAPIInstance.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs
index 28b4b0429..ad48081b4 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -314,19 +314,19 @@ namespace Flow.Launcher
((PluginJsonStorage)_pluginJsonStorages[type]).Save();
}
- public void OpenDirectory(string directoryPath, string fileNameOrFilePath = null)
+ public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
{
string targetPath;
- if (fileNameOrFilePath is null)
+ if (FileNameOrFilePath is null)
{
- targetPath = directoryPath;
+ targetPath = DirectoryPath;
}
else
{
- targetPath = Path.IsPathRooted(fileNameOrFilePath)
- ? fileNameOrFilePath
- : Path.Combine(directoryPath, fileNameOrFilePath);
+ targetPath = Path.IsPathRooted(FileNameOrFilePath)
+ ? FileNameOrFilePath
+ : Path.Combine(DirectoryPath, FileNameOrFilePath);
}
var explorerInfo = _settings.CustomExplorer;
@@ -346,12 +346,12 @@ namespace Flow.Launcher
// Custom File Manager
var psi = new ProcessStartInfo
{
- FileName = explorerInfo.Path.Replace("%d", directoryPath),
+ FileName = explorerInfo.Path.Replace("%d", DirectoryPath),
UseShellExecute = true,
- Arguments = fileNameOrFilePath is null
- ? explorerInfo.DirectoryArgument.Replace("%d", directoryPath)
+ Arguments = FileNameOrFilePath is null
+ ? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath)
: explorerInfo.FileArgument
- .Replace("%d", directoryPath)
+ .Replace("%d", DirectoryPath)
.Replace("%f", targetPath)
};
From 003df049e1c7f32313df55fccadab171b6833277 Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Sat, 17 May 2025 20:40:40 +1000
Subject: [PATCH 0980/1442] add dedicated clear result indicator for query and
non-query usage
---
Flow.Launcher/ViewModel/MainViewModel.cs | 36 ++++++++++++++++++------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 401f71ae3..64fb85296 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -267,7 +267,7 @@ namespace Flow.Launcher.ViewModel
if (token.IsCancellationRequested) return;
- if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
+ if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(resultsCopy, pair.Metadata, e.Query,
token)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
@@ -793,7 +793,7 @@ namespace Flow.Launcher.ViewModel
public Visibility ProgressBarVisibility { get; set; }
public Visibility MainWindowVisibility { get; set; }
-
+
// This is to be used for determining the visibility status of the main window instead of MainWindowVisibility
// because it is more accurate and reliable representation than using Visibility as a condition check
public bool MainWindowVisibilityStatus { get; set; } = true;
@@ -1070,7 +1070,7 @@ namespace Flow.Launcher.ViewModel
path = QueryResultsPreviewed() ? Results.SelectedItem?.Result?.Preview.FilePath : string.Empty;
return !string.IsNullOrEmpty(path);
}
-
+
private bool QueryResultsPreviewed()
{
var previewed = PreviewSelectedItem == Results.SelectedItem;
@@ -1280,7 +1280,7 @@ namespace Flow.Launcher.ViewModel
// Update the query's IsReQuery property to true if this is a re-query
query.IsReQuery = isReQuery;
-
+
ICollection plugins = Array.Empty();
if (currentIsHomeQuery)
@@ -1312,8 +1312,7 @@ namespace Flow.Launcher.ViewModel
}
}
- var validPluginNames = plugins.Select(x => $"<{x.Metadata.Name}>");
- App.API.LogDebug(ClassName, $"Valid <{plugins.Count}> plugins: {string.Join(" ", validPluginNames)}");
+ App.API.LogDebug(ClassName, $"Valid <{plugins.Count}> plugins: {string.Join(" ", plugins.Select(x => $"<{x.Metadata.Name}>"))}");
// Do not wait for performance improvement
/*if (string.IsNullOrEmpty(query.ActionKeyword))
@@ -1341,6 +1340,9 @@ namespace Flow.Launcher.ViewModel
Task[] tasks;
if (currentIsHomeQuery)
{
+ if (ShouldClearExistingResultsForNonQuery(plugins))
+ Results.Clear();
+
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
false => QueryTaskAsync(plugin, currentCancellationToken),
@@ -1432,7 +1434,7 @@ namespace Flow.Launcher.ViewModel
App.API.LogDebug(ClassName, $"Update results for plugin <{plugin.Metadata.Name}>");
// Indicate if to clear existing results so to show only ones from plugins with action keywords
- var shouldClearExistingResults = ShouldClearExistingResults(query, currentIsHomeQuery);
+ var shouldClearExistingResults = ShouldClearExistingResultsForQuery(query, currentIsHomeQuery);
_lastQuery = query;
_previousIsHomeQuery = currentIsHomeQuery;
@@ -1454,8 +1456,13 @@ namespace Flow.Launcher.ViewModel
App.API.LogDebug(ClassName, $"Update results for history");
+ // Indicate if to clear existing results so to show only ones from plugins with action keywords
+ var shouldClearExistingResults = ShouldClearExistingResultsForQuery(query, currentIsHomeQuery);
+ _lastQuery = query;
+ _previousIsHomeQuery = currentIsHomeQuery;
+
if (!_resultsUpdateChannelWriter.TryWrite(new ResultsForUpdate(results, _historyMetadata, query,
- token)))
+ token, reSelect, shouldClearExistingResults)))
{
App.API.LogError(ClassName, "Unable to add item to Result Update Queue");
}
@@ -1552,7 +1559,7 @@ namespace Flow.Launcher.ViewModel
/// The current query.
/// A flag indicating if the current query is a home query.
/// True if the existing results should be cleared, false otherwise.
- private bool ShouldClearExistingResults(Query query, bool currentIsHomeQuery)
+ private bool ShouldClearExistingResultsForQuery(Query query, bool currentIsHomeQuery)
{
// If previous or current results are from home query, we need to clear them
if (_previousIsHomeQuery || currentIsHomeQuery)
@@ -1571,6 +1578,17 @@ namespace Flow.Launcher.ViewModel
return false;
}
+ private bool ShouldClearExistingResultsForNonQuery(ICollection plugins)
+ {
+ if (!Settings.ShowHistoryResultsForHomePage && (plugins.Count == 0 || plugins.All(x => x.Metadata.HomeDisabled == true)))
+ {
+ App.API.LogDebug(ClassName, $"Cleared old results");
+ return true;
+ }
+
+ return false;
+ }
+
private Result ContextMenuTopMost(Result result)
{
Result menu;
From b4955f7474ac7b07658fb40220551865cb9d96aa Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Sat, 17 May 2025 20:41:25 +1000
Subject: [PATCH 0981/1442] add subscriber for show history result toggle in
settings
---
.../UserSettings/Settings.cs | 15 ++++++++++++++-
Flow.Launcher/MainWindow.xaml.cs | 1 +
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 34bf4f90e..387469d24 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -173,7 +173,20 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
- public bool ShowHistoryResultsForHomePage { get; set; } = false;
+ public bool _showHistoryResultsForHomePage { get; set; } = false;
+ public bool ShowHistoryResultsForHomePage
+ {
+ get => _showHistoryResultsForHomePage;
+ set
+ {
+ if(_showHistoryResultsForHomePage != value)
+ {
+ _showHistoryResultsForHomePage = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
public int MaxHistoryResultsToShowForHomePage { get; set; } = 5;
public int CustomExplorerIndex { get; set; } = 0;
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index e243549e3..18bceedd8 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -275,6 +275,7 @@ namespace Flow.Launcher
InitializeContextMenu();
break;
case nameof(Settings.ShowHomePage):
+ case nameof(Settings.ShowHistoryResultsForHomePage):
if (_viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
{
_viewModel.QueryResults();
From 2941e036bc864507211ed37ed9ba2ec140862daf Mon Sep 17 00:00:00 2001
From: Jeremy
Date: Sat, 17 May 2025 21:08:18 +1000
Subject: [PATCH 0982/1442] add logging and method summaries
---
Flow.Launcher/ViewModel/MainViewModel.cs | 23 +++++++++++++++++----
Flow.Launcher/ViewModel/ResultsViewModel.cs | 3 +++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 64fb85296..bfda18b9a 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1341,7 +1341,11 @@ namespace Flow.Launcher.ViewModel
if (currentIsHomeQuery)
{
if (ShouldClearExistingResultsForNonQuery(plugins))
+ {
Results.Clear();
+ App.API.LogDebug(ClassName, $"Existing results are cleared for non-query");
+ }
+
tasks = plugins.Select(plugin => plugin.Metadata.HomeDisabled switch
{
@@ -1548,7 +1552,9 @@ namespace Flow.Launcher.ViewModel
///