Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge PT upstream #9 #379

Merged
merged 104 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
89be43e
[Workspaces] implement the move feature (#35480)
donlaci Dec 4, 2024
e7f1749
[KeyboardManager]Fix mapping shift to numpad (#35890)
mantaionut Dec 4, 2024
eadcf4b
[Analyzers] Update .editorconfig with rules to relax IDE errors (#36095)
snickler Dec 4, 2024
e19590f
[Workspaces] PWA follow-up (#36217)
SeraphimaZykova Dec 5, 2024
f7c9c80
[PTRun][Calculator]Allow scientific notation with lowercase 'e' (#36187)
PesBandi Dec 5, 2024
a9123bf
[Workspaces] Add encoder parameter to bitmap.save() (#36228)
donlaci Dec 5, 2024
076461e
[Workspaces] Implement store of app window's size and position (#36086)
donlaci Dec 5, 2024
09ce610
[ScreenRuler]Add setting to show the measurement in an extra unit (#3…
Sophanatprime Dec 5, 2024
a6c5420
[Deps]Update MSTest from 3.5.0 to 3.6.3 (#36115)
Youssef1313 Dec 5, 2024
4df8a97
Adding Jerry to community.md (#36232)
crutkas Dec 5, 2024
1212ce2
[Workspaces] Arranger: smart timer (#36096)
donlaci Dec 6, 2024
74a1a6e
Upgrade to check-spelling v0.0.24 (#36235)
jsoref Dec 6, 2024
51586b4
Adjust to community.md, shifting jerry's github user name (#36242)
crutkas Dec 6, 2024
3aec0a0
[AOT compatible] Resolve AOT Build Error in Peek.UI (#36194)
lei9444 Dec 9, 2024
ef672b5
Awake Updates - `TILLSON_11272024` (#36049)
dend Dec 9, 2024
9591950
[Workspaces] detecting right app version (#36100)
donlaci Dec 9, 2024
474b0cf
Move the XamlStyler config to src/ (#36202)
crutkas Dec 10, 2024
bf3474b
[AdvancedPaste]Add Semantic Kernel opt-in to allow chaining of paste …
drawbyperpetual Dec 11, 2024
7c6af65
[Launcher]Port from WPF-UI to .NET 9 WPF (#36215)
mantaionut Dec 11, 2024
7a39f2f
[UX]Updating New+ and Settings icons (#36290)
niels9001 Dec 11, 2024
ce0e00f
[Settings][Dashboard] Accessibility fixes (#36280)
davidegiacometti Dec 11, 2024
c5dc93f
[ci]Sign OpenAI dll that's not signed (#36299)
jaimecbernardo Dec 11, 2024
7aba6e8
Update CODEOWNERS to include gordon, jerry and kayla (#36308)
crutkas Dec 11, 2024
05e5e92
Making the powertoys-code-owners team code owners (#36310)
crutkas Dec 11, 2024
f19a34d
[FZEditor]Fix Create new layout dialog radio buttons IsChecked values…
stefansjfw Dec 12, 2024
feeeec6
0.87 changelog (#36335)
jaimecbernardo Dec 16, 2024
6f23fb5
[PTRun]Fix WPF transparent border issue on Windows 10 (#36392)
mantaionut Dec 18, 2024
e77ea96
[PTRun]Fix .NET 9 crash in OneNote (#36417)
mantaionut Dec 18, 2024
799f739
[AdvancedPaste]Fix NullReferenceException on Dispose (#36428)
drawbyperpetual Dec 18, 2024
43bc811
[Fuzz] Add fuzz testing for AdvancedPaste and new pipeline for onboar…
lei9444 Dec 19, 2024
ea66066
Add New CI Pipeline for Latest WindowsAppSDK (#36282)
shuaiyuanxx Dec 19, 2024
86c6b4a
[AOT compatible] Make HostsUILib become AOT compatible (#36136)
moooyo Dec 19, 2024
20a5f67
[AOT compatible] Clean up some AOT build issue in FilePreviewCommon a…
moooyo Dec 19, 2024
342c616
Add new pipeline using the latest webview2 from Edge Canary (#36317)
shuaiyuanxx Dec 19, 2024
2a6dcb9
[Bug fix] Making the OpenAI key configuration page scrollable. (#36359)
shuaiyuanxx Dec 19, 2024
e2cd863
[Bug fix] Add a format validation step before format conversion. (#36…
shuaiyuanxx Dec 19, 2024
f727762
Add more STCA team members (#36438)
jamrobot Dec 20, 2024
ea23f1e
Remove "prerelease: true" (#36484)
denelon Dec 21, 2024
bb637c1
[Docs]Update README for 0.87.1 release (#36534)
jaimecbernardo Dec 23, 2024
fbd72cc
[CI] Enhance build Pipeline Reliability with Retry Logic and Improved…
lei9444 Dec 24, 2024
e4d2deb
Add team member (#36590)
vanzue Dec 27, 2024
a720dd5
[New+]Don't override New actions from Explorer on Windows 10 (#36467)
jaimecbernardo Dec 27, 2024
2ba5fb7
[PTRun][Calculator]Handle hexadecimal numbers to not return divide by…
plante-msft Jan 2, 2025
1eec678
[TextExtractor]Minor UI/Accessibility fixes in the overlay UI (#36356)
davidegiacometti Jan 2, 2025
94d7121
[PTRun][Calculator]Update mages to v3.0.0 and support for `randi(n)` …
htcfreek Jan 3, 2025
bd30da6
[QuickAccent]Added ć for Slovenian (#36336) (#36338)
dsoklic Jan 3, 2025
21391bb
Fix snapping Workspaces Editor to Fancy Zones (#36463)
donlaci Jan 6, 2025
deddce2
[PTRun]Fix drag on .NET 9 WPF (#36635)
davidegiacometti Jan 6, 2025
90e75a1
[CQ]Continued to move stuff out of root - Solution.props (#36244)
crutkas Jan 6, 2025
6ca02f0
[QuickAccent]Add Proto-Indo-European (#36408)
haoliuu Jan 6, 2025
5e9675e
[PTRun]Add context buttons for VSCodeWorkspaces plugin (#36517)
programming-with-ia Jan 6, 2025
809791d
[Settings][QuickAccent]Change 'character set' to plural form (#36565)
PesBandi Jan 6, 2025
308c4b8
[PTRun][Calculator]Fix unit tests on non-english systems (#36569)
htcfreek Jan 8, 2025
cd2a887
[PTRun][Calc]Improve handling of non-base 10 numbers (#36700)
PesBandi Jan 8, 2025
a29ff07
[Settings][PTRun]Show plugin version and website (#36580)
htcfreek Jan 8, 2025
0d71f11
[Monaco]Add support for .resx and .resw preview support. (#36499)
asif4318 Jan 8, 2025
084978c
[Settings] Add Workspaces' workspaces.json file to backup/restore lis…
donlaci Jan 9, 2025
5ef9187
[Localization] Fix loc pipeline to send downloaded localized files to…
lei9444 Jan 9, 2025
7d8e4a7
[AdvancedPaste]Fixed issues with Screen Reader integration (#36778)
drawbyperpetual Jan 10, 2025
3ae3659
Remove Advent calendar from README (#36777)
cinnamon-msft Jan 10, 2025
a665975
[AdvancedPaste]Add all BitmapDecoder supported image filetypes to Ima…
daverayment Jan 13, 2025
aa9f3bb
[AOT]Clean up some AOT build issues in PowerAccent.Core (#36264)
moooyo Jan 13, 2025
df48a33
[WinUI3]Fix Windows 10 title bar borders (#36429)
pingzing Jan 13, 2025
4951a63
[QuickAccent]Fix unstable language loading (#36721)
jaimecbernardo Jan 13, 2025
8896cf8
[Peek]Bring into foreground if previously minimized (#36506)
asif4318 Jan 13, 2025
f11c885
Update Run docs README (#36857)
cinnamon-msft Jan 13, 2025
80461c0
[Monaco]Make minimap toggleable (#33742)
PesBandi Jan 14, 2025
3a10fac
[Monaco]Fix Json format preview setting (#36867)
jaimecbernardo Jan 14, 2025
162096c
[KBM]Added option for exact match shortcut (#36000)
mantaionut Jan 15, 2025
5bb9855
[Deps][Security]Update .NET Packages from 9.0.0 to 9.0.1 (#36879)
snickler Jan 15, 2025
315059f
[Peek]Fix using the correct Monaco assets at runtime (#36890)
jaimecbernardo Jan 15, 2025
603379a
[Workspaces] fixing bug: editor starts outside of visible desktop are…
donlaci Jan 16, 2025
f5f332c
[Workspaces] Saving app properties on launch and recapture (#36751)
donlaci Jan 16, 2025
39bcba3
[AdvancedPaste]Use background thread for interactions between runner …
drawbyperpetual Jan 16, 2025
12bb5c2
[VCM]Deprecate the Video Conference Mute utility (#36772)
jaimecbernardo Jan 16, 2025
65e09db
Goodbye friends, you are forever part of the team (#36905)
crutkas Jan 16, 2025
21fd509
[New utility]Sysinternals ZoomIt (#35880)
jaimecbernardo Jan 16, 2025
41803cc
[PTRun]Add hotkey to the show telemetry event (#36869)
jaimecbernardo Jan 16, 2025
e7abd34
[PTRun]Update the code for .NET 9.0.1 - remove workarounds (#36909)
mantaionut Jan 17, 2025
44f170d
[RegistryPreview]Copy context menu, data tooltip, MULTI_SZ fix (#36631)
htcfreek Jan 17, 2025
1aaf764
[MWB] - refactoring "Common" classes - Common.Log.cs, Common.Receiver…
mikeclayton Jan 17, 2025
458e5c5
[PTRun]Add setting for different trigonometric units in Calculator (#…
OldUser101 Jan 17, 2025
5b2e42b
[ci]Remove steps to build abstracted utilities packages (#36934)
jaimecbernardo Jan 17, 2025
403060e
[Settings]Update GPO infobar icon, improve some pages and fix bugs (#…
htcfreek Jan 19, 2025
9e1242e
[Common]NotificationUtil helper class with FileWatcher (#36720)
davidegiacometti Jan 19, 2025
b6e2fc1
[PTRun][Docs]Add YubicoOauthOTP to Third-Party plugins (#36761)
dlnilsson Jan 19, 2025
ddcad65
[PTRun]Fixed typo in Value Generator messages (#36951)
OldUser101 Jan 19, 2025
4d787e9
[AOT] Clean up some AOT issues in Advanced Paste module (#36297)
moooyo Jan 21, 2025
b33e0be
[ZoomIt]React to gpo setting when run as standalone (#36975)
jaimecbernardo Jan 21, 2025
438d173
[Settings]ImageResizer settings accessibility updates, fixes and refa…
daverayment Jan 21, 2025
eeb72b9
[Settings]Update "Back up" mentions when it should be used as a verb …
JackStuart Jan 21, 2025
b100d8b
[New+]Update last modified date to now for all templates created (#36…
cgaarden Jan 21, 2025
ab8df1a
[ImageResizer][ci]Fix XAML style errors (#37009)
jaimecbernardo Jan 22, 2025
318cb32
[Settings] Add "new" labels to navigation for new utilities (#36939)
cinnamon-msft Jan 22, 2025
422096b
[MWB]Fix helper process termination issue in service mode (#36892)
YDKK Jan 22, 2025
b6b941c
[runner]Fix crashes caused by wrong setting AllowDataDiagnostics regi…
stefansjfw Jan 22, 2025
0efdc94
[PTRun][Calculator]Error check when loading trigonometry mode (#37033)
jaimecbernardo Jan 23, 2025
eeeabc8
[ZoomIt]Fix transparent draw after changing another setting (#37042)
jaimecbernardo Jan 23, 2025
fb35c93
[Settings]Fix ZoomIt page changing current directory (#37052)
jaimecbernardo Jan 24, 2025
2c069ce
[ci]Remove vc tools version workaround (#37098)
jaimecbernardo Jan 27, 2025
5fe7619
0.88 changelog (#37056)
jaimecbernardo Jan 28, 2025
e94a7db
Merge remote-tracking branch 'mainPT/main' into stefan/merge_pt_9
stefansjfw Jan 29, 2025
59381ee
[check-spelling] Update metadata
stefansjfw Jan 29, 2025
d387836
Merge remote-tracking branch 'origin/main' into stefan/merge_pt_9
stefansjfw Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ AFFINETRANSFORM
affordances
AFX
AGGREGATABLE
ahk
AHybrid
akv
ALarger
Expand Down Expand Up @@ -1049,6 +1048,7 @@ NNN
NOACTIVATE
NOAGGREGATION
NOASYNC
NOCHANGEDIR
NOCLIP
NOCLOSEPROCESS
NOCOALESCE
Expand Down
7 changes: 0 additions & 7 deletions .pipelines/v2/templates/job-build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,6 @@ jobs:
- ${{ if eq(parameters.useLatestWinAppSDK, false)}}:
- template: .\steps-restore-nuget.yml

- pwsh: |-
& "$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1"
displayName: Work around DD-1541167 (VCToolsVersion)
${{ if eq(parameters.useVSPreview, true) }}:
env:
VCWhereExtraVersionTarget: '-prerelease'
- pwsh: |-
& "$(build.sourcesdirectory)\.pipelines\installWiX.ps1"
displayName: Download and install WiX 3.14 development build
Expand Down
5 changes: 0 additions & 5 deletions .pipelines/verifyAndSetLatestVCToolsVersion.ps1

This file was deleted.

170 changes: 96 additions & 74 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/common/ManagedTelemetry/Telemetry/DataDiagnosticsSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ public static bool GetEnabledValue()
try
{
registryValue = Registry.GetValue(DataDiagnosticsRegistryKey, DataDiagnosticsRegistryValueName, 0);

if (registryValue is not null)
{
return (int)registryValue == 1 ? true : false;
}
}
catch
{
}

if (registryValue is not null)
{
return (int)registryValue == 1 ? true : false;
}

return false;
}

Expand Down
5 changes: 2 additions & 3 deletions src/common/SettingsAPI/settings_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ namespace PTSettingsHelper
return;
}

const bool value = enabled;
const size_t buf_size = sizeof(bool);
if (RegSetValueExW(key, DataDiagnosticsRegValueName, 0, REG_QWORD, reinterpret_cast<const BYTE*>(&value), buf_size) != ERROR_SUCCESS)
const DWORD value = enabled ? 1 : 0;
if (RegSetValueExW(key, DataDiagnosticsRegValueName, 0, REG_DWORD, reinterpret_cast<const BYTE*>(&value), sizeof(value)) != ERROR_SUCCESS)
{
RegCloseKey(key);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace
class AdvancedPaste : public PowertoyModuleIface
{
private:

AdvancedPasteProcessManager m_process_manager;
bool m_enabled = false;

Expand Down
8 changes: 8 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/Common.Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ private static void SendClipboardDataUsingTCP(byte[] bytes, bool image)

new Task(() =>
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

System.Threading.Thread thread = Thread.CurrentThread;
thread.Name = $"{nameof(SendClipboardDataUsingTCP)}.{thread.ManagedThreadId}";
Thread.UpdateThreads(thread);
Expand Down Expand Up @@ -386,6 +390,10 @@ internal static void GetRemoteClipboard(string postAction)

new Task(() =>
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

System.Threading.Thread thread = Thread.CurrentThread;
thread.Name = $"{nameof(ConnectAndGetData)}.{thread.ManagedThreadId}";
Thread.UpdateThreads(thread);
Expand Down
4 changes: 4 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ private static void WatchDogThread()

private static void HelperThread()
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = System.Threading.ExecutionContext.SuppressFlow();

try
{
while (true)
Expand Down
4 changes: 4 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ internal static void StartInputCallbackThread()

private static void InputCallbackThread()
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

Common.InputCallbackThreadID = Thread.CurrentThread.ManagedThreadId;
while (!Common.InitDone)
{
Expand Down
24 changes: 24 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,10 @@ internal int TcpSend(TcpSk tcp, DATA data)

private void TCPServerThread(object param)
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

try
{
TcpListener server = param as TcpListener;
Expand Down Expand Up @@ -768,6 +772,10 @@ private void StartNewTcpServer(TcpSk tcp, string machineName)
{
void ServerThread()
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

try
{
// Receiving packages
Expand Down Expand Up @@ -876,6 +884,10 @@ internal void StartNewTcpClient(string machineName)
{
void ClientThread(object obj)
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

IPHostEntry host;
bool useName2IP = false;
List<IPAddress> validAddresses = new();
Expand Down Expand Up @@ -1117,6 +1129,10 @@ private void StartNewTcpClientThread(string machineName, IPAddress ip)
{
void NewTcpClient()
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

TcpClient tcpClient = null;

try
Expand Down Expand Up @@ -1549,6 +1565,10 @@ private void MainTCPRoutine(TcpSk tcp, string machineName, bool isClient)

private static void AcceptConnectionAndSendClipboardData(object param)
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

TcpListener server = param as TcpListener;

do
Expand Down Expand Up @@ -1590,6 +1610,10 @@ private static void AcceptConnectionAndSendClipboardData(object param)
{
new Task(() =>
{
// SuppressFlow fixes an issue on service mode, where the helper process can't get enough permissions to be started again.
// More details can be found on: https://github.com/microsoft/PowerToys/pull/36892
using var asyncFlowControl = ExecutionContext.SuppressFlow();

System.Threading.Thread thread = Thread.CurrentThread;
thread.Name = $"{nameof(SendOrReceiveClipboardData)}.{thread.ManagedThreadId}";
Thread.UpdateThreads(thread);
Expand Down
18 changes: 18 additions & 0 deletions src/modules/NewPlus/NewShellExtensionContextMenu/new_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,21 @@ namespace newplus::utilities
}
}

inline void update_last_write_time(const std::filesystem::path path)
{
const std::filesystem::file_time_type now = std::filesystem::file_time_type::clock::now();

std::filesystem::last_write_time(path, now);

if (std::filesystem::is_directory(path))
{
for (const auto& entry : std::filesystem::recursive_directory_iterator(path))
{
std::filesystem::last_write_time(entry.path(), now);
}
}
}

inline HRESULT copy_template(const template_item* template_entry, const ComPtr<IUnknown> site_of_folder)
{
HRESULT hr = S_OK;
Expand Down Expand Up @@ -376,6 +391,9 @@ namespace newplus::utilities
// Copy file and determine final filename
std::filesystem::path target_final_fullpath = template_entry->copy_object_to(GetActiveWindow(), target_fullpath);

// Touch all files and set last modified to "now"
update_last_write_time(target_final_fullpath);

// Consider copy completed. If we do tracing after enter_rename_mode, then rename mode won't consistently work
trace.UpdateState(true);
Trace::EventCopyTemplate(target_final_fullpath.extension().c_str());
Expand Down
18 changes: 12 additions & 6 deletions src/modules/ZoomIt/ZoomIt/Zoomit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6023,6 +6023,12 @@ LRESULT APIENTRY MainWndProc(
// Apply tray icon setting
EnableDisableTrayIcon(hWnd, g_ShowTrayIcon);

// This is also called by ZoomIt when it starts and loads the Settings. Opacity is added after loading from registry, so we use the same pattern.
if ((g_PenColor >> 24) == 0)
{
g_PenColor |= 0xFF << 24;
}

// Apply hotkey settings
UnregisterAllHotkeys(hWnd);
g_ToggleMod = GetKeyMod(g_ToggleKey);
Expand Down Expand Up @@ -7416,19 +7422,19 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
if( !ShowEula( APPNAME, NULL, NULL )) return 1;

#ifdef __ZOOMIT_POWERTOYS__
if (powertoys_gpo::getConfiguredZoomItEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 1;
}

Shared::Trace::ETWTrace* trace = nullptr;
std::wstring pid = std::wstring(lpCmdLine); // The PowerToys pid is the argument to the process.
auto mainThreadId = GetCurrentThreadId();
if (!pid.empty())
{
g_StartedByPowerToys = TRUE;

if (powertoys_gpo::getConfiguredZoomItEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 1;
}

trace = new Shared::Trace::ETWTrace();
Trace::RegisterProvider();
trace->UpdateState(true);
Expand Down
10 changes: 8 additions & 2 deletions src/modules/ZoomIt/ZoomItSettingsInterop/ZoomItSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ namespace winrt::PowerToys::ZoomItSettingsInterop::implementation
}
else if (special_semantics->second == SPECIAL_SEMANTICS_COLOR)
{
// PowerToys settings likes colors as #FFFFFF strings.
/* PowerToys settings likes colors as #FFFFFF strings.
But currently these Settings are internal state for ZoomIt, not something that we really need to send Settings.
Code is kept here as a reference if a future color Setting ends up being configured.
hstring s = winrt::to_hstring(std::format("#{:02x}{:02x}{:02x}", value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF));
_settings.add_property(curSetting->ValueName, s);
*/
}
}
break;
Expand Down Expand Up @@ -211,6 +214,9 @@ namespace winrt::PowerToys::ZoomItSettingsInterop::implementation
}
else if (special_semantics->second == SPECIAL_SEMANTICS_COLOR)
{
/* PowerToys settings likes colors as #FFFFFF strings.
But currently these Settings are internal state for ZoomIt, not something that we really need to save from Settings.
Code is kept here as a reference if a future color Setting ends up being configured.
auto possibleValue = valuesFromSettings.get_string_value(curSetting->ValueName);
if (possibleValue.has_value())
{
Expand All @@ -219,8 +225,8 @@ namespace winrt::PowerToys::ZoomItSettingsInterop::implementation
{
*static_cast<PDWORD>(curSetting->Setting) = RGB(r, g, b);
}

}
*/
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Microsoft.PowerToys.Run.Plugin.Calculator.Properties;
using Microsoft.PowerToys.Settings.UI.Library;
using Wox.Plugin;
using Wox.Plugin.Logger;

namespace Microsoft.PowerToys.Run.Plugin.Calculator
{
Expand Down Expand Up @@ -212,8 +213,18 @@ public void UpdateSettings(PowerLauncherPluginSettings settings)
var optionReplaceInput = settings.AdditionalOptions.FirstOrDefault(x => x.Key == ReplaceInput);
replaceInput = optionReplaceInput?.Value ?? replaceInput;

var optionTrigMode = settings.AdditionalOptions.FirstOrDefault(x => x.Key == TrigMode);
trigMode = (CalculateEngine.TrigMode)int.Parse(optionTrigMode.ComboBoxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
try
{
var optionTrigMode = settings.AdditionalOptions.FirstOrDefault(x => x.Key == TrigMode);
if (optionTrigMode != null)
{
trigMode = (CalculateEngine.TrigMode)int.Parse(optionTrigMode.ComboBoxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
}
}
catch (Exception ex)
{
Log.Exception("Error while trying to load Trigonometry Mode setting: {ex.Message}", ex, GetType());
}
}

_inputUseEnglishFormat = inputUseEnglishFormat;
Expand Down
Loading
Loading