Compare commits

...

4 Commits

Author SHA1 Message Date
Laszlo Nemeth
ccdfbb0f68 [Workspaces]Fix Workspace icon when installed, move to assets (#35163)
* [Workspaces] fix defaulticon.ico, move it to the Assets directory

* Move assets to single source of truth. Installer logic

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
2024-10-01 11:52:49 +01:00
Clint Rutkas
6c17fae148 Removed build status from readme (#35113)
Removed build status
2024-09-30 11:04:49 -07:00
Seraphima Zykova
28b90d5f49 [Workspaces]Fix application icons on ARM (#35146)
fixed app path
2024-09-30 17:23:21 +01:00
Jaime Bernardo
77de44fdb4 [NewPlus]Normalize settings infrastructure (#35145) 2024-09-30 16:54:07 +01:00
25 changed files with 149 additions and 115 deletions

View File

@@ -4,13 +4,6 @@
[How to use PowerToys][usingPowerToys-docs-link] | [Downloads & Release notes][github-release-link] | [Contributing to PowerToys](#contributing) | [What's Happening](#whats-happening) | [Roadmap](#powertoys-roadmap)
## Build status
| Architecture | Solution (Main) | Solution (Stable) | Installer (Main) |
|--------------|-----------------|-------------------|------------------|
| x64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=stable&jobName=Build%20x64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=stable) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_x64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
| ARM64 | [![Build Status for Main](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status for Stable](https://dev.azure.com/shine-oss/PowerToys/_apis/build/status%2FPowerToys%20CI?branchName=main&jobName=Build%20arm64%20Release)](https://dev.azure.com/shine-oss/PowerToys/_build/latest?definitionId=3&branchName=main) | [![Build Status Installer pipeline](https://dev.azure.com/microsoft/Dart/_apis/build/status/PowerToys/PowerToys%20Signed%20YAML%20Release%20Build?branchName=main&jobName=Build&configuration=Build%20Release_arm64)](https://dev.azure.com/microsoft/Dart/_build/latest?definitionId=76541&branchName=main) |
## About
Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. For more info on [PowerToys overviews and how to use the utilities][usingPowerToys-docs-link], or any other tools and resources for [Windows development environments](https://learn.microsoft.com/windows/dev-environment/overview), head over to [learn.microsoft.com][usingPowerToys-docs-link]!

View File

@@ -54,6 +54,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
call move /Y ..\..\..\VideoConference.wxs.bk ..\..\..\VideoConference.wxs
call move /Y ..\..\..\WinAppSDK.wxs.bk ..\..\..\WinAppSDK.wxs
call move /Y ..\..\..\WinUI3Applications.wxs.bk ..\..\..\WinUI3Applications.wxs
call move /Y ..\..\..\Workspaces.wxs.bk ..\..\..\Workspaces.wxs
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
@@ -125,6 +126,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<Compile Include="Core.wxs" />
<Compile Include="Resources.wxs" />
<Compile Include="WinAppSDK.wxs" />
<Compile Include="Workspaces.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixFirewallExtension">

View File

@@ -79,6 +79,7 @@
<ComponentGroupRef Id="WindowsAppSDKComponentGroup" />
<ComponentGroupRef Id="ToolComponentGroup" />
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
<ComponentGroupRef Id="WorkspacesComponentGroup" />
</Feature>
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >
<?include $(sys.CURRENTDIR)\Common.wxi?>
<?define WorkspacesImagesComponentFiles=?>
<?define WorkspacesImagesComponentFilesPath=$(var.BinDir)Assets\Workspaces\?>
<Fragment>
<!-- Shortcut guide files -->
<DirectoryRef Id="BaseApplicationsAssetsFolder">
<Directory Id="WorkspacesAssetsInstallFolder" Name="Workspaces" />
</DirectoryRef>
<DirectoryRef Id="WorkspacesAssetsInstallFolder" FileSource="$(var.WorkspacesImagesComponentFilesPath)">
<!-- Generated by generateFileComponents.ps1 -->
<!--WorkspacesImagesComponentFiles_Component_Def-->
</DirectoryRef>
<!-- Workspaces -->
<ComponentGroup Id="WorkspacesComponentGroup" >
<Component Id="RemoveWorkspacesAssetsFolder" Guid="34FC1245-1197-4025-9CF1-A298D509C2CC" Directory="WorkspacesAssetsInstallFolder" >
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveWorkspacesAssetsFolder" Value="" KeyPath="yes"/>
</RegistryKey>
<RemoveFolder Id="RemoveFolderWorkspacesAssetsFolder" Directory="WorkspacesAssetsInstallFolder" On="uninstall"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View File

@@ -317,3 +317,7 @@ Generate-FileComponents -fileListName "SettingsV2AssetsFiles" -wxsFilePath $PSSc
Generate-FileComponents -fileListName "SettingsV2AssetsModulesFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot
Generate-FileComponents -fileListName "SettingsV2OOBEAssetsModulesFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot
Generate-FileComponents -fileListName "SettingsV2OOBEAssetsFluentIconsFiles" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot
#Workspaces
Generate-FileList -fileDepsJson "" -fileListName WorkspacesImagesComponentFiles -wxsFilePath $PSScriptRoot\Workspaces.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\Assets\Workspaces\"
Generate-FileComponents -fileListName "WorkspacesImagesComponentFiles" -wxsFilePath $PSScriptRoot\Workspaces.wxs -regroot $registryroot

View File

@@ -76,6 +76,7 @@
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs"" ""$(ProjectDir)..\PowerToysSetup\VideoConference.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs"" ""$(ProjectDir)..\PowerToysSetup\WinAppSDK.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\WinUI3Applications.wxs"" ""$(ProjectDir)..\PowerToysSetup\WinUI3Applications.wxs.bk""""
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Workspaces.wxs"" ""$(ProjectDir)..\PowerToysSetup\Workspaces.wxs.bk""""
if not "$(NormalizedPerUserValue)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform)
if "$(NormalizedPerUserValue)" == "true" call powershell.exe -NonInteractive -executionpolicy Unrestricted -File ..\PowerToysSetup\generateAllFileComponents.ps1 -platform $(Platform) -installscopeperuser $(NormalizedPerUserValue)
</Command>

View File

@@ -51,21 +51,30 @@ public:
return true;
}
virtual void set_config(PCWSTR config) override
virtual void set_config(const wchar_t* config) override
{
// The following just checks to see if the Template Location was changed for metrics purposes
// Note: We are not saving the settings here and instead relying on read/write of json in Settings App .cs code paths
try
{
json::JsonObject config_as_json = json::JsonValue::Parse(winrt::to_hstring(config)).GetObjectW();
// Parse the input JSON string.
PowerToysSettings::PowerToyValues values =
PowerToysSettings::PowerToyValues::from_json_string(config, get_key());
const auto latest_location_value = config_as_json.GetNamedString(newplus::constants::non_localizable::settings_json_key_template_location).data();
const auto existing_location_value = NewSettingsInstance().GetTemplateLocation();
values.save_to_settings_file();
NewSettingsInstance().Load();
if (!newplus::utilities::wstring_same_when_comparing_ignore_case(latest_location_value, existing_location_value))
auto templateValue = values.get_string_value(newplus::constants::non_localizable::settings_json_key_template_location);
if (templateValue.has_value())
{
Trace::EventChangedTemplateLocation();
const auto latest_location_value = templateValue.value();
const auto existing_location_value = NewSettingsInstance().GetTemplateLocation();
if (!newplus::utilities::wstring_same_when_comparing_ignore_case(latest_location_value, existing_location_value))
{
Trace::EventChangedTemplateLocation();
}
}
}
catch (std::exception& e)
{

View File

@@ -3,6 +3,7 @@
#include <common/utils/gpo.h>
#include <common/utils/json.h>
#include <common/SettingsAPI/settings_helpers.h>
#include <common/SettingsAPI/settings_objects.h>
#include "settings.h"
#include "constants.h"
@@ -38,18 +39,13 @@ NewSettings::NewSettings()
void NewSettings::Save()
{
json::JsonObject new_settings_json_data;
PowerToysSettings::PowerToyValues values(newplus::constants::non_localizable::powertoy_key, newplus::constants::non_localizable::powertoy_key);
new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_hide_file_extension,
json::value(new_settings.hide_file_extension));
values.add_property(newplus::constants::non_localizable::settings_json_key_hide_file_extension, new_settings.hide_file_extension);
values.add_property(newplus::constants::non_localizable::settings_json_key_hide_starting_digits, new_settings.hide_starting_digits);
values.add_property(newplus::constants::non_localizable::settings_json_key_template_location, new_settings.template_location);
new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_hide_starting_digits,
json::value(new_settings.hide_starting_digits));
new_settings_json_data.SetNamedValue(newplus::constants::non_localizable::settings_json_key_template_location,
json::value(new_settings.template_location));
json::to_file(new_settings_json_file_path, new_settings_json_data);
values.save_to_settings_file();
GetSystemTimeAsFileTime(&new_settings_last_loaded_timestamp);
}
@@ -122,35 +118,27 @@ void NewSettings::Reload()
void NewSettings::ParseJson()
{
auto json = json::from_file(new_settings_json_file_path);
if (json)
PowerToysSettings::PowerToyValues settings =
PowerToysSettings::PowerToyValues::load_from_settings_file(newplus::constants::non_localizable::powertoy_key);
auto templateValue = settings.get_string_value(newplus::constants::non_localizable::settings_json_key_template_location);
if (templateValue.has_value())
{
try
{
const json::JsonObject& new_settings_json = json.value();
if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_hide_file_extension, json::JsonValueType::Boolean))
{
new_settings.hide_file_extension = new_settings_json.GetNamedBoolean(
newplus::constants::non_localizable::settings_json_key_hide_file_extension);
}
if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_hide_starting_digits, json::JsonValueType::Boolean))
{
new_settings.hide_starting_digits = new_settings_json.GetNamedBoolean(
newplus::constants::non_localizable::settings_json_key_hide_starting_digits);
}
if (json::has(new_settings_json, newplus::constants::non_localizable::settings_json_key_template_location, json::JsonValueType::String))
{
new_settings.template_location = new_settings_json.GetNamedString(
newplus::constants::non_localizable::settings_json_key_template_location);
}
}
catch (const winrt::hresult_error&)
{
}
new_settings.template_location = templateValue.value();
}
auto hideFileExtensionValue = settings.get_bool_value(newplus::constants::non_localizable::settings_json_key_hide_file_extension);
if (hideFileExtensionValue.has_value())
{
new_settings.hide_file_extension = hideFileExtensionValue.value();
}
auto hideStartingDigitsValue = settings.get_bool_value(newplus::constants::non_localizable::settings_json_key_hide_starting_digits);
if (hideStartingDigitsValue.has_value())
{
new_settings.hide_starting_digits = hideStartingDigitsValue.value();
}
GetSystemTimeAsFileTime(&new_settings_last_loaded_timestamp);
}

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 456 KiB

After

Width:  |  Height:  |  Size: 456 KiB

View File

@@ -247,7 +247,7 @@ namespace WorkspacesEditor.Models
{
Logger.LogWarning($"Icon not found on app path: {AppPath}. Using default icon");
IsNotFound = true;
_icon = new Icon(@"images\DefaultIcon.ico");
_icon = new Icon(@"Assets\Workspaces\DefaultIcon.ico");
}
}

View File

@@ -23,16 +23,12 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>images\Workspaces.ico</ApplicationIcon>
<ApplicationIcon>..\Assets\Workspaces\Workspaces.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName>PowerToys.WorkspacesEditor</AssemblyName>
</PropertyGroup>
<ItemGroup>
<None Remove="images\DefaultIcon.ico" />
<None Remove="images\Workspaces.ico" />
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<WrapperTool>tlbimp</WrapperTool>
@@ -54,10 +50,10 @@
</COMReference>
</ItemGroup>
<ItemGroup>
<Content Include="images\DefaultIcon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Content Include="..\Assets\**\*.*">
<Link>Assets\Workspaces\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="images\Workspaces.ico" />
</ItemGroup>
<ItemGroup>
@@ -100,7 +96,4 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<_DeploymentManifestIconFile Remove="images\Workspaces.ico" />
</ItemGroup>
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

View File

@@ -58,7 +58,7 @@ namespace WorkspacesLauncherUI.Models
{
Logger.LogWarning($"Icon not found on app path: {Application.ApplicationPath}. Using default icon");
IsNotFound = true;
_icon = new Icon(@"images\DefaultIcon.ico");
_icon = new Icon(@"Assets\Workspaces\DefaultIcon.ico");
}
}

