mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
[Workspaces] Implement PWA recognition, launch. (#35913)
* [Workspaces] PWA: first steps: implement PWA app searcher, add basic controls to the editor * spell checker * Snapshot tool: adding command line args for edge * PWA: add icon handling, add launch of PWA * Impllement Aumid getters and comparison to connect PWA windows and processes. Update LauncherUI, Launcher * Minor fixes, simplifications * Spell checker * Removing manual PWA selection, spell checker * Fix merge conflict * Trying to convince spell checker, that "PEB" is a correct word. * XAML format fix * Extending snapshot tool by logs for better testablility * spell checker fix * extending logs * extending logs * Removing some logs, modifying search criteria for pwa helper process search * extending PWA detection for the case the directory with the app-id is missing * Fix issue when pwaAppId is null * fix missing pwa-app-id handling in the editor. Removed unused property (code cleaning) and updating json parser in Launcher * Code cleaning: Moving duplicate code to a common project * Fix issue: adding new Guid as app id if it is empty * Code cleanup: moving Pwa related code from snapshotUtils to PwaHelper * Code cleaning * Code cleanup: Move common Application model to Csharp Library * code cleanup * modifying package name * Ading project reference to Common.UI * Code cleaning, fixing references --------- Co-authored-by: donlaci <donlaci@yahoo.com>
This commit is contained in:
@@ -23,7 +23,7 @@ namespace WorkspacesData
|
||||
std::wstring settingsFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
return settingsFolderPath + L"\\temp-workspaces.json";
|
||||
}
|
||||
|
||||
|
||||
RECT WorkspacesProject::Application::Position::toRect() const noexcept
|
||||
{
|
||||
return RECT{ .left = x, .top = y, .right = x + width, .bottom = y + height };
|
||||
@@ -79,6 +79,7 @@ namespace WorkspacesData
|
||||
const static wchar_t* AppPathID = L"application-path";
|
||||
const static wchar_t* AppPackageFullNameID = L"package-full-name";
|
||||
const static wchar_t* AppUserModelId = L"app-user-model-id";
|
||||
const static wchar_t* PwaAppId = L"pwa-app-id";
|
||||
const static wchar_t* AppTitleID = L"title";
|
||||
const static wchar_t* CommandLineArgsID = L"command-line-arguments";
|
||||
const static wchar_t* ElevatedID = L"is-elevated";
|
||||
@@ -98,6 +99,7 @@ namespace WorkspacesData
|
||||
json.SetNamedValue(NonLocalizable::AppTitleID, json::value(data.title));
|
||||
json.SetNamedValue(NonLocalizable::AppPackageFullNameID, json::value(data.packageFullName));
|
||||
json.SetNamedValue(NonLocalizable::AppUserModelId, json::value(data.appUserModelId));
|
||||
json.SetNamedValue(NonLocalizable::PwaAppId, json::value(data.pwaAppId));
|
||||
json.SetNamedValue(NonLocalizable::CommandLineArgsID, json::value(data.commandLineArgs));
|
||||
json.SetNamedValue(NonLocalizable::ElevatedID, json::value(data.isElevated));
|
||||
json.SetNamedValue(NonLocalizable::CanLaunchElevatedID, json::value(data.canLaunchElevated));
|
||||
@@ -136,6 +138,11 @@ namespace WorkspacesData
|
||||
result.appUserModelId = json.GetNamedString(NonLocalizable::AppUserModelId);
|
||||
}
|
||||
|
||||
if (json.HasKey(NonLocalizable::PwaAppId))
|
||||
{
|
||||
result.pwaAppId = json.GetNamedString(NonLocalizable::PwaAppId);
|
||||
}
|
||||
|
||||
result.commandLineArgs = json.GetNamedString(NonLocalizable::CommandLineArgsID);
|
||||
|
||||
if (json.HasKey(NonLocalizable::ElevatedID))
|
||||
@@ -330,11 +337,11 @@ namespace WorkspacesData
|
||||
{
|
||||
result.isShortcutNeeded = json.GetNamedBoolean(NonLocalizable::IsShortcutNeededID);
|
||||
}
|
||||
|
||||
|
||||
if (json.HasKey(NonLocalizable::MoveExistingWindowsID))
|
||||
{
|
||||
result.moveExistingWindows = json.GetNamedBoolean(NonLocalizable::MoveExistingWindowsID);
|
||||
}
|
||||
result.moveExistingWindows = json.GetNamedBoolean(NonLocalizable::MoveExistingWindowsID);
|
||||
}
|
||||
|
||||
auto appsArray = json.GetNamedArray(NonLocalizable::AppsID);
|
||||
for (uint32_t i = 0; i < appsArray.Size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user