Merge branch 'dev' into expand-resultcopy

This commit is contained in:
Garulf 2023-06-04 10:52:38 -04:00 committed by GitHub
commit d59bdff57a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 19 deletions

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
@ -54,8 +54,8 @@
<ItemGroup>
<PackageReference Include="Droplex" Version="1.6.0" />
<PackageReference Include="FSharp.Core" Version="7.0.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.1" />
<PackageReference Include="FSharp.Core" Version="7.0.300" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
</ItemGroup>

View file

@ -94,10 +94,6 @@
<!-- https://github.com/Flow-Launcher/Flow.Launcher/issues/1772#issuecomment-1502440801 -->
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
<PackageReference Include="NHotkey.Wpf" Version="2.1.0" />
<PackageReference Include="NuGet.CommandLine" Version="6.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
<PackageReference Include="SharpVectors" Version="1.8.1" />
<PackageReference Include="VirtualizingWrapPanel" Version="1.5.7" />

View file

@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Flow.Launcher.Infrastructure;
using System.Threading.Tasks;
namespace Flow.Launcher.Plugin.ProcessKiller
{
@ -89,7 +88,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller
Action = (c) =>
{
processHelper.TryKill(p);
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
// Re-query to refresh process list
_context.API.ChangeQuery(query.RawQuery, true);
return true;
}
});
@ -114,7 +114,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller
{
processHelper.TryKill(p.Process);
}
_ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list
// Re-query to refresh process list
_context.API.ChangeQuery(query.RawQuery, true);
return true;
}
});
@ -122,11 +123,5 @@ namespace Flow.Launcher.Plugin.ProcessKiller
return sortedResults;
}
private static async Task DelayAndReQueryAsync(string query)
{
await Task.Delay(500);
_context.API.ChangeQuery(query, true);
}
}
}

View file

@ -1,4 +1,4 @@
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using System;
using System.Collections.Generic;
@ -75,6 +75,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
if (!p.HasExited)
{
p.Kill();
p.WaitForExit(50);
}
}
catch (Exception e)

View file

@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@ -201,6 +202,21 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
Process.Start(processStartInfo);
return true;
}
catch (Win32Exception)
{
try
{
processStartInfo.UseShellExecute = true;
processStartInfo.Verb = "runas";
Process.Start(processStartInfo);
return true;
}
catch (Exception exception)
{
Log.Exception("can't open settings on elevated permission", exception, typeof(ResultHelper));
return false;
}
}
catch (Exception exception)
{
Log.Exception("can't open settings", exception, typeof(ResultHelper));

View file

@ -71,7 +71,6 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
Write-Host "Packing: $spec"
Write-Host "Input path: $input"
New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force
# dotnet pack is not used because ran into issues, need to test installation and starting up if to use it.
nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release