Skip to content

Commit d59bdff

Browse files
authored
Merge branch 'dev' into expand-resultcopy
2 parents ed11cc2 + 22dd59e commit d59bdff

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

Flow.Launcher.Core/Flow.Launcher.Core.csproj

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

33
<PropertyGroup>
44
<TargetFramework>net7.0-windows</TargetFramework>
@@ -54,8 +54,8 @@
5454

5555
<ItemGroup>
5656
<PackageReference Include="Droplex" Version="1.6.0" />
57-
<PackageReference Include="FSharp.Core" Version="7.0.0" />
58-
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.1" />
57+
<PackageReference Include="FSharp.Core" Version="7.0.300" />
58+
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
5959
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
6060
</ItemGroup>
6161

Flow.Launcher/Flow.Launcher.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@
9494
<!-- https://github.com/Flow-Launcher/Flow.Launcher/issues/1772#issuecomment-1502440801 -->
9595
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
9696
<PackageReference Include="NHotkey.Wpf" Version="2.1.0" />
97-
<PackageReference Include="NuGet.CommandLine" Version="6.3.1">
98-
<PrivateAssets>all</PrivateAssets>
99-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
100-
</PackageReference>
10197
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
10298
<PackageReference Include="SharpVectors" Version="1.8.1" />
10399
<PackageReference Include="VirtualizingWrapPanel" Version="1.5.7" />

Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
using System.Collections.Generic;
1+
using System.Collections.Generic;
22
using System.Linq;
33
using Flow.Launcher.Infrastructure;
4-
using System.Threading.Tasks;
54

65
namespace Flow.Launcher.Plugin.ProcessKiller
76
{
@@ -89,7 +88,8 @@ private List<Result> CreateResultsFromQuery(Query query)
8988
Action = (c) =>
9089
{
9190
processHelper.TryKill(p);
92-
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
91+
// Re-query to refresh process list
92+
_context.API.ChangeQuery(query.RawQuery, true);
9393
return true;
9494
}
9595
});
@@ -114,19 +114,14 @@ private List<Result> CreateResultsFromQuery(Query query)
114114
{
115115
processHelper.TryKill(p.Process);
116116
}
117-
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
117+
// Re-query to refresh process list
118+
_context.API.ChangeQuery(query.RawQuery, true);
118119
return true;
119120
}
120121
});
121122
}
122123

123124
return sortedResults;
124125
}
125-
126-
private static async Task DelayAndReQueryAsync(string query)
127-
{
128-
await Task.Delay(500);
129-
_context.API.ChangeQuery(query, true);
130-
}
131126
}
132127
}

Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Flow.Launcher.Infrastructure;
1+
using Flow.Launcher.Infrastructure;
22
using Flow.Launcher.Infrastructure.Logger;
33
using System;
44
using System.Collections.Generic;
@@ -75,6 +75,7 @@ public void TryKill(Process p)
7575
if (!p.HasExited)
7676
{
7777
p.Kill();
78+
p.WaitForExit(50);
7879
}
7980
}
8081
catch (Exception e)

Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.ComponentModel;
23
using System.Collections.Generic;
34
using System.Diagnostics;
45
using System.Linq;
@@ -201,6 +202,21 @@ private static bool DoOpenSettingsAction(WindowsSetting entry)
201202
Process.Start(processStartInfo);
202203
return true;
203204
}
205+
catch (Win32Exception)
206+
{
207+
try
208+
{
209+
processStartInfo.UseShellExecute = true;
210+
processStartInfo.Verb = "runas";
211+
Process.Start(processStartInfo);
212+
return true;
213+
}
214+
catch (Exception exception)
215+
{
216+
Log.Exception("can't open settings on elevated permission", exception, typeof(ResultHelper));
217+
return false;
218+
}
219+
}
204220
catch (Exception exception)
205221
{
206222
Log.Exception("can't open settings", exception, typeof(ResultHelper));

Scripts/post_build.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
7171
Write-Host "Packing: $spec"
7272
Write-Host "Input path: $input"
7373

74-
New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force
7574
# dotnet pack is not used because ran into issues, need to test installation and starting up if to use it.
7675
nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release
7776

0 commit comments

Comments
 (0)