mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[FancyZones] Remove Editor tmp files paths cmd args and make Editor 'debugable' easier (#4279)
* Remove Editor cmd args - tmp files Add 'Debug mode' startup for Editor * Remove fixed device info string * Move if file exist check * Add enum to improve readability * Introduce ParseDeviceMode enum * Organize strings * Move title to localizable strings
This commit is contained in:
@@ -552,7 +552,6 @@ void FancyZones::ToggleEditor() noexcept
|
||||
std::to_wstring(height);
|
||||
|
||||
const auto& fancyZonesData = JSONHelpers::FancyZonesDataInstance();
|
||||
fancyZonesData.CustomZoneSetsToJsonFile(ZoneWindowUtils::GetCustomZoneSetsTmpPath());
|
||||
|
||||
const auto deviceInfo = fancyZonesData.FindDeviceInfo(zoneWindow->UniqueId());
|
||||
if (!deviceInfo.has_value())
|
||||
@@ -565,10 +564,7 @@ void FancyZones::ToggleEditor() noexcept
|
||||
|
||||
const std::wstring params =
|
||||
/*1*/ editorLocation + L" " +
|
||||
/*2*/ L"\"" + ZoneWindowUtils::GetActiveZoneSetTmpPath() + L"\" " +
|
||||
/*3*/ L"\"" + ZoneWindowUtils::GetAppliedZoneSetTmpPath() + L"\" " +
|
||||
/*4*/ L"\"" + ZoneWindowUtils::GetCustomZoneSetsTmpPath() + L"\" " +
|
||||
/*5*/ L"\"" + std::to_wstring(GetCurrentProcessId()) + L"\"";
|
||||
/*2*/ L"\"" + std::to_wstring(GetCurrentProcessId()) + L"\"";
|
||||
|
||||
SHELLEXECUTEINFO sei{ sizeof(sei) };
|
||||
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
|
||||
@@ -990,7 +986,7 @@ void FancyZones::OnEditorExitEvent() noexcept
|
||||
{
|
||||
// Collect information about changes in zone layout after editor exited.
|
||||
JSONHelpers::FancyZonesDataInstance().ParseDeviceInfoFromTmpFile(ZoneWindowUtils::GetActiveZoneSetTmpPath());
|
||||
JSONHelpers::FancyZonesDataInstance().ParseDeletedCustomZoneSetsFromTmpFile(ZoneWindowUtils::GetCustomZoneSetsTmpPath());
|
||||
JSONHelpers::FancyZonesDataInstance().ParseDeletedCustomZoneSetsFromTmpFile(ZoneWindowUtils::GetDeletedCustomZoneSetsTmpPath());
|
||||
JSONHelpers::FancyZonesDataInstance().ParseCustomZoneSetFromTmpFile(ZoneWindowUtils::GetAppliedZoneSetTmpPath());
|
||||
JSONHelpers::FancyZonesDataInstance().SaveFancyZonesData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user