Skip to content

Commit

Permalink
.NET8, bumped dependencies, internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegiacometti committed Dec 7, 2023
1 parent 763f735 commit 43acbb0
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
echo "PLUGIN_VERSION=$($xml.Project.PropertyGroup.Version)" >> $env:GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Build
run: dotnet build Community.PowerToys.Run.Plugin.EdgeFavorite.sln --configuration Release /p:Platform=${{matrix.platform}} /p:EnableWindowsTargeting=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Platforms>x64;ARM64</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -12,7 +12,6 @@

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void InitFavorites()
_root = newRoot;
}

private void ProcessFavorites(JsonElement element, FavoriteItem parent, string path, bool root)
private static void ProcessFavorites(JsonElement element, FavoriteItem parent, string path, bool root)
{
if (element.ValueKind == JsonValueKind.Object && element.TryGetProperty("children", out var children))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public IEnumerable<FavoriteItem> Search(FavoriteItem node, string[] path, int de
{
if (depth == path.Length - 1)
{
return node.Childrens.Where(f => f.Name != null && f.Name.StartsWith(path[depth], StringComparison.InvariantCultureIgnoreCase));
return node.Childrens.Where(f => f.Name != null && f.Name.StartsWith(path[depth], StringComparison.OrdinalIgnoreCase));
}

var folder = node.Childrens.SingleOrDefault(f => f.Type == FavoriteType.Folder && f.Name != null && f.Name.Equals(path[depth], StringComparison.InvariantCultureIgnoreCase));
var folder = node.Childrens.SingleOrDefault(f => f.Type == FavoriteType.Folder && f.Name != null && f.Name.Equals(path[depth], StringComparison.OrdinalIgnoreCase));

if (folder != null)
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Community.PowerToys.Run.Plugin.EdgeFavorite/Libs/x64/Wox.Plugin.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Windows;
using System.Windows.Input;
using ManagedCommon;
Expand All @@ -15,6 +16,7 @@ namespace Community.PowerToys.Run.Plugin.EdgeFavorite.Models
{
public class FavoriteItem
{
private static readonly string _pluginName = Assembly.GetExecutingAssembly().GetName().Name ?? string.Empty;
private static string? _folderIcoPath;
private static string? _urlIcoPath;
private readonly List<FavoriteItem> _childrens = new();
Expand Down Expand Up @@ -92,6 +94,7 @@ public List<ContextMenuResult> CreateContextMenuResult()
FontFamily = "Segoe Fluent Icons,Segoe MDL2 Assets",
AcceleratorKey = Key.C,
AcceleratorModifiers = ModifierKeys.Control,
PluginName = _pluginName,
Action = _ =>
{
try
Expand All @@ -113,6 +116,7 @@ public List<ContextMenuResult> CreateContextMenuResult()
FontFamily = "Segoe Fluent Icons,Segoe MDL2 Assets",
AcceleratorKey = Key.P,
AcceleratorModifiers = ModifierKeys.Control,
PluginName = _pluginName,
Action = _ =>
{
Helper.OpenInShell(@"shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge", $"-private {Url}");
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.1.0</Version>
<Version>0.2.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Simple [PowerToys Run](https://learn.microsoft.com/windows/powertoys/run) experi
## Requirements

- Microsoft Edge set as default browser
- PowerToys minimum version 0.75.0
- PowerToys minimum version 0.76.0

## Installation

Expand Down

0 comments on commit 43acbb0

Please sign in to comment.