View File

@@ -23,16 +23,20 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>images\Workspaces.ico</ApplicationIcon>
<ApplicationIcon>..\Assets\Workspaces\Workspaces.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName>PowerToys.WorkspacesLauncherUI</AssemblyName>
</PropertyGroup>
<ItemGroup>
<None Remove="images\DefaultIcon.ico" />
<None Remove="images\Workspaces.ico" />
<Content Include="..\Assets\**\*.*">
<Link>Assets\Workspaces\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<WrapperTool>tlbimp</WrapperTool>
@@ -53,14 +57,6 @@
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Content Include="images\DefaultIcon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="images\Workspaces.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

View File

@@ -26,11 +26,11 @@ namespace Utils
constexpr const wchar_t* FileExplorerName = L"File Explorer";
constexpr const wchar_t* FileExplorerPath = L"C:\\WINDOWS\\EXPLORER.EXE";
constexpr const wchar_t* SystemSettingsPath = L"SYSTEMSETTINGS.EXE";
constexpr const wchar_t* PowerToys = L"PowerToys.exe";
constexpr const wchar_t* PowerToysSettingsUpper = L"POWERTOYS.SETTINGS.EXE";
constexpr const wchar_t* PowerToysSettings = L"PowerToys.Settings.exe";
constexpr const wchar_t* ApplicationFrameHost = L"APPLICATIONFRAMEHOST.EXE";
constexpr const wchar_t* Exe = L".EXE";
}
AppList IterateAppsFolder()
@@ -258,8 +258,8 @@ namespace Utils
if (appPathUpper.contains(installPathUpper))
{
// check if the found app is the System Settings. If yes, update the install path to the exe path
if (appPathUpper.ends_with(NonLocalizable::SystemSettingsPath))
// Update the install path to keep .exe in the path
if (!installPathUpper.ends_with(NonLocalizable::Exe))
{
auto settingsAppData = appData;
settingsAppData.installPath = appPath;

View File

@@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class NewPlusProperties
{
public const string ModuleName = "NewPlus";
public NewPlusProperties()
{
HideFileExtension = new BoolProperty(true);
HideStartingDigits = new BoolProperty(true);
TemplateLocation = new StringProperty(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates"));
}
[JsonPropertyName("HideFileExtension")]
public BoolProperty HideFileExtension { get; set; }
[JsonPropertyName("HideStartingDigits")]
public BoolProperty HideStartingDigits { get; set; }
[JsonPropertyName("TemplateLocation")]
public StringProperty TemplateLocation { get; set; }
public override string ToString() => JsonSerializer.Serialize(this);
}
}

View File

@@ -12,34 +12,27 @@ using Settings.UI.Library.Resources;
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class NewPlusSettings : ISettingsConfig
public class NewPlusSettings : BasePTModuleSettings, ISettingsConfig
{
public const string ModuleName = "NewPlus";
public const string ModuleVersion = "1.0";
public void InitializeWithDefaultSettings()
[JsonPropertyName("properties")]
public NewPlusProperties Properties { get; set; }
public NewPlusSettings()
{
// This code path should never happen
Name = ModuleName;
Version = ModuleVersion;
Properties = new NewPlusProperties();
}
public string ToJsonString()
{
return JsonSerializer.Serialize(this);
}
[JsonPropertyName("HideFileExtension")]
public bool HideFileExtension { get; set; }
[JsonPropertyName("HideStartingDigits")]
public bool HideStartingDigits { get; set; }
[JsonPropertyName("TemplateLocation")]
public string TemplateLocation { get; set; }
public string GetModuleName()
{
return ModuleName;
return Name;
}
// This can be utilized in the future if the settings.json file is to be modified/deleted.
public bool UpgradeSettingsConfiguration()
{
return false;

View File

@@ -130,7 +130,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
var settingsUtils = new SettingsUtils();
var settings = NewPlusViewModel.LoadSettings(settingsUtils);
NewPlusViewModel.CopyTemplateExamples(settings.TemplateLocation);
NewPlusViewModel.CopyTemplateExamples(settings.Properties.TemplateLocation.Value);
}
}

View File

@@ -47,9 +47,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
Settings = LoadSettings(settingsUtils);
// Initialize properties
_hideFileExtension = Settings.HideFileExtension;
_hideStartingDigits = Settings.HideStartingDigits;
_templateLocation = Settings.TemplateLocation;
_hideFileExtension = Settings.Properties.HideFileExtension.Value;
_hideStartingDigits = Settings.Properties.HideStartingDigits.Value;
_templateLocation = Settings.Properties.TemplateLocation.Value;
InitializeEnabledValue();
InitializeGpoValues();
@@ -119,12 +119,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (_templateLocation != value)
{
_templateLocation = value;
Settings.TemplateLocation = value;
Settings.Properties.TemplateLocation.Value = value;
OnPropertyChanged(nameof(TemplateLocation));
NotifySettingsChanged();
SaveSettingsToJson();
}
}
}
@@ -146,12 +144,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (_hideFileExtension != value && !_hideFileExtensionIsGPOConfigured)
{
_hideFileExtension = value;
Settings.HideFileExtension = value;
Settings.Properties.HideFileExtension.Value = value;
OnPropertyChanged(nameof(HideFileExtension));
NotifySettingsChanged();
SaveSettingsToJson();
}
}
}
@@ -168,12 +164,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (_hideStartingDigits != value)
{
_hideStartingDigits = value;
Settings.HideStartingDigits = value;
Settings.Properties.HideStartingDigits.Value = value;
OnPropertyChanged(nameof(HideStartingDigits));
NotifySettingsChanged();
SaveSettingsToJson();
}
}
}
@@ -208,10 +202,10 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
settings = settingsUtils.GetSettingsOrDefault<NewPlusSettings>(NewPlusSettings.ModuleName);
if (string.IsNullOrEmpty(settings.TemplateLocation))
if (string.IsNullOrEmpty(settings.Properties.TemplateLocation.Value))
{
// This can happen when running the DEBUG Settings application without first letting the runner create the default settings file.
settings.TemplateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates");
settings.Properties.TemplateLocation.Value = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "PowerToys", "NewPlus", "Templates");
}
}
catch (Exception e)
@@ -278,10 +272,5 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(App.GetSettingsWindow());
return await Task.FromResult(GetFolderDialogWithFlags(hwnd, FolderDialogFlags._BIF_NEWDIALOGSTYLE));
}
private void SaveSettingsToJson()
{
_settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName);
}
}
